private void saveSettings() { HighlightWordProperties propHighlightWord = (HighlightWordProperties)this.propHighlightWord.SelectedObject; HighlightLineProperties propHighlightLine = (HighlightLineProperties)this.propHighlightLine.SelectedObject; singletonSettings = EditorSettings.getInstance(); // General singletonSettings.GeneralSettings.EnableBM = EnableBM.Checked; singletonSettings.GeneralSettings.EnableCL = EnableCL.Checked; singletonSettings.GeneralSettings.EnableWH = EnableWH.Checked; singletonSettings.GeneralSettings.EnableOL = EnableOL.Checked; // Highliht selected word singletonSettings.HighlightWord.BackColor = propHighlightWord.BackColor; singletonSettings.HighlightWord.FrameColor = propHighlightWord.FrameColor; singletonSettings.HighlightWord.SelectedWord = SelectedCB.Checked; // Highlight current line singletonSettings.HighlightCurrentLine.BackColor = propHighlightLine.BackColor; singletonSettings.HighlightCurrentLine.FrameColor = propHighlightLine.FrameColor; singletonSettings.HighlightCurrentLine.BackOpacity = propHighlightLine.BackOpacity; // Outlining singletonSettings.Outlining.MaxRowsInTooltip = Convert.ToInt32(nRows.Value); singletonSettings.saveChanges(); }
private void loadSettings() { singletonSettings = EditorSettings.getInstance(); HighlightWordProperties highlightWordProperties = new HighlightWordProperties(singletonSettings.HighlightWord); this.propHighlightWord.SelectedObject = highlightWordProperties; HighlightLineProperties highlightLineProperties = new HighlightLineProperties(singletonSettings.HighlightCurrentLine); this.propHighlightLine.SelectedObject = highlightLineProperties; nRows.Value = singletonSettings.Outlining.MaxRowsInTooltip; SelectedCB.Checked = singletonSettings.HighlightWord.SelectedWord; EnableBM.Checked = singletonSettings.GeneralSettings.EnableBM; EnableCL.Checked = singletonSettings.GeneralSettings.EnableCL; EnableWH.Checked = singletonSettings.GeneralSettings.EnableWH; EnableOL.Checked = singletonSettings.GeneralSettings.EnableOL; }