Exemple #1
0
 public IncrementalSearchBase(TempSettings tempSettings, string name, string submenu, FindInFilesDialog.Data findInFilesData)
 {
     this.tempSettings    = tempSettings;
     this.name            = name;
     this.submenu         = submenu;
     this.findInFilesData = findInFilesData;
 }
    public DialogManager(MainForm mainForm, TempSettings tempSettings)
    {
        this.mainForm     = mainForm;
        this.tempSettings = tempSettings;
        frames            = mainForm.frames;
        closeMethods      = new List <Getter <bool, bool> >();

        KeyMap keyMap = mainForm.KeyMap;

        keyMap.AddItem(new KeyItem(Keys.Control | Keys.OemSemicolon, null,
                                   new KeyAction("&View\\Open/close command dialog", DoInputCommand, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.OemSemicolon, null,
                                   new KeyAction("&View\\Open/close command dialog (no history)", DoInputCommandNoHistory, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.OemMinus, null,
                                   new KeyAction("&View\\Set syntax…", DoSetSyntax, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.OemMinus, null,
                                   new KeyAction("&View\\Reset syntax", DoResetSyntax, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Oemplus, null,
                                   new KeyAction("&View\\Set save encoding…", DoSetSaveEncoding, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.OemPipe, null,
                                   new KeyAction("&View\\Reload with encoding…", DoReloadWithEncoding, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.C, null,
                                   new KeyAction("&View\\Preview color scheme…", DoSchemeIncrementalSearch, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.F, null,
                                   new KeyAction("F&ind\\Find…", DoFind, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.F, null,
                                   new KeyAction("F&ind\\Find in files…", DoFindInFiles, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.H, null,
                                   new KeyAction("F&ind\\Replace…", DoReplace, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.G, null,
                                   new KeyAction("F&ind\\Go to line…", DoGoToLine, null, false)));
        keyMap.AddItem(new KeyItem(Keys.None, null, new KeyAction("F&ind\\-", null, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.P, null,
                                   new KeyAction("F&ind\\File incremental search…", DoFileIncrementalSearch, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.O, null,
                                   new KeyAction("F&ind\\Recently incremental search…", DoRecentlyIncrementalSearch, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.G, null,
                                   new KeyAction("F&ind\\Recently dirs incremental search…", DoRecentlyDirsIncrementalSearch, null, false)));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.Shift | Keys.P, null,
                                   new KeyAction("F&ind\\Menu item incremental search…", DoMenuItemIncrementalSearch, null, false)));
        KeyAction escape = new KeyAction("F&ind\\Close dialogs", DoCloseDialogs, null, false);

        keyMap.AddItem(new KeyItem(Keys.Escape, null, escape));
        keyMap.AddItem(new KeyItem(Keys.Control | Keys.OemOpenBrackets, null, escape));

        info = new DialogOwner <InfoDialog>(this);
        fileIncrementalSearch         = new DialogOwner <FileIncrementalSearch>(this);
        recentlyIncrementalSearch     = new DialogOwner <RecentlyIncrementalSearch>(this);
        recentlyDirsIncrementalSearch = new DialogOwner <RecentlyDirsIncrementalSearch>(this);
        menuItemIncrementalSearch     = new DialogOwner <MenuItemIncrementalSearch>(this);
        syntaxIncrementalSearch       = new DialogOwner <SyntaxIncrementalSearch>(this);
        snippetIncrementalSearch      = new DialogOwner <SnippetIncrementalSearch>(this);
        saveEncodingIncrementalSearch = new DialogOwner <EncodingIncrementalSearch>(this);
        loadEncodingIncrementalSearch = new DialogOwner <EncodingIncrementalSearch>(this);
        schemeIncrementalSearch       = new DialogOwner <SchemeIncrementalSearch>(this);
        command         = new DialogOwner <CommandDialog>(this);
        find            = new DialogOwner <FindDialog>(this);
        viFind          = new DialogOwner <ViFindDialog>(this);
        findData        = new FindDialog.Data(tempSettings.FindHistory);
        findInFiles     = new DialogOwner <FindInFilesDialog>(this);
        findInFilesData = new FindInFilesDialog.Data(tempSettings.FindInFilesHistory, tempSettings.FindInFilesTempFilter, tempSettings.FindInFilesTempCurrentFilter);
        replace         = new DialogOwner <ReplaceDialog>(this);
        replaceData     = new ReplaceDialog.Data(tempSettings.ReplacePatternHistory, tempSettings.ReplaceHistory);
        goToLine        = new DialogOwner <FindDialog>(this);
        goToLineData    = new FindDialog.Data(tempSettings.GoToLineHistory);
        input           = new DialogOwner <FindDialog>(this);
        inputData       = new FindDialog.Data(null);
        rename          = new DialogOwner <RenameDialog>(this);
        moveData        = new MoveDialog.Data(tempSettings.MoveHistory);
        move            = new DialogOwner <MoveDialog>(this);
    }
 public FileIncrementalSearch(TempSettings tempSettings, FindInFilesDialog.Data data)
     : base(tempSettings, "File search", "Incremental file search", data)
 {
 }