コード例 #1
0
        private bool WordIsFoundReverse(IFindDialogModel model, string word)
        {
            model.Query = word;
            model.SearchDisplayedConversation(SearchDirection.Up);

            return(model.LastQuerySuccessful);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        private static void GetConversationDialogModel(out MockConversationSearchTarget searchTarget, out IFindDialogModel findDialogModel)
        {
            searchTarget = new MockConversationSearchTarget();
            searchTarget.SearchTargetControl = GetConversationRichTextBox();

            findDialogModel = new FindDialogModel(searchTarget);
        }
コード例 #4
0
        private bool WordIsFoundMatchCase(IFindDialogModel model, string word)
        {
            model.CaseSensitive = true;

            return(WordIsFound(model, word));
        }
コード例 #5
0
        private int WordInstancesFoundMatchCase(IFindDialogModel model, MockConversationSearchTarget searchTarget, string word)
        {
            model.CaseSensitive = true;

            return(WordInstancesFound(model, searchTarget, word));
        }
コード例 #6
0
        private bool WordIsFoundReverse(IFindDialogModel model, string word)
        {
            model.Query = word;
            model.SearchDisplayedConversation(SearchDirection.Up);

            return model.LastQuerySuccessful;
        }
コード例 #7
0
        private bool WordIsFoundMatchCase(IFindDialogModel model, string word)
        {
            model.CaseSensitive = true;

            return WordIsFound(model, word);
        }
コード例 #8
0
        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;
        }
コード例 #9
0
        private int WordInstancesFoundMatchCase(IFindDialogModel model, MockConversationSearchTarget searchTarget, string word)
        {
            model.CaseSensitive = true;

            return WordInstancesFound(model, searchTarget, word);
        }
コード例 #10
0
        private static void GetSingleLineDialogModel(out MockConversationSearchTarget searchTarget, out IFindDialogModel findDialogModel)
        {
            searchTarget = new MockConversationSearchTarget();
            searchTarget.SearchTargetControl = GetSingleLineRichTextBox();

            findDialogModel = new FindDialogModel(searchTarget);
        }