Пример #1
0
        private void InitializePalette(Scheme scheme)
        {
            var schemeColors = scheme.Colors;

            buttons[0].UpdateColor(scheme.Background);
            buttons[1].UpdateColor(scheme.Foreground);

            for (var index = 0; index < schemeColors.Length; index++)
            {
                buttons[index + 2].UpdateColor(schemeColors[index]);
            }

            scintilla1.StyleResetDefault();
            scintilla1.Styles[Style.Default].Font      = "Consolas";
            scintilla1.Styles[Style.Default].Size      = 11;
            scintilla1.Styles[Style.Default].BackColor = scheme.Background;
            scintilla1.Styles[Style.Default].ForeColor = scheme.Foreground;
            scintilla1.StyleClearAll();
            scintilla1.ResetText();
            scintilla1.AppendText(Export(scheme, _exporters[comboBox1.SelectedIndex]));

            Io.WritePreset(scheme.Name + ".bin", scheme);
        }
Пример #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     InitializePalette(Io.ReadPreset("brewer.light.bin"));
 }