示例#1
0
            void color_Changed(object sender, EventArgs e)
            {
                SettingUInt16Entry color = (SettingUInt16Entry)sender;

                if (color.Value < DataFiles.Hues.MinIndex || color.Value > DataFiles.Hues.MaxIndex)
                {
                    color.Reset();
                }
                else
                {
                    SyncEvent.Invoke(Changed, sender, e);
                }
            }
示例#2
0
            internal ColorsConfig(ISettings settings)
            {
                fontColor    = new SettingUInt16Entry(settings, Env.DefaultFontColor, "font", "Environment", "Colors");
                consoleColor = new SettingUInt16Entry(settings, Env.DefaultErrorColor, "console", "Environment", "Colors");
                infoColor    = new SettingUInt16Entry(settings, Env.DefaultInfoColor, "info", "Environment", "Colors");
                warningColor = new SettingUInt16Entry(settings, Env.DefaultWarningColor, "warning", "Environment", "Colors");
                errorColor   = new SettingUInt16Entry(settings, Env.DefaultErrorColor, "error", "Environment", "Colors");

                fontColor.Changed    += new EventHandler(color_Changed);
                consoleColor.Changed += new EventHandler(color_Changed);
                infoColor.Changed    += new EventHandler(color_Changed);
                warningColor.Changed += new EventHandler(color_Changed);
                errorColor.Changed   += new EventHandler(color_Changed);
            }
示例#3
0
            internal ColorsConfig(ISettings settings)
            {
                fontColor = new SettingUInt16Entry(settings, Env.DefaultFontColor, "font", "Environment", "Colors");
                consoleColor = new SettingUInt16Entry(settings, Env.DefaultErrorColor, "console", "Environment", "Colors");
                infoColor = new SettingUInt16Entry(settings, Env.DefaultInfoColor, "info", "Environment", "Colors");
                warningColor = new SettingUInt16Entry(settings, Env.DefaultWarningColor, "warning", "Environment", "Colors");
                errorColor = new SettingUInt16Entry(settings, Env.DefaultErrorColor, "error", "Environment", "Colors");

                fontColor.Changed += new EventHandler(color_Changed);
                consoleColor.Changed += new EventHandler(color_Changed);
                infoColor.Changed += new EventHandler(color_Changed);
                warningColor.Changed += new EventHandler(color_Changed);
                errorColor.Changed += new EventHandler(color_Changed);
            }