private void m_btnLocate_Click(object sender, EventArgs e) { frmQueryNavigator fqn = new frmQueryNavigator(m_txtMedicineCode.Text); fqn.m_dtbMedicinDict = this.m_dtMedicineInfo; fqn.OnLocateMedicine += new LocateMedicine(fqn_OnLocateMedicine); fqn.Location = new Point(510, 95); fqn.ShowInTaskbar = false; fqn.Show(); }
private void m_btnLocate_Click(object sender, EventArgs e) { if (fqn == null || fqn.IsDisposed) { fqn = new frmQueryNavigator(m_txtMedicineCode.Text); fqn.m_dtbMedicinDict = this.m_dtMedicineInfo; fqn.OnLocateMedicine += new LocateMedicine(fqn_OnLocateMedicine); fqn.Deactivate += new EventHandler(fqn_Deactivate); fqn.Location = new Point(510, 95); fqn.ShowInTaskbar = false; fqn.TopMost = true; fqn.Show(); } else { fqn.Visible = true; fqn.m_txtMedicine.Text = m_txtMedicineCode.Text; } }