Private
Public Access
Reformatted Commander
This commit is contained in:
1 parent
aeea08f021
commit
3ba8d7b944
1 file changed
+7
@@ -34,6 +34,7 @@ namespace Advanced_Software_Engineering {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessCommands(string rawCommands) {
|
public void ProcessCommands(string rawCommands) {
|
||||||
|
try {
|
||||||
//ignore case
|
//ignore case
|
||||||
rawCommands = rawCommands.ToLower();
|
rawCommands = rawCommands.ToLower();
|
||||||
Console.WriteLine("Processing:\n" + rawCommands);
|
Console.WriteLine("Processing:\n" + rawCommands);
|
||||||
@@ -53,6 +54,12 @@ namespace Advanced_Software_Engineering {
|
|||||||
foreach (Verb verb in this.commands) {
|
foreach (Verb verb in this.commands) {
|
||||||
Console.WriteLine(verb.GetDescription());
|
Console.WriteLine(verb.GetDescription());
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
new ErrorWindow("Error parsing commands", "The program phraser has encountered an error.", e.Message + Environment.NewLine + e.StackTrace, ErrorWindow.ERROR_MESSAGE).Show();
|
||||||
|
RemoveAllCommands();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessCommandsAndExecute(string rawCommands) {
|
public void ProcessCommandsAndExecute(string rawCommands) {
|
||||||
|
|||||||
Reference in new issue
Block a user