public void ApplySettings() { treeView1.Indent = 10; treeView1.DrawMode = TreeViewDrawMode.OwnerDrawAll; treeView1.ShowLines = false; treeView1.Font = Settings.TreeFont ?? Font; taskListDataGrid.Font = treeView1.Font; // Colors var tp = ThemeProvider.Deserialize(Settings.ThemeSettingsSerialized); _colorTable = tp.CurrentTheme.Colors; var colorHash = _colorTable.GetHash(); if (_colorTableHash == colorHash) { return; } _colorTableHash = colorHash; BackColor = _colorTable.ControlBackground; ForeColor = _colorTable.ControlText; treeView1.BackColor = _colorTable.WindowBackground; treeView1.ForeColor = _colorTable.WindowText; lbTaskList.ForeColor = _colorTable.TabText; taskListDataGrid.BackColor = _colorTable.WindowBackground; taskListDataGrid.BackgroundColor = _colorTable.WindowBackground; taskListDataGrid.ForeColor = _colorTable.WindowText; taskListDataGrid.GridColor = _colorTable.GridLines; taskListDataGrid.RowsDefaultCellStyle.BackColor = _colorTable.WindowBackground; taskListDataGrid.RowsDefaultCellStyle.ForeColor = _colorTable.WindowText; toolStrip2.BackColor = _colorTable.MenuBackground; }
public void InitSettings() { chTrackActiveItem.Checked = Settings.Default.TrackActiveItem; edExtensions.Text = string.Join(" ", Settings.Default.Extensions.OfType <string>().Select(s => s.Replace(".", "")).ToArray()); chScriptStripEnabled.Checked = Settings.Default.ScriptStripEnabled; edScriptStripEtensions.Text = string.Join(" ", Settings.Default.ScriptStripExtensions.OfType <string>().Select(s => s.Replace(".", "")).ToArray()); var treeFont = Settings.Default.TreeFont ?? _defaultTreeFont; btnSelectTreeFont.Text = treeFont.Name + " (" + treeFont.Size + ")"; btnSelectTreeFont.Font = treeFont; taggedFuncLabel2.Font = treeFont; taggedFuncLabel3.Font = treeFont; taggedFuncLabel4.Font = treeFont; taggedFuncLabel5.Font = treeFont; taggedFuncLabel6.Font = treeFont; colorPicker2.SelectedColor = Settings.Default.taggedFunction2Color; colorPicker3.SelectedColor = Settings.Default.taggedFunction3Color; colorPicker4.SelectedColor = Settings.Default.taggedFunction4Color; colorPicker5.SelectedColor = Settings.Default.taggedFunction5Color; colorPicker6.SelectedColor = Settings.Default.taggedFunction6Color; numericUpDownMaxParametersLength.Value = Settings.Default.MaxParametersLength; numericUpDownMaxParametersLengthInFunctionChain.Value = Settings.Default.MaxParametersLengthInFunctionChain; chSendStatistics.Checked = Settings.Default.SendStatistics; chFixAspNet.Checked = Settings.Default.FixAspNetTags; edFixAspNetExtensions.Text = string.Join(" ", Settings.Default.FixAspNetTagsExtensions.OfType <string>().Select(s => s.Replace(".", "")).ToArray()); chFixRazor.Checked = Settings.Default.FixRazorSyntax; edFixRazorExtensions.Text = string.Join(" ", Settings.Default.FixRazorSyntaxExtensions.OfType <string>().Select(s => s.Replace(".", "")).ToArray()); edToDoKeyWords.Text = String.Join(", ", Settings.Default.ToDoKeywords.OfType <string>().ToArray()); chShowErrorNotificationOnTopOfTheEditor.Checked = Settings.Default.ShowErrorsNotificationOnTopOfEditor; var themesSerialized = Settings.Default.ThemeSettingsSerialized; _themeProvider = ThemeProvider.Deserialize(themesSerialized); ReInitThemesComboBox(); }