private void button_Click(object sender, RoutedEventArgs e) { if (sender == m_btnDisconnect) { m_ctrl.Disconnect(); button.IsEnabled = true; m_btnDisconnect.IsEnabled = false; } else if (sender == button) { if (!m_ctrl.IsConnected) { m_ctrl.Connect(); } } else if (sender == m_btnRequestCondition) { RefreshSearchConditionCombobox(ref m_cbSearchCondition); ConditionInfo info = (ConditionInfo)m_cbSearchCondition.SelectedValue; if (info != null) { m_ctrl.RequestSearchCondition(info); } } }
private void M_cbSearchCondition_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBox cb = (ComboBox)sender; m_grid.ItemsSource = null; ConditionInfo info = (ConditionInfo)cb.SelectedValue; if (info != null) { api_.RequestSearchCondition(info); } }