private void ShowConfig(ModuleBase configurable) { if (!configurable.HasConfig) { return; } MainWindow.DimMainWindow(true); Connection connection = Connection; DisabledEventArgs args = new DisabledEventArgs(true); bool wasEnabled = connection.IsEnabled; if (wasEnabled) { connection.Disable(args, null); } ConfigWindow config = new ConfigWindow((IWpfConfigurable)configurable); config.ShowDialog(); if (wasEnabled) { Connection.Enable(new EnablingEventArgs(true), null); } MainWindow.DimMainWindow(false); }
protected override void OnDisabled(DisabledEventArgs e) { if (skype != null) { skype.CallStatus -= callStatusEventHandler; } }
protected override void OnDisabled(DisabledEventArgs e) { if (skype != null) { skype.SmsMessageStatusChanged -= smsMessageStatusChangedEventHandler; } }
protected override void OnDisabled(DisabledEventArgs e) { if (!e.IsConfiguring) { PhidgetManager.Release <InterfaceKit>(ref ifKit); } }
protected override void OnDisabled(DisabledEventArgs e) { if (skype != null) { skype.MessageStatus -= messageStatusEventHandler; } }
protected override void OnDisabled(DisabledEventArgs e) { if (excel != null) { excel.WorkbookAfterSave -= saveWorkbookEvent; excel = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (excel != null) { excel.WorkbookOpen -= openWorkbookEvent; excel = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (powerPoint != null) { powerPoint.PresentationPrint -= printPresentationEvent; powerPoint = null; } }
/// <summary> /// This method is unsubscribing from the EApplication_AfterPresentationOpenEventHandler. /// </summary> protected override void OnDisabled(DisabledEventArgs e) { if (powerPoint != null) { powerPoint.AfterPresentationOpen -= openPresentationEvent; powerPoint = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (word != null) { word.DocumentOpen -= openDocumentEvent; word = null; } }
protected override void OnDisabled(DisabledEventArgs e) { // only release if we aren't going into the configuration menu if (!e.IsConfiguring) { PhidgetManager.Release(ref advServo); } }
protected override void OnDisabled(DisabledEventArgs e) { if (powerPoint != null) { powerPoint.PresentationCloseFinal -= closePresentationEvent; powerPoint = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (word != null) { word.DocumentBeforePrint -= printDocumentEvent; word = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (excel != null) { excel.WorkbookBeforeClose -= closeWorkbookEvent; excel = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (word != null) { word.DocumentBeforeSave -= saveDocumentEvent; word = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (excel != null) { excel.WorkbookBeforePrint -= printWorkbookEvent; excel = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (powerPoint != null) { powerPoint.WindowActivate -= activePresentationChangedEvent; powerPoint = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (outlook != null) { outlook.Reminder -= reminderEvent; outlook = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (timer != null) { timer.Stop(); timer.Elapsed -= timer_Elapsed; timer.Dispose(); } }
protected override void OnDisabled(DisabledEventArgs e) { if (outlook != null) { outlook.NewMail -= mailEvent; outlook = null; } }
protected override void OnDisabled(DisabledEventArgs e) { rfid.Tag -= RfidTag; rfid.TagLost -= LostRfidTag; if (!e.IsConfiguring) { PhidgetManager.Release <RFID>(ref rfid); } }
protected override void OnDisabled(DisabledEventArgs e) { sensor.TemperatureChange -= TemperatureChange; // only release if we aren't going into the configuration menu if (!e.IsConfiguring) { PhidgetManager.Release <TemperatureSensor>(ref sensor); } }
protected override void OnDisabled(DisabledEventArgs e) { ir.Code -= ir_Code; // only release if we aren't going into the configuration menu if (!e.IsConfiguring) { PhidgetManager.Release <IR>(ref ir); } }
protected override void OnDisabled(DisabledEventArgs e) { lyncClient = null; if (selectedContact != null) { selectedContact.ContactInformationChanged -= contactInformationChanged; selectedContact = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (!e.IsConfiguring && IsEnabled) { phoneLayout.DisableButton(button.Id); phoneConnector.Disable(); phoneConnector.EventCalled -= phoneConnector_EventCalled; ThreadPool.QueueUserWorkItem(o => phoneConnector.SetNewData()); } }
protected override void OnDisabled(DisabledEventArgs e) { if (conversationManager != null) { conversationManager.ConversationAdded -= conversationAdded; conversationManager = null; } if (lyncClient != null) { lyncClient = null; } }
/// <summary> /// This method is unsubscribing from the ContactInformationChangedEvent. /// </summary> protected override void OnDisabled(DisabledEventArgs e) { if (lyncClient != null) { foreach (Group group in lyncClient.ContactManager.Groups) { foreach (Contact contact in group) { contact.ContactInformationChanged -= contactInformationChanged; } } } }
protected override void OnDisabled(DisabledEventArgs e) { if (timer != null) { timer.Stop(); timer.Dispose(); } if (devices != null) { devices.Clear(); devices = null; } }
protected override void OnDisabled(DisabledEventArgs e) { try { this.manager.ReleasePort(this.port); } catch { /* Swallow the exception because the only times this will happen is if we * try to close a port that hasn't been opened or if it hasn't been connected with the specified action. * Aka, it was closed here before it was opened. Nothing we can do, might as well hide it */ } }
//[MethodImpl(MethodImplOptions.Synchronized)] protected override void OnDisabled(DisabledEventArgs e) { if (!e.IsConfiguring) { if (webcambuffer != null && selectedCameraIndex != -1) { webcambuffer.UnregisterForImages(WebcamManager.GetCamera(selectedCameraIndex)); ReleasePreviousBuffers(); WebcamManager.ReleaseInactiveCameras(); if (callbacksRegistered) { WebcamManager.UnregisterWebcamConnectionEvent(OnCameraConnected); WebcamManager.UnregisterWebcamRemovalEvent(OnCameraDisconnected); callbacksRegistered = false; } } } }
protected override void OnDisabled(DisabledEventArgs e) { base.OnDisabled(e); lock (Lock) { Done = true; } if (PollingThread != null) { PollingThread.Join(); PollingThread = null; } }
protected override void OnDisabled(DisabledEventArgs e) { if (device != null) device.DeviceStatusChanged -= device_DeviceStatusChanged; }
protected override void OnDisabled(DisabledEventArgs e) { base.OnDisabled(e); }