private void ConnectVsmd() { if (m_connectForm == null || m_connectForm.IsClosed) { m_connectForm = new ConnectVsmd(InitVsmdConnectionCB); m_connectForm.MdiParent = this; m_connectForm.Show(); } else { m_connectForm.Focus(); } }
private void InitVsmdConnectionCB(InitResult initRet) { if (initRet.IsSuccess) { StatusBar.DisplayMessage(MessageType.Info, "设备连接成功!"); if (m_dripForm == null) { m_dripForm = new DripFrm(); m_dripForm.MdiParent = this; m_dripForm.Show(); m_connectForm.Close(); m_connectForm = null; } } else { StatusBar.DisplayMessage(MessageType.Error, initRet.Message); } }