예제 #1
0
        private void DisconnectCommandExecute()
        {
            OutbreakName = "Not connected to a database";

            Project.Dispose();
            Project = null;

            SmsController.Dispose();
            SmsController = null;

            StatusMessages.Clear();
            DiagnosticCommandResults.Clear();

            IsConnectedToDatabase = false;
            IsConnectedToModem    = false;
        }
예제 #2
0
        private void IssueATCommandExecute(string command)
        {
            DiagnosticCommandResults.Add(command);

            try
            {
                string result            = SmsController.ExecCommand(command, 700, "VHF ERROR MESSAGE");
                string displayableResult = result.TrimStart('\r').TrimStart('\n').TrimEnd('\n').TrimEnd('\r');
                displayableResult = displayableResult.Replace("\r\n\r\nOK", "\nOK");
                DiagnosticCommandResults.Add(displayableResult);
                AddStatusMessage(String.Format("Diagnostic command issued: {0}", command), "Server");
            }
            catch (Exception ex)
            {
                DiagnosticCommandResults.Add(String.Format("Server generated an exception: {0}", ex.Message));

                // re-start the controller
                SmsController.SmsReceived -= SmsController_SmsReceived;
                SmsController.Dispose();

                SmsController              = new SmsController(SmsController.ModemConfiguration, Project.SmsModule.PollRate);
                SmsController.SmsReceived += SmsController_SmsReceived;
            }
        }
예제 #3
0
 private void ClearConsoleCommandExecute()
 {
     DiagnosticCommandResults.Clear();
 }