Example #1
0
 public void FindNext()
 {
     if (currentFindCriteria == null)
     {
         currentFindCriteria = ComposeFindCriteria();
         if (currentFindCriteria != null && !parentForm.FindNextTraceRecord(currentFindCriteria))
         {
             MessageBox.Show(this, SR.GetString("Find_NoFound"), parentForm.DefaultWindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
             shouldSuppressEnterForFind = true;
         }
     }
     else if (IsIdenticalFindCriteria(currentFindCriteria))
     {
         if (!parentForm.FindNextTraceRecord(currentFindCriteria))
         {
             MessageBox.Show(this, SR.GetString("Find_NoFound"), parentForm.DefaultWindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
             shouldSuppressEnterForFind = true;
         }
     }
     else
     {
         currentFindCriteria = ComposeFindCriteria();
         if (currentFindCriteria != null && !parentForm.FindNextTraceRecord(currentFindCriteria))
         {
             MessageBox.Show(this, SR.GetString("Find_NoFound"), parentForm.DefaultWindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
             shouldSuppressEnterForFind = true;
         }
     }
     Focus();
 }
 private void Find()
 {
     if (!string.IsNullOrEmpty(findWhatList.Text) && (lookinList.SelectedIndex == 1 || lookinList.SelectedIndex == 0))
     {
         FindCriteria findCriteria = GetFindCriteria();
         AppendRecentFindString(findCriteria.FindingText);
         if (findCriteria != null)
         {
             if ((parentLeftPanelObjectStateController.CurrentStateName != "LeftPanelTreeViewState" && !parentForm.FindNextTraceRecord(findCriteria)) || (parentLeftPanelObjectStateController.CurrentStateName == "LeftPanelTreeViewState" && !parentForm.FindNextTraceRecordInSwinLanes(findCriteria)))
             {
                 uiProvider.ShowMessageBox(SR.GetString("Find_NoFound"), null, MessageBoxIcon.Exclamation, MessageBoxButtons.OK);
                 shouldSuppressEnterForFind = true;
             }
             findWhatList.Focus();
         }
     }
 }