private void InvokeSanityCheckComplete(NetworkSanityCheckEventArgs e) { if (SanityCheckComplete != null) { SanityCheckComplete.Invoke(this, e); } }
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)); } }
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)); } }
private void networkSanityChecker_SanityChecked(object sender, NetworkSanityCheckEventArgs e) { ProcessSanityCheckResult(e); }
private void InvokeSanityCheckError(SanityCheckException exception) { NetworkSanityCheckEventArgs e = new NetworkSanityCheckEventArgs(false, exception); InvokeSanityCheckComplete(e); }
private void InvokeSanityCheckOk() { NetworkSanityCheckEventArgs e = new NetworkSanityCheckEventArgs(true, null); InvokeSanityCheckComplete(e); }