Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        private void saveSettings()
        {
            HighlightWordProperties propHighlightWord = (HighlightWordProperties)this.propHighlightWord.SelectedObject;
            HighlightLineProperties propHighlightLine = (HighlightLineProperties)this.propHighlightLine.SelectedObject;

            singletonSettings = EditorSettings.getInstance();

            // Highliht selected word
            singletonSettings.HighlightWord.BackColor  = propHighlightWord.BackColor;
            singletonSettings.HighlightWord.FrameColor = propHighlightWord.FrameColor;

            // 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();
        }