private FindAndReplace() { _editor = Editor.GetActive(); _window = new FindAndReplaceForm { FindHistory = Settings.FindHistory.ToArray(), ReplaceHistory = Settings.ReplaceHistory.ToArray(), MatchCase = Settings.MatchCase, MatchWholeWord = Settings.MatchWholeWord, UseRegularExpression = Settings.UseRegularExpression, SearchFromBegining = Settings.SearchFromBegining, SearchBackwards = Settings.SearchBackwards, SearchIn = Settings.SearchIn }; if (!Settings.WindowSize.IsEmpty) { _window.ClientSize = Settings.WindowSize; } if (!Settings.WindowLocation.IsEmpty) { _window.StartPosition = FormStartPosition.Manual; _window.Location = Settings.WindowLocation; } _window.DoAction += OnDoAction; _owner = new WindowWrapper(PluginBase.nppData._nppHandle); }
private FindAndReplace() { _editor = Editor.GetActive(); if (FindHistory == null) FindHistory = new List<string>(); if (ReplaceHistory == null) ReplaceHistory = new List<string>(); _window = new FindAndReplaceForm { FindHistory = FindHistory.ToArray(), ReplaceHistory = ReplaceHistory.ToArray(), MatchCase = MatchCase, MatchWholeWord = MatchWholeWord, UseRegularExpression = UseRegularExpression, SearchFromBegining = SearchFromBegining, SearchBackwards = SearchBackwards, SearchIn = SearchInOptions.CurrentDocument }; _window.DoAction += OnDoAction; _owner = new WindowWrapper(PluginBase.nppData._nppHandle); }