private bool WordIsFoundReverse(IFindDialogModel model, string word) { model.Query = word; model.SearchDisplayedConversation(SearchDirection.Up); return(model.LastQuerySuccessful); }
private int WordInstancesFoundReverse(IFindDialogModel model, MockConversationSearchTarget searchTarget, string word) { int instancesFound = 0; int lastMatchIndex = int.MaxValue; while (model.LastQuerySuccessful) { model.Query = word; model.SearchDisplayedConversation(SearchDirection.Up); if (!model.LastQuerySuccessful || (searchTarget.MatchIndex > lastMatchIndex)) { break; } else { lastMatchIndex = searchTarget.MatchIndex; } instancesFound++; } return(instancesFound); }
private static void GetConversationDialogModel(out MockConversationSearchTarget searchTarget, out IFindDialogModel findDialogModel) { searchTarget = new MockConversationSearchTarget(); searchTarget.SearchTargetControl = GetConversationRichTextBox(); findDialogModel = new FindDialogModel(searchTarget); }
private bool WordIsFoundMatchCase(IFindDialogModel model, string word) { model.CaseSensitive = true; return(WordIsFound(model, word)); }
private int WordInstancesFoundMatchCase(IFindDialogModel model, MockConversationSearchTarget searchTarget, string word) { model.CaseSensitive = true; return(WordInstancesFound(model, searchTarget, word)); }
private bool WordIsFoundReverse(IFindDialogModel model, string word) { model.Query = word; model.SearchDisplayedConversation(SearchDirection.Up); return model.LastQuerySuccessful; }
private bool WordIsFoundMatchCase(IFindDialogModel model, string word) { model.CaseSensitive = true; return WordIsFound(model, word); }
private int WordInstancesFoundReverse(IFindDialogModel model, MockConversationSearchTarget searchTarget, string word) { int instancesFound = 0; int lastMatchIndex = int.MaxValue; while (model.LastQuerySuccessful) { model.Query = word; model.SearchDisplayedConversation(SearchDirection.Up); if (!model.LastQuerySuccessful || (searchTarget.MatchIndex > lastMatchIndex)) { break; } else { lastMatchIndex = searchTarget.MatchIndex; } instancesFound++; } return instancesFound; }
private int WordInstancesFoundMatchCase(IFindDialogModel model, MockConversationSearchTarget searchTarget, string word) { model.CaseSensitive = true; return WordInstancesFound(model, searchTarget, word); }
private static void GetSingleLineDialogModel(out MockConversationSearchTarget searchTarget, out IFindDialogModel findDialogModel) { searchTarget = new MockConversationSearchTarget(); searchTarget.SearchTargetControl = GetSingleLineRichTextBox(); findDialogModel = new FindDialogModel(searchTarget); }