Example #1
0
 public void ShowDialogForm()
 {
     if (_wndSearch == null)
       {
     _wndSearch = new dlgFind();
     _wndSearch.toSearch += new EventHandler(OnSearch);
       }
       _wndSearch.pCmdDR = DialogResult.None;
       _wndSearch.ShowDialog();
 }
Example #2
0
 public virtual void DoCommand(TreeNode aTn, eCommand aCmd)
 {
     if (aCmd == eCommand.Find && !pUseLockFind) //���� ����� ������
     {
         dlgFind dlg = new dlgFind();
         dlg.StartPosition = FormStartPosition.CenterScreen;
         dlg.pFindText = mFindText;
         dlg.pIsMatchCase = mIsMatchCase;
         dlg.pIsWordWhole = mIsWordWhole;
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             this.Parent.Refresh();
             TreeNode tn = null;
             if (dlg.pIsDirectionForward)
                 tn = SearchByText(dlg.pFindText, dlg.pIsMatchCase, dlg.pIsWordWhole, true);
             else
                 tn = SearchByText(dlg.pFindText, dlg.pIsMatchCase, dlg.pIsWordWhole, false);
             if (tn == null)
             {
                 MessageBox.Show ("������� ����� ["+mFindText+"] �� ������!");
                 RestorePrevSelectNode();
             }
             else
             {
                 SelectedNode = tn;
                 SelectedNode.NodeFont = mFoundItemFont;
                 _prevTreeNodeSelected = tn;
             }
             SelectedNode.EnsureVisible();
         }
     }
     else if (onDoCommand != null)
         onDoCommand(this, new EvA_CasTVCommand(aTn, aCmd));
 }
Example #3
0
 void OnKeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)6)
       {
     if (_wndSearch == null)
     {
       _wndSearch = new dlgFind();
       _wndSearch.toSearch += new EventHandler(OnSearch);
     }
     _wndSearch.pCmdDR = DialogResult.None;
     _wndSearch.ShowDialog();
       }
 }