public bool ProcessCmd(string text) { bool result; try { text = text.Trim(); int num = text.IndexOf(' '); string text2; string text3; if (num == -1) { text2 = text; text3 = ""; } else { text2 = text.Substring(0, num); text3 = text.Substring(num).Trim(); } if (text2.Length > 2 && text2[0] == '/') { this.AdminClientNode.RequestConsoleCommand(text2.Substring(1), text3); result = true; } else if (text2.Trim() == "?") { result = ProcessCommandHelper.Process(this, "help", ""); } else if (ProcessCommandHelper.Process(this, text2, text3)) { result = true; } else { this.LogManager.AddLog(LogType.ERROR, "Invalid Command ! - \"{0}\"", new object[] { text }); result = false; } } catch (Exception ex) { this.LogManager.AddLog(LogType.ERROR, "Exception occurred ! : {0}", new object[] { ex.Message }); result = false; } return(result); }
public ExecutionSupportCore(ExecutionSupporterForm form) { this.Form = form; this.JobProcessor = new JobProcessor(); this.JobProcessor.Start(); this.LogManager = new LogManager(this); this.MachineManager = new MachineManager(this); this.ServiceManager = new ServiceManager(this); this.InputManager = new InputManager(this); this.InitializeAdminService(); ProcessCommandHelper.Initialize(); Scheduler.Schedule(this.JobProcessor, Job.Create(new Action(this.TriggerSchedule)), 1000); }