private void PreferencesToolStripMenuItem_Click(object sender, EventArgs e) { MyPreferences myPrefs = new MyPreferences(Variables.LangCode, Variables.Project, Variables.CustomProject, Variables.PHP5, Variables.Protocol) { TextBoxFont = txtEdit.Font, LowThreadPriority = LowThreadPriority, PrefFlash = _flash, PrefBeep = _beep, PrefMinimize = _minimize, PrefSaveArticleList = _saveArticleList, PrefAutoSaveEditBoxEnabled = _autoSaveEditBoxEnabled, PrefAutoSaveEditBoxFile = _autoSaveEditBoxFile, PrefAutoSaveEditBoxPeriod = AutoSaveEditBoxPeriod, PrefIgnoreNoBots = IgnoreNoBots, PrefClearPageListOnProjectChange = ClearPageListOnProjectChange, PrefShowTimer = ShowMovingAverageTimer, PrefAddUsingAWBOnArticleAction = Article.AddUsingAWBOnArticleAction, PrefSuppressUsingAWB = _suppressUsingAWB, PrefListComparerUseCurrentArticleList = _listComparerUseCurrentArticleList, PrefListSplitterUseCurrentArticleList = _listSplitterUseCurrentArticleList, PrefDBScannerUseCurrentArticleList = _dbScannerUseCurrentArticleList, PrefDiffInBotMode = doDiffInBotMode, PrefOnLoad = actionOnLoad, EnableLogging = loggingEnabled }; if (myPrefs.ShowDialog(this) == DialogResult.OK) { txtEdit.Font = myPrefs.TextBoxFont; LowThreadPriority = myPrefs.LowThreadPriority; _flash = myPrefs.PrefFlash; _beep = myPrefs.PrefBeep; _minimize = myPrefs.PrefMinimize; _saveArticleList = myPrefs.PrefSaveArticleList; _autoSaveEditBoxEnabled = myPrefs.PrefAutoSaveEditBoxEnabled; if (EditBoxSaveTimer.Enabled && !_autoSaveEditBoxEnabled) EditBoxSaveTimer.Enabled = false; AutoSaveEditBoxPeriod = myPrefs.PrefAutoSaveEditBoxPeriod; _autoSaveEditBoxFile = myPrefs.PrefAutoSaveEditBoxFile; _suppressUsingAWB = myPrefs.PrefSuppressUsingAWB; Article.AddUsingAWBOnArticleAction = myPrefs.PrefAddUsingAWBOnArticleAction; IgnoreNoBots = myPrefs.PrefIgnoreNoBots; ClearPageListOnProjectChange = myPrefs.PrefClearPageListOnProjectChange; ShowMovingAverageTimer = myPrefs.PrefShowTimer; _listComparerUseCurrentArticleList = myPrefs.PrefListComparerUseCurrentArticleList; _listSplitterUseCurrentArticleList = myPrefs.PrefListSplitterUseCurrentArticleList; _dbScannerUseCurrentArticleList = myPrefs.PrefDBScannerUseCurrentArticleList; doDiffInBotMode = myPrefs.PrefDiffInBotMode; actionOnLoad = myPrefs.PrefOnLoad; loggingEnabled = myPrefs.EnableLogging; if (myPrefs.Language != Variables.LangCode || myPrefs.Project != Variables.Project || (myPrefs.CustomProject != Variables.CustomProject) || (myPrefs.Protocol != Variables.Protocol)) { Variables.PHP5 = myPrefs.PrefPHP5; SetProject(myPrefs.Language, myPrefs.Project, myPrefs.CustomProject, myPrefs.Protocol); BotMode = false; lblOnlyBots.Visible = true; if (ClearPageListOnProjectChange) listMaker.Clear(); DisableButtons(); } } }
private void PreferencesToolStripMenuItem_Click(object sender, EventArgs e) { MyPreferences myPrefs = new MyPreferences(Variables.LangCode, Variables.Project, Variables.CustomProject, txtEdit.Font, LowThreadPriority, Flash, Beep, Minimize, SaveArticleList, TimeOut, AutoSaveEditBoxEnabled, AutoSaveEditBoxFile, AutoSaveEditBoxPeriod, SuppressUsingAWB, AddUsingAWBOnArticleAction, IgnoreNoBots, ShowMovingAverageTimer, Variables.PHP5); if (myPrefs.ShowDialog(this) == DialogResult.OK) { txtEdit.Font = myPrefs.TextBoxFont; LowThreadPriority = myPrefs.LowThreadPriority; Flash = myPrefs.PrefFlash; Beep = myPrefs.PrefBeep; Minimize = myPrefs.PrefMinimize; SaveArticleList = myPrefs.PrefSaveArticleList; TimeOut = myPrefs.PrefTimeOutLimit; AutoSaveEditBoxEnabled = myPrefs.PrefAutoSaveEditBoxEnabled; AutoSaveEditBoxPeriod = myPrefs.PrefAutoSaveEditBoxPeriod; AutoSaveEditBoxFile = myPrefs.PrefAutoSaveEditBoxFile; SuppressUsingAWB = myPrefs.PrefSuppressUsingAWB; AddUsingAWBOnArticleAction = myPrefs.PrefAddUsingAWBOnArticleAction; IgnoreNoBots = myPrefs.PrefIgnoreNoBots; ShowMovingAverageTimer = myPrefs.PrefShowTimer; if (myPrefs.Language != Variables.LangCode || myPrefs.Project != Variables.Project || (myPrefs.CustomProject != Variables.CustomProject)) { Variables.PHP5 = myPrefs.PrefPHP5; SetProject(myPrefs.Language, myPrefs.Project, myPrefs.CustomProject); Variables.User.WikiStatus = false; BotMode = false; lblOnlyBots.Visible = true; Variables.User.IsBot = false; Variables.User.IsAdmin = false; CreateEditor(); } } ListMaker.AddRemoveRedirects(); }
private void OpenPreferences(bool focusSiteTab) { MyPreferences myPrefs = new MyPreferences(Variables.LangCode, Variables.Project, Variables.CustomProject, Variables.Protocol) { TextBoxFont = txtEdit.Font, LowThreadPriority = LowThreadPriority, PrefFlash = _flash, PrefBeep = _beep, PrefMinimize = _minimize, PrefSaveArticleList = _saveArticleList, PrefAutoSaveEditBoxEnabled = _autoSaveEditBoxEnabled, PrefAutoSaveEditBoxFile = _autoSaveEditBoxFile, PrefAutoSaveEditBoxPeriod = AutoSaveEditBoxPeriod, PrefIgnoreNoBots = IgnoreNoBots, PrefClearPageListOnProjectChange = ClearPageListOnProjectChange, PrefShowTimer = ShowMovingAverageTimer, PrefAddUsingAWBOnArticleAction = Article.AddUsingAWBOnArticleAction, PrefSuppressUsingAWB = _suppressUsingAWB, PrefListComparerUseCurrentArticleList = _listComparerUseCurrentArticleList, PrefListSplitterUseCurrentArticleList = _listSplitterUseCurrentArticleList, PrefDBScannerUseCurrentArticleList = _dbScannerUseCurrentArticleList, PrefDiffInBotMode = doDiffInBotMode, // show edit page no longer available as an option PrefOnLoad = actionOnLoad == 2 ? 0 : actionOnLoad, EnableLogging = loggingEnabled, FocusSiteTab = focusSiteTab, PrefDomain = Variables.LoginDomain, AlertPreferences = alertPreferences }; if (myPrefs.ShowDialog(this) == DialogResult.OK) { txtEdit.Font = myPrefs.TextBoxFont; LowThreadPriority = myPrefs.LowThreadPriority; _flash = myPrefs.PrefFlash; _beep = myPrefs.PrefBeep; _minimize = myPrefs.PrefMinimize; _saveArticleList = myPrefs.PrefSaveArticleList; _autoSaveEditBoxEnabled = myPrefs.PrefAutoSaveEditBoxEnabled; if (EditBoxSaveTimer.Enabled && !_autoSaveEditBoxEnabled) EditBoxSaveTimer.Enabled = false; AutoSaveEditBoxPeriod = myPrefs.PrefAutoSaveEditBoxPeriod; _autoSaveEditBoxFile = myPrefs.PrefAutoSaveEditBoxFile; _suppressUsingAWB = myPrefs.PrefSuppressUsingAWB; Article.AddUsingAWBOnArticleAction = myPrefs.PrefAddUsingAWBOnArticleAction; IgnoreNoBots = myPrefs.PrefIgnoreNoBots; ClearPageListOnProjectChange = myPrefs.PrefClearPageListOnProjectChange; ShowMovingAverageTimer = myPrefs.PrefShowTimer; _listComparerUseCurrentArticleList = myPrefs.PrefListComparerUseCurrentArticleList; _listSplitterUseCurrentArticleList = myPrefs.PrefListSplitterUseCurrentArticleList; _dbScannerUseCurrentArticleList = myPrefs.PrefDBScannerUseCurrentArticleList; doDiffInBotMode = myPrefs.PrefDiffInBotMode; actionOnLoad = myPrefs.PrefOnLoad; loggingEnabled = myPrefs.EnableLogging; Variables.LoginDomain = myPrefs.PrefDomain; alertPreferences = myPrefs.AlertPreferences; if (myPrefs.Language != Variables.LangCode || myPrefs.Project != Variables.Project || (myPrefs.CustomProject != Variables.CustomProject) || (myPrefs.Protocol != Variables.Protocol)) { SetProject(myPrefs.Language, myPrefs.Project, myPrefs.CustomProject, myPrefs.Protocol); BotMode = false; lblOnlyBots.Visible = true; if (ClearPageListOnProjectChange) listMaker.Clear(); DisableButtons(); } } }
private void PreferencesToolStripMenuItem_Click(object sender, EventArgs e) { MyPreferences myPrefs = new MyPreferences(Variables.LangCode, Variables.Project, Variables.CustomProject, txtEdit.Font, LowThreadPriority, Flash, Beep, Minimize, SaveArticleList, TimeOut, AutoSaveEditBoxEnabled, AutoSaveEditBoxFile, AutoSaveEditBoxPeriod, SupressUsingAWB); if (myPrefs.ShowDialog(this) == DialogResult.OK) { txtEdit.Font = myPrefs.TextBoxFont; LowThreadPriority = myPrefs.LowThreadPriority; Flash = myPrefs.PerfFlash; Beep = myPrefs.PerfBeep; Minimize = myPrefs.PerfMinimize; SaveArticleList = myPrefs.PerfSaveArticleList; TimeOut = myPrefs.PerfTimeOutLimit; AutoSaveEditBoxEnabled = myPrefs.PerfAutoSaveEditBoxEnabled; AutoSaveEditBoxPeriod = myPrefs.PerfAutoSaveEditBoxPeriod; AutoSaveEditBoxFile = myPrefs.PerfAutoSaveEditBoxFile; SupressUsingAWB = myPrefs.PerfSupressUsingAWB; if (myPrefs.Language != Variables.LangCode || myPrefs.Project != Variables.Project || myPrefs.CustomProject != Variables.CustomProject) { SetProject(myPrefs.Language, myPrefs.Project, myPrefs.CustomProject); Variables.User.WikiStatus = false; BotMode = false; lblOnlyBots.Visible = true; Variables.User.IsBot = false; Variables.User.IsAdmin = false; } } myPrefs = null; listMaker1.AddRemoveRedirects(); }