Made errors less intrusive

This commit is contained in:
Lukasz Baldyga committed 2020-10-25 10:56:49 +00:00
1 parent 98ac780f76
commit df09a985c7
3 files changed
+12 -1

No files matched your search

@@ -103,6 +103,10 @@ namespace Advanced_Software_Engineering {
return desc;
}
public int GetNumberOfCommands() {
return commands.Count;
}
}
}
@@ -31,7 +31,7 @@ namespace Advanced_Software_Engineering
commander = new Commander(graphics);
}
public Draw_Preview(String commands) {
public Draw_Preview(string commands) {
InitializeComponent();
SettingsAndHelperFunctions.NumberOfWindows++;
graphics = panel1.CreateGraphics();
@@ -82,5 +82,9 @@ namespace Advanced_Software_Engineering
return commander.ExplainCommands();
}
public bool IsSuccess() {
return commander.GetNumberOfCommands() > 0;
}
}
}
@@ -148,9 +148,12 @@ namespace Advanced_Software_Engineering {
DisplayForm.RemoveAllCommands();
DisplayForm.SubmitCommands(textBox1.Text);
}
if (DisplayForm.IsSuccess()) {
DisplayForm.Show();
DisplayForm.Focus();
}
}
public void CheckCode() {
Draw_Preview tmpDrawPreview = new Draw_Preview();