diff --git a/Advanced Software Engineering/Advanced Software Engineering/Windows/DrawPreview.cs b/Advanced Software Engineering/Advanced Software Engineering/Windows/DrawPreview.cs index 6c6f443..8ea6d1a 100644 --- a/Advanced Software Engineering/Advanced Software Engineering/Windows/DrawPreview.cs +++ b/Advanced Software Engineering/Advanced Software Engineering/Windows/DrawPreview.cs @@ -17,7 +17,7 @@ namespace Advanced_Software_Engineering Commander commander; /// - /// The draw preview window. + /// The draw preview window. Spawns the basic DrawPreview. /// /// /// This window is responsible for showing what has been drawn. @@ -31,6 +31,12 @@ namespace Advanced_Software_Engineering commander = new Commander(graphics); } + /// + /// The draw preview window. Spawns the DrawPreview with commands locked. + /// + /// + /// This window is responsible for showing what has been drawn. + /// public Draw_Preview(string commands) { InitializeComponent(); SettingsAndHelperFunctions.NumberOfWindows++; @@ -65,23 +71,41 @@ namespace Advanced_Software_Engineering textBox1.Text = ""; } + /// + /// Submit commands to the commander to execute on the form. + /// + /// Commands seperated by new lines public void SubmitCommands(string comamnds) { commander.ProcessCommandsAndExecute(comamnds); } + /// + /// Removes all the commands from the form + /// public void RemoveAllCommands() { commander.RemoveAllCommands(); } + /// + /// Enables the textbox and submit button to allow the user to interract with the preview directly + /// public void ReleaseCommandLock() { textBox1.Enabled = true; button1.Enabled = true; } + /// + /// Describes all of the current commands stored inside commander. + /// + /// A string with all the command descriptions public string DescribeAllCommands() { return commander.ExplainCommands(); } + /// + /// Returns weather there were any errors in the commander. Commander will have 0 commands if there is one bad command. + /// + /// A boolean describing the success of command phrasing public bool IsSuccess() { return commander.GetNumberOfCommands() > 0; }