private void PopulateSendingPModeCombobox() { if (_sendPModeWatcher != null) { _sendPModeWatcher.Stop(); PModeCombobox.ItemsSource = new string[] { }; } if (String.IsNullOrWhiteSpace(SendingPModeLocationTextBox.Text)) { return; } _sendPModeWatcher = new PModeWatcher <SendingProcessingMode>(SendingPModeLocationTextBox.Text); _sendPModeWatcher.Start(); PModeCombobox.ItemsSource = _sendPModeWatcher.GetPModes().OrderBy(p => p.Id); }
private void Dispose(bool disposing) { if (!disposing) { return; } _agentConfigs.Clear(); if (_sendingPModeWatcher != null) { _sendingPModeWatcher.Stop(); _sendingPModeWatcher.Dispose(); } if (_receivingPModeWatcher != null) { _receivingPModeWatcher.Stop(); _receivingPModeWatcher.Dispose(); } }