private static void DisplayEntriesRecursive(FdoCache cache, IWin32Window owner, Mediator mediator, IVwStylesheet stylesheet, IHelpTopicProvider helpProvider, string helpFileKey, List<ILexEntry> entries, ITsString tssWf) { // Loop showing the SummaryDialogForm as long as the user clicks the Other button // in that dialog. bool otherButtonClicked = false; do { using (var sdform = new SummaryDialogForm(new List<int>(entries.Select(le => le.Hvo)), tssWf, helpProvider, helpFileKey, stylesheet, cache, mediator)) { SetCurrentModalForm(sdform); if (owner == null) sdform.StartPosition = FormStartPosition.CenterScreen; sdform.ShowDialog(owner); if (sdform.ShouldLink) sdform.LinkToLexicon(); otherButtonClicked = sdform.OtherButtonClicked; } if (otherButtonClicked) { // Look for another entry to display. (If the user doesn't select another // entry, loop back and redisplay the current entry.) var entry = ShowFindEntryDialog(cache, mediator, tssWf, owner); if (entry != null) { // We need a list that contains the entry we found to display on the // next go around of this loop. entries = new List<ILexEntry>(); entries.Add(entry); tssWf = entry.HeadWord; } } } while (otherButtonClicked); }
private void ReorderItems(List<ICmObject> vals) { if (RootPropertyIsRealRefSequence()) { // Since we are re-ordering, presume all objects are replaced by the entire new value. Cache.DomainDataByFlid.Replace(m_rootObj.Hvo, m_rootFlid, 0, vals.Count, vals.Select(obj => obj.Hvo).ToArray(), vals.Count); } else { VirtualOrderingServices.SetVO(m_rootObj, m_rootFlid, vals); } }