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 button_Click(object sender, RoutedEventArgs e) { if (sender == m_btnDisconnect) { api_.Dispose(); api_ = null; CreateKiwoomApi(); button.IsEnabled = true; m_btnDisconnect.IsEnabled = false; } else if (sender == button) { if (!api_.IsConnected) { api_.Connect(); } } else if (sender == m_btnRequestCondition) { if (!api_.IsConnected) { MessageBox.Show("접속상태가 아닙니다."); return; } RefreshSearchConditionCombobox(ref m_cbSearchCondition); } }