예제 #1
0
        private void browserDesign_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            modifiedDocument = true;

            if (e.KeyData == (Keys.Control | Keys.F))
            {
                modeTabs.SelectedTab = tabEditor;
                FindReplaceDialog dlgFind = new FindReplaceDialog();
                dlgFind.Scintilla = editor;
                dlgFind.ShowDialog();
                dlgFind.Activate();
                dlgFind.Focus();
                return;
            }
        }
예제 #2
0
 private void ZoomToFileIfNeeded(IScript script, 
     ref IScriptEditorControl scriptEditorControl,
     ScriptTokenReference scriptTokenReference, bool showAll)
 {
     if (showAll && !_dialog.IsReplace) return;
     if (TextToFindIsCurrentlySelected(scriptEditorControl))
     {
         int startPos = scriptEditorControl.CursorPosition - _dialog.TextToFind.Length;
         Factory.GUIController.ZoomToFile(script.FileName, ZoomToFileZoomType.ZoomToCharacterPosition,
             startPos, false, false, null, false);
         scriptEditorControl = Factory.GUIController.GetScriptEditorControl(script.FileName, false);
         scriptEditorControl.SetSelection(startPos, _dialog.TextToFind.Length);                
         scriptEditorControl.ActivateTextEditor();
         _dialog.Activate();
     }
 }