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); } }
private void Window_Closed(object sender, EventArgs e) { m_ctrl.Disconnect(); log.Debug("Close..."); m_ctrl.Dispose(); }