예제 #1
0
        /// <summary>
        /// Handles the xCore message to go to a wordform.
        /// </summary>
        /// <param name="argument">The xCore Command object.</param>
        /// <returns>true</returns>
        public bool OnGotoWfiWordform(object argument)
        {
            CheckDisposed();

            using (var dlg = new WordformGoDlg())
            {
                dlg.SetDlgInfo(Cache, null, m_mediator, m_propertyTable);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedObject.Hvo);
                }
            }
            return(true);
        }
예제 #2
0
        /// <summary>
        /// Handles the xCore message to go to a reversal entry.
        /// </summary>
        /// <param name="argument">The xCore Command object.</param>
        /// <returns>true</returns>
        public bool OnGotoReversalEntry(object argument)
        {
            CheckDisposed();

            using (ReversalEntryGoDlg dlg = new ReversalEntryGoDlg())
            {
                List <IReversalIndexEntry> filteredEntries = new List <IReversalIndexEntry>();
                filteredEntries.Add(Entry);
                WindowParams wp = new WindowParams();
                wp.m_btnText = LexEdStrings.ks_GoTo;
                wp.m_label   = LexEdStrings.ks_Find_;
                wp.m_title   = LexEdStrings.ksFindRevEntry;
                dlg.SetDlgInfo(m_mediator, wp, filteredEntries);                 // , false
                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    // Can't Go to a subentry, so we have to go to its main entry.
                    FdoCache            cache    = (FdoCache)m_mediator.PropertyTable.GetValue("cache");
                    IReversalIndexEntry selEntry = ReversalIndexEntry.CreateFromDBObject(cache, dlg.SelectedID);
                    m_mediator.BroadcastMessageUntilHandled("JumpToRecord", selEntry.MainEntry.Hvo);
                }
            }
            return(true);
        }