コード例 #1
0
 private void InvokeSanityCheckComplete(NetworkSanityCheckEventArgs e)
 {
     if (SanityCheckComplete != null)
     {
         SanityCheckComplete.Invoke(this, e);
     }
 }
コード例 #2
0
 private void ProcessSanityCheckResult(NetworkSanityCheckEventArgs e)
 {
     if (e.IsSane)
     {
         ConnectWorkers();
     }
     else
     {
         InvokeError(new Exception("Error while connecting to the drone. Have you connected to the drone network?", e.Exception));
     }
 }
コード例 #3
0
 private void ProcessSanityCheckResult(NetworkSanityCheckEventArgs e)
 {
     if (e.IsSane)
     {
         DetermineInternalDroneConfiguration();
         SetFirmwareVersionAccordingToDroneConfiguration();
         ConnectWorkers();
     }
     else
     {
         InvokeError(new Exception("Error while connecting to the drone. Have you connected to the drone network?", e.Exception));
     }
 }
コード例 #4
0
 private void networkSanityChecker_SanityChecked(object sender, NetworkSanityCheckEventArgs e)
 {
     ProcessSanityCheckResult(e);
 }
コード例 #5
0
        private void InvokeSanityCheckError(SanityCheckException exception)
        {
            NetworkSanityCheckEventArgs e = new NetworkSanityCheckEventArgs(false, exception);

            InvokeSanityCheckComplete(e);
        }
コード例 #6
0
        private void InvokeSanityCheckOk()
        {
            NetworkSanityCheckEventArgs e = new NetworkSanityCheckEventArgs(true, null);

            InvokeSanityCheckComplete(e);
        }