public CheckByListController(Preferences prefs, StatusBarController statusBarController,
                              RegexControl regexControl,
                              CheckResultControl resultControl, EditableListControl targetTextsList,
                              CheckClearToolBarControl checkClearToolBarControl,
                              EditToolBarControl editToolBarControl,
                              ListToolBarControl listToolBarControl)
     : base(statusBarController, regexControl, resultControl, checkClearToolBarControl, editToolBarControl) {
     _targetTestsList = targetTextsList;
     _prefs = prefs;
     _targetTestsList.keepTextAfterAddition = _prefs.KeepTextAfterAddition;
     _listToolBarControl = listToolBarControl;
     ListViewItem listViewItem = new ListViewItem();
     _resultColor.defaultBackColor = listViewItem.BackColor;
     _resultColor.defaultForeColor = listViewItem.ForeColor;
     _targetTestsList.onShowMessage += new ShowMessageEventHandler(TargetTestsList_onShowMessage);
     _listToolBarControl.onPasteList += new EditionEventHandler(PasteList);
     _listToolBarControl.onAppendList += new EditionEventHandler(AppendList);
     _listToolBarControl.onLoadList += new EditionEventHandler(LoadList);
     _listToolBarControl.onSaveList += new EditionEventHandler(SaveList);
     _targetTestsList.onKeepTextAfterAdditionFlagChanged +=
         new EditionEventHandler(TargetTestsList_onKeepTextAfterAdditionFlagChanged);
 }
Exemple #2
0
 private void InitControllers(Preferences prefs) {
     _mainController = new MainController(helpProvider, (Bitmap) Label2.Image);
     _statusBarController = new StatusBarController(statusBar);
     tabIsMatch.Tag = new IsMatchController(_statusBarController, regexControl,
                                            checkResultIsMatchControl,
                                            targetTextIsMatchField,
                                            checkClearIsMatchToolBarControl,
                                            editIsMatchToolBarControl);
     tabMatches.Tag = new MatchesController(_mainController, _statusBarController, regexControl,
                                            checkResultMatchesControl,
                                            matchesTargetControl,
                                            matchesResultControl,
                                            checkClearMatchesToolBarControl,
                                            editMatchesToolBarControl,
                                            fileToolBarControl);
     tabCheckByList.Tag = new CheckByListController(prefs, _statusBarController, regexControl,
                                                    checkResultCheckByListControl,
                                                    targetTextsListControl,
                                                    checkClearCheckByListToolBarControl,
                                                    editCheckByListToolBarControl,
                                                    listCheckByListToolBarControl);
 }
Exemple #3
0
 private void InitCheckedMenuItemsBy(Preferences prefs) {
     RegexBarsVisible = miRegexOptions.Checked = prefs.RegexOptions;
     ToolBarsVisible = miToolBars.Checked = prefs.ToolBars;
     miHighlightResultsInList.Checked = prefs.HighlightResultsInList;
     miRegexPatternDescription.Checked = prefs.RegexPatternsDescriptionIsVisible;
     miCaptionsResultPattern.Checked = prefs.RegexPatternsResultIsVisible;
 }
Exemple #4
0
 private void InitModesTabPagesBy(Preferences prefs) {
     InitModesTabPagesBy((RegexWorkModes) prefs.LastActiveModeAsInt);
 }
Exemple #5
0
 private void InitControls(Preferences prefs) {
     regexControl.Preferences = prefs;
     regexControl.RegexOptionsHolder = regexOptionsControl.regexOptionsHolder;
 }
 private void InitFor(Preferences prefs) {
     cbToolBars.Checked = prefs.ToolBars;
     cbRegexOptions.Checked = prefs.RegexOptions;
     cbHighlightResultsInList.Checked = prefs.HighlightResultsInList;
     cbShowOpenFileDialog.Checked = prefs.ShowOpenFileDialog;
     cbConfirmOnExit.Checked = prefs.ConfimOnExit;
     cbConfirmOnDeletion.Checked = prefs.ConfimOnDeletion;
     numMaxRecentFiles.Value = prefs.MaxRecentFilesQuantity;
     numMaxRegexPatternHistory.Value = prefs.MaxRegexPatternHistoryLength;
     numMaxRegexPatternFavorites.Value = prefs.MaxRegexPatternFavoritesLength;
     cbAdvancedPreferences.Checked = prefs.AdvancedPreferences;
     cbReplaceDuplicatesInHistory.Checked = prefs.ReplaceDoublicatedPatternsInHistory;
     cbShowAllTabPagesInRegexPatternsDialog.Checked = prefs.ShowAllRegexPatternsTabs;
     cbShowAllModesTabs.Checked = prefs.ShowAllModesTabs;
     cbAddNewCaptionsToResources.Checked = prefs.AddNewCaptionsToResource;
     cbTextBox.Checked = LangBase.AddTextBoxContent;
     cbListControl.Checked = LangBase.AddListControlContent;
     cbListView.Checked = LangBase.AddListViewContent;
     cbStatusBar.Checked = LangBase.AddStatusBarContent;
     cbDomainUpDown.Checked = LangBase.AddDomainUpDownContent;
 }
 public void ApplayTo(Preferences prefs) {
     prefs.ToolBars = cbToolBars.Checked;
     prefs.RegexOptions = cbRegexOptions.Checked;
     prefs.HighlightResultsInList = cbHighlightResultsInList.Checked;
     prefs.ShowOpenFileDialog = cbShowOpenFileDialog.Checked;
     prefs.ConfimOnExit = cbConfirmOnExit.Checked;
     prefs.ConfimOnDeletion = cbConfirmOnDeletion.Checked;
     prefs.MaxRecentFilesQuantity = (int) numMaxRecentFiles.Value;
     prefs.MaxRegexPatternHistoryLength = (int) numMaxRegexPatternHistory.Value;
     prefs.MaxRegexPatternFavoritesLength = (int) numMaxRegexPatternFavorites.Value;
     prefs.AdvancedPreferences = cbAdvancedPreferences.Checked;
     prefs.ReplaceDoublicatedPatternsInHistory = cbReplaceDuplicatesInHistory.Checked;
     prefs.ShowAllRegexPatternsTabs = cbShowAllTabPagesInRegexPatternsDialog.Checked;
     prefs.ShowAllModesTabs = cbShowAllModesTabs.Checked;
     LangBase.AddNewCaptionsToResource = cbAddNewCaptionsToResources.Checked;
     LangBase.AddTextBoxContent = cbTextBox.Checked;
     LangBase.AddListControlContent = cbListControl.Checked;
     LangBase.AddListViewContent = cbListView.Checked;
     LangBase.AddStatusBarContent = cbStatusBar.Checked;
     LangBase.AddDomainUpDownContent = cbDomainUpDown.Checked;
     prefs.Save();
 }