protected override void HandleChooser() { using (var dlg = new RecordGoDlg()) { var wp = new WindowParams { m_title = LexEdStrings.ksIdentifyRecord, m_btnText = LexEdStrings.ks_Add }; dlg.SetDlgInfo(m_cache, wp, m_mediator); dlg.SetHelpTopic(Slice.GetChooserHelpTopicID()); if (dlg.ShowDialog(FindForm()) == DialogResult.OK) AddItem(dlg.SelectedObject); } }
/// <summary> /// Handles the xCore message to go to or link to a lexical entry. /// </summary> /// <param name="argument">The xCore Command object.</param> /// <returns>true</returns> public bool OnGotoRecord(object argument) { CheckDisposed(); using (var dlg = new RecordGoDlg()) { var cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); Debug.Assert(cache != null); dlg.SetDlgInfo(cache, null, m_mediator); if (dlg.ShowDialog() == DialogResult.OK) { m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedObject.Hvo); } } return(true); }
/// <summary> /// Handles the xCore message to go to or link to a lexical entry. /// </summary> /// <param name="argument">The xCore Command object.</param> /// <returns>true</returns> public bool OnGotoRecord(object argument) { CheckDisposed(); using (var dlg = new RecordGoDlg()) { var cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); Debug.Assert(cache != null); dlg.SetDlgInfo(cache, null, m_mediator); if (dlg.ShowDialog() == DialogResult.OK) m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedObject.Hvo); } return true; }