/// <summary> /// Override method to handle launching of a chooser for selecting lexical entries or senses. /// </summary> protected override void HandleChooser() { Form frm = FindForm(); WaitCursor wc = null; BaseGoDlg dlg = null; try { if (frm != null) wc = new WaitCursor(frm); if (m_obj is IMoAlloAdhocProhib) dlg = new LinkAllomorphDlg(); else { Debug.Assert(m_obj is IMoMorphAdhocProhib); dlg = new LinkMSADlg(); } Debug.Assert(dlg != null); dlg.SetDlgInfo(m_cache, null, m_mediator); if (dlg.ShowDialog(frm) == DialogResult.OK) AddItem(dlg.SelectedObject); } finally { if (wc != null) wc.Dispose(); if (dlg != null) dlg.Dispose(); } }
/// <summary> /// Override method to handle launching of a chooser for selecting lexical entries. /// </summary> protected override void HandleChooser() { Form frm = FindForm(); try { if (frm != null) frm.Cursor = Cursors.WaitCursor; BaseGoDlg dlg = null; if (m_obj is MoAlloAdhocProhib) dlg = new LinkAllomorphDlg(); else { Debug.Assert(m_obj is MoMorphAdhocProhib); dlg = new LinkMSADlg(); } Debug.Assert(dlg != null); dlg.SetDlgInfo(m_cache, null, m_mediator); if (dlg.ShowDialog(frm) == DialogResult.OK) TargetHvo = dlg.SelectedID; dlg.Dispose(); } finally { if (frm != null) frm.Cursor = Cursors.Default; } }