Private
Public Access
Fixed bug where lines would draw incorrectly
This commit is contained in:
1 parent
0af10a3c9d
commit
92b1110369
2 files changed
+13
-4
No files matched your search
@@ -46,6 +46,7 @@ namespace Advanced_Software_Engineering
|
|||||||
{
|
{
|
||||||
//ignore case
|
//ignore case
|
||||||
rawCommands = rawCommands.ToLower();
|
rawCommands = rawCommands.ToLower();
|
||||||
|
|
||||||
//isolate commands
|
//isolate commands
|
||||||
string[] commands = rawCommands.Split(Environment.NewLine.ToCharArray());
|
string[] commands = rawCommands.Split(Environment.NewLine.ToCharArray());
|
||||||
|
|
||||||
@@ -54,7 +55,17 @@ namespace Advanced_Software_Engineering
|
|||||||
//handle errors later
|
//handle errors later
|
||||||
AddCommand(VerbFactory.MakeVerb(drawer, rawCommand));
|
AddCommand(VerbFactory.MakeVerb(drawer, rawCommand));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ProcessCommandsAndExecute(string rawCommands)
|
||||||
|
{
|
||||||
|
int start = commands.Count;
|
||||||
|
ProcessCommands(rawCommands);
|
||||||
|
|
||||||
|
for(; start < commands.Count; start++)
|
||||||
|
{
|
||||||
|
commands[start].ExecuteVerb();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace Advanced_Software_Engineering
|
|||||||
private void DrawPreview_FormClosed(object sender, FormClosedEventArgs e)
|
private void DrawPreview_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
{
|
{
|
||||||
SettingsAndHelperFunctions.WindowClosed();
|
SettingsAndHelperFunctions.WindowClosed();
|
||||||
|
this.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawPreviewPane_Paint(object sender, PaintEventArgs e)
|
private void DrawPreviewPane_Paint(object sender, PaintEventArgs e)
|
||||||
@@ -42,11 +43,8 @@ namespace Advanced_Software_Engineering
|
|||||||
|
|
||||||
private void SubmitCommand(object sender, EventArgs e)
|
private void SubmitCommand(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
commander.ProcessCommands(textBox1.Text);
|
commander.ProcessCommandsAndExecute(textBox1.Text);
|
||||||
textBox1.Text = "";
|
textBox1.Text = "";
|
||||||
|
|
||||||
//Makes sure that the panel updates
|
|
||||||
panel1.Invalidate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user