Beispiel #1
0
        private void RadioButtonOnChecked(object sender, RoutedEventArgs e)
        {
            var radioButton = (RadioButton)sender;
            var content     = (ColorSchemeDataModel)radioButton.DataContext;

            ColorScheme = content.ColorScheme;
        }
        public string GetColorSchemeName(ColorSchemes colorScheme)
        {
            switch (colorScheme)
            {
            case ColorSchemes.Day:
                return(UISettings.SettingsPage_Themes_Day);

            case ColorSchemes.Night:
                return(UISettings.SettingsPage_Themes_Night);

            case ColorSchemes.GrayOne:
                return(UISettings.SettingsPage_Themes_GrayOne);

            case ColorSchemes.GrayTwo:
                return(UISettings.SettingsPage_Themes_GrayTwo);

            case ColorSchemes.Sepia:
                return(UISettings.SettingsPage_Themes_Sepia);

            case ColorSchemes.Coffee:
                return(UISettings.SettingsPage_Themes_Coffee);

            case ColorSchemes.Sky:
                return(UISettings.SettingsPage_Themes_Sky);

            case ColorSchemes.Asphalt:
                return(UISettings.SettingsPage_Themes_Asphalt);
            }
            throw new NotSupportedException();
        }
Beispiel #3
0
        public OverlayStreamBossItemViewModel(OverlayStreamBossItemModel item)
            : this()
        {
            this.startingHealth = item.StartingHealth;
            this.followBonus    = item.FollowBonus;
            this.hostBonus      = item.HostBonus;
            this.subBonus       = item.SubscriberBonus;
            this.donationBonus  = item.DonationBonus;
            this.sparkBonus     = item.SparkBonus;
            this.emberBonus     = item.EmberBonus;

            this.healingBonus  = item.HealingBonus;
            this.overkillBonus = item.OverkillBonus;

            this.width  = item.Width;
            this.height = item.Height;
            this.Font   = item.TextFont;

            this.TextColor       = ColorSchemes.GetColorName(item.TextColor);
            this.BorderColor     = ColorSchemes.GetColorName(item.BorderColor);
            this.ProgressColor   = ColorSchemes.GetColorName(item.ProgressColor);
            this.BackgroundColor = ColorSchemes.GetColorName(item.BackgroundColor);

            this.damageAnimation  = item.DamageAnimation;
            this.newBossAnimation = item.NewBossAnimation;

            this.NewBossCommand = item.NewStreamBossCommand;

            this.HTML = item.HTML;
        }
Beispiel #4
0
        public void Load_Process(string inc)
        {
            StringReader sRead = new StringReader(inc);

            try {
                string line;
                while ((line = sRead.ReadLine()) != null)
                {
                    if (line.Contains(":"))
                    {
                        string pName  = line.Substring(0, line.IndexOf(':')),
                               pValue = line.Substring(line.IndexOf(':') + 1);
                        switch (pName)
                        {
                        default: break;

                        case "isPaused": isPaused = bool.Parse(pValue); break;

                        case "isFullscreen": isFullscreen = bool.Parse(pValue); break;

                        case "colorScheme": colorScheme = (ColorSchemes)Enum.Parse(typeof(ColorSchemes), pValue); break;

                        case "showGrid": showGrid = bool.Parse(pValue); break;
                        }
                    }
                }
            } catch {
            } finally {
                sRead.Close();
            }
        }
        public override OverlayItemModelBase GetOverlayItem()
        {
            if (this.Validate() && !string.IsNullOrEmpty(this.LeaderboardTypeString))
            {
                this.TextColor       = ColorSchemes.GetColorCode(this.TextColor);
                this.BorderColor     = ColorSchemes.GetColorCode(this.BorderColor);
                this.BackgroundColor = ColorSchemes.GetColorCode(this.BackgroundColor);

                if (this.leaderboardType == OverlayLeaderboardListItemTypeEnum.CurrencyRank)
                {
                    if (this.CurrencyRank != null)
                    {
                        return(new OverlayLeaderboardListItemModel(this.HTML, this.leaderboardType, totalToShow, this.Font, this.width, this.height, this.BorderColor, this.BackgroundColor,
                                                                   this.TextColor, this.alignment, this.entranceAnimation, this.exitAnimation, this.CurrencyRank, this.NewLeaderCommand));
                    }
                }
                else if (this.leaderboardType == OverlayLeaderboardListItemTypeEnum.Sparks || this.leaderboardType == OverlayLeaderboardListItemTypeEnum.Embers)
                {
                    if (!string.IsNullOrEmpty(this.SparksEmbersDateString))
                    {
                        return(new OverlayLeaderboardListItemModel(this.HTML, this.leaderboardType, totalToShow, this.Font, this.width, this.height, this.BorderColor, this.BackgroundColor,
                                                                   this.TextColor, this.alignment, this.entranceAnimation, this.exitAnimation, this.sparksEmbersDate, this.NewLeaderCommand));
                    }
                }
                else
                {
                    return(new OverlayLeaderboardListItemModel(this.HTML, this.leaderboardType, totalToShow, this.Font, this.width, this.height, this.BorderColor, this.BackgroundColor,
                                                               this.TextColor, this.alignment, this.entranceAnimation, this.exitAnimation, this.NewLeaderCommand));
                }
            }
            return(null);
        }
Beispiel #6
0
        public void CreateAndParse()
        {
            // declare expected values
            short        expected_color_increment = 10;
            ColorSchemes expected_color_scheme    = ColorSchemes.Rainbow;
            short        expected_pattern_delay   = 20;
            PatternModes expected_pattern_mode    = PatternModes.Rider;
            short        expected_pattern_spacing = 4;
            // create settings struct
            FirmwareSettings settings = new FirmwareSettings
            {
                ColorIncrement = expected_color_increment,
                ColorScheme    = expected_color_scheme,
                PatternDelay   = expected_pattern_delay,
                PatternMode    = expected_pattern_mode,
                PatternSpacing = expected_pattern_spacing
            };
            // create firmware command
            FirmwareCommand command = new FirmwareCommand(settings);
            // get firmware command base-64 string
            string text = command.ToString();
            // parse command from base-64 string
            FirmwareCommand parsed_command = FirmwareCommand.Parse(text);

            // make assertions
            Assert.AreEqual(expected_color_increment, parsed_command.Settings.ColorIncrement, "Color increment mismatch");
            Assert.AreEqual(expected_color_scheme, parsed_command.Settings.ColorScheme, "Color scheme mismatch");
            Assert.AreEqual(expected_pattern_delay, parsed_command.Settings.PatternDelay, "Pattern delay mismatch");
            Assert.AreEqual(expected_pattern_mode, parsed_command.Settings.PatternMode, "Pattern mode mismatch");
            Assert.AreEqual(expected_pattern_spacing, parsed_command.Settings.PatternSpacing, "Pattern spacing mismatch");
            return;
        }
        private bool DoJenksFisherCategorization(int colorIndex, bool multiAOI = false)
        {
            if (txtCategoryCount.Text.Length > 0)
            {
                _sheetMapSummary.Clear();
                _categoryItems.Clear();
                _dataValues = ComputeDataValues(multiAOI);
                _dataValues.Sort();
                var listBreaks = JenksFisher.CreateJenksFisherBreaksArray(_dataValues, int.Parse(txtCategoryCount.Text));
                var n          = 0;
                var lower      = listBreaks.Min();
                var upper      = 0D;
                int row;

                System.Drawing.Color color;
                _categories.Clear();

                ColorBlend blend = (ColorBlend)icbColorScheme.ColorSchemes.List[colorIndex];
                _scheme = ColorSchemes.ColorBlend2ColorScheme(blend);

                //make categories from the breaks defined in Jenk's-Fisher's
                //add the category range and color to a datagridview
                CategoryItem ci;
                foreach (var item in listBreaks)
                {
                    if (n > 0)
                    {
                        upper        = item;
                        color        = AddCategory(lower, upper);
                        ci           = new CategoryItem();
                        ci.Upper     = item;
                        ci.Color     = color;
                        ci.Lower     = lower;
                        ci.ClassSize = GetClassSize(lower, upper).ToString();
                        lower        = item;
                        _categoryItems.Add(ci);
                    }
                    n++;
                }
                //add the last category to the datagridview
                color        = AddCategory(upper, _dataValues.Max() + 1);
                ci           = new CategoryItem();
                ci.Color     = color;
                ci.Lower     = listBreaks.Max();
                ci.Upper     = _dataValues.Max();
                ci.ClassSize = GetClassSize(listBreaks.Max(), 0, true).ToString();
                _categoryItems.Add(ci);

                //add an empty null category
                AddNullCategory();

                return(_categoryItems.Count > 0);
            }
            else
            {
                MessageBox.Show("Specify number of categories", "GPX Manager", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            return(false);
        }
Beispiel #8
0
        private void SetLayerColorSchemes()
        {
            LayerColors = new ColorSchemes(ColorSchemeType.Layer);
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(Properties.Resources.colorschemes);
            LayerColors.LoadXML(doc);
        }
 public void AddColorSchemeAction()
 {
     if (SelectedColorSchemeCategory != null)
     {
         var scheme = _colorSchemeResource.NewScheme(SelectedColorSchemeCategory);
         ColorSchemes.Add(scheme);
     }
 }
Beispiel #10
0
 public ThirteenTextBox()
 {
     ColorSchemeChanged += OnColorSchemeChanged;
     BorderStyle         = BorderStyle.FixedSingle;
     Font        = new Font("Segoe UI Semilight", 9.75f);
     BackColor   = Color.FromArgb(35, 35, 35);
     ForeColor   = Color.White;
     ColorScheme = ColorSchemes.Dark;
 }
        public ColorScheme(ColorSchemes colorScheme)
        {
            ColorSchemeName = colorScheme;

            MapExistingColors();
            // load the color scheme
            LoadColorScheme();
            MapColorScheme();
        }
Beispiel #12
0
 public HuraTextBox()
 {
     ColorSchemeChanged += OnColorSchemeChanged;
     BorderStyle         = BorderStyle.FixedSingle;
     Font        = new Font("Segoe UI", 9.5f);
     BackColor   = Color.FromArgb(50, 50, 50);
     ForeColor   = Color.White;
     ColorScheme = ColorSchemes.Dark;
 }
        private string GetColorSchemeText(ColorSchemes scheme)
        {
            var    enumType              = typeof(ColorSchemes);
            var    enumValue             = enumType.GetMember(scheme.ToString())[0];
            var    descriptionAttributes = enumValue.GetCustomAttributes(typeof(DescriptionAttribute), false);
            string description           = ((DescriptionAttribute)descriptionAttributes[0]).Description;

            return(description);
        }
Beispiel #14
0
        public override OverlayItemModelBase GetOverlayItem()
        {
            if (this.width > 0 && this.height > 0 && !string.IsNullOrEmpty(this.Font) && !string.IsNullOrEmpty(this.TextColor) && !string.IsNullOrEmpty(this.HTML))
            {
                this.TextColor = ColorSchemes.GetColorCode(this.TextColor);

                return(new OverlaySparkCrystalItemModel(this.HTML, this.TextColor, this.Font, this.width, this.height, this.CustomImageFilePath, this.progressAnimation, this.milestoneReachedAnimation));
            }
            return(null);
        }
        public override OverlayItemModelBase GetOverlayItem()
        {
            if (!string.IsNullOrEmpty(this.Font) && !string.IsNullOrEmpty(this.Color) && !string.IsNullOrEmpty(this.HTML) && this.size > 0 && this.totalLength > 0)
            {
                this.Color = ColorSchemes.GetColorCode(this.Color);

                return(new OverlayTimerItemModel(this.HTML, this.totalLength, this.Color, this.Font, size, this.TimerCompleteCommand));
            }
            return(null);
        }
Beispiel #16
0
        public void ChangeColorScheme(ColorSchemes selectedScheme)
        {
            var    paletteHelper = new PaletteHelper();
            ITheme theme         = paletteHelper.GetTheme();

            System.Windows.Media.Color primaryColor;
            ColorRGB colorRGB;

            switch (selectedScheme)
            {
            case ColorSchemes.Green:
                primaryColor = System.Windows.Media.Color.FromRgb(124, 179, 66);
                colorRGB     = new ColorRGB()
                {
                    R = 124, G = 179, B = 66
                };
                break;

            case ColorSchemes.Purple:
                primaryColor = System.Windows.Media.Color.FromRgb(170, 0, 255);
                colorRGB     = new ColorRGB()
                {
                    R = 170, G = 0, B = 255
                };
                break;

            case ColorSchemes.Orange:
                primaryColor = System.Windows.Media.Color.FromRgb(255, 195, 0);
                colorRGB     = new ColorRGB()
                {
                    R = 255, G = 195, B = 0
                };
                break;

            case ColorSchemes.Custom:
                _windowService.CreateWindowAndShow(new SettingsViewModel(this), "Simple_HEIC_convertor.ColorSchemeSettings");
                return;

            default:
                primaryColor = System.Windows.Media.Color.FromRgb(124, 179, 66);
                colorRGB     = new ColorRGB()
                {
                    R = 124, G = 179, B = 66
                };
                break;
            }

            theme.SetPrimaryColor(primaryColor);
            paletteHelper.SetTheme(theme);

            //SaveCurrentSettings(colorRGB);
            Thread thread = new Thread(() => SaveCurrentSettings(colorRGB));

            thread.Start();
        }
        public HouseholdPlanPresenter([NotNull] ApplicationPresenter applicationPresenter, [NotNull] HouseholdPlanView view,
                                      [NotNull] HouseholdPlan householdPlan)
            : base(view, "ThisHouseholdPlan.HeaderString", householdPlan, applicationPresenter)
        {
            SuspendStatistics = true;
            CalcObjectTypes   = new ObservableCollection <CalcObjectType>
            {
                CalcObjectType.ModularHousehold
            };

            _householdPlan = householdPlan;
            foreach (var entry in _householdPlan.Entries)
            {
                entry.AllDeviceActions = Sim.DeviceActions.It;
            }

            foreach (var dc in Sim.DeviceCategories.MyItems)
            {
                dc.RefreshSubDevices();
            }

            _householdPlan.RefreshTagCategories(Sim.Affordances.It);

            SortByOptions.Add("By Name");
            SortByOptions.Add("By Person");

            SortByOptions.Add("By Activiations");
            SortByOptions.Add("By Desire");
            SortByOptions.Add("By Total Time");
            SortByOptions.Add("By Category");
            SortBy = SortByOptions[1];
            Resort();
            if (householdPlan.CalcObject != null)
            {
                if (householdPlan.CalcObject.GetType() == typeof(ModularHousehold))
                {
                    SelectedCalcObjectType = CalcObjectType.ModularHousehold;
                }
                else
                {
                    throw new LPGException("Unknown ");
                }
            }
            else
            {
                SelectedCalcObjectType = CalcObjectType.ModularHousehold;
            }

            ColorSchemes.Add("By Activations");
            ColorSchemes.Add("By Traits");
            SelectedColorScheme = ColorSchemes[0];
            RefreshPlan();
            RefreshAlTraits();
            RefreshAlAssignments();
        }
Beispiel #18
0
        public override OverlayItemModelBase GetOverlayItem()
        {
            if (!string.IsNullOrEmpty(this.Font) && !string.IsNullOrEmpty(this.Color) && !string.IsNullOrEmpty(this.HTML) && this.size > 0 && this.minimumSecondsToShow > 0)
            {
                this.Color = ColorSchemes.GetColorCode(this.Color);

                return(new OverlayTimerTrainItemModel(this.HTML, this.minimumSecondsToShow, this.Color, this.Font, this.size, this.followBonus, this.hostBonus, this.raidBonus,
                                                      this.subBonus, this.donationBonus, this.bitsBonus));
            }
            return(null);
        }
Beispiel #19
0
        public override OverlayItemModelBase GetOverlayItem()
        {
            if (!string.IsNullOrEmpty(this.Text) && !string.IsNullOrEmpty(this.Color) && this.size > 0)
            {
                this.Color       = ColorSchemes.GetColorCode(this.Color);
                this.ShadowColor = ColorSchemes.GetColorCode(this.ShadowColor);

                return(new OverlayTextItemModel(this.Text, this.Color, this.size, this.Font, this.Bold, this.Italic, this.Underline, this.ShadowColor));
            }
            return(null);
        }
Beispiel #20
0
 public OverlayTextItemViewModel(OverlayTextItemModel item)
     : this()
 {
     this.Text        = item.Text;
     this.size        = item.Size;
     this.Font        = item.Font;
     this.Bold        = item.Bold;
     this.Italic      = item.Italic;
     this.Underline   = item.Underline;
     this.Color       = ColorSchemes.GetColorName(item.Color);
     this.ShadowColor = ColorSchemes.GetColorName(item.ShadowColor);
 }
Beispiel #21
0
        public SettingsViewModel()
        {
            if (ThemeManager != null)
            {
                BaseColorNames.AddRange(ThemeManager.GetBaseColorNames());
                ColorSchemes.AddRange(ThemeManager.GetColorSchemes());

                RestoreTheme();
            }

            ConfigFolderPath = GlobalSettings.GetSettingsDir();
        }
        public OverlayTimerItemViewModel(OverlayTimerItemModel item)
            : this()
        {
            this.totalLength = item.TotalLength;
            this.size        = item.TextSize;
            this.Font        = item.TextFont;
            this.Color       = ColorSchemes.GetColorName(item.TextColor);

            this.HTML = item.HTML;

            this.TimerCompleteCommand = item.TimerFinishedCommand;
        }
 public ChatMessageViewModel(string alertText, UserViewModel user = null, string foregroundBrush = null)
 {
     this.ID                = Guid.Empty;
     this.User              = user;
     this.Timestamp         = DateTimeOffset.Now;
     this.Message           = "---  " + alertText + "  ---";
     this.AlertMessageBrush = ColorSchemes.GetColorCode(foregroundBrush);
     this.MessageComponents.Add(new ChatMessageDataModel()
     {
         type = "text", text = this.Message
     });
 }
 public ChatMessageViewModel(string alertText, UserViewModel user = null, string foregroundBrush = null)
 {
     this.User              = user;
     this.IsInUsersChannel  = true;
     this.IsAlert           = true;
     this.Message           = "---  " + alertText + "  ---";
     this.AlertMessageBrush = ColorSchemes.GetColorCode(foregroundBrush);
     this.MessageComponents.Add(new ChatMessageDataModel()
     {
         type = "text", text = this.Message
     });
 }
        public override OverlayItemModelBase GetOverlayItem()
        {
            if (this.Validate())
            {
                this.TextColor       = ColorSchemes.GetColorCode(this.TextColor);
                this.BorderColor     = ColorSchemes.GetColorCode(this.BorderColor);
                this.BackgroundColor = ColorSchemes.GetColorCode(this.BackgroundColor);

                return(new OverlayChatMessagesListItemModel(this.HTML, totalToShow, fadeOut, this.Font, this.width, this.height, this.BorderColor, this.BackgroundColor, this.TextColor, this.alignment, this.entranceAnimation, this.exitAnimation));
            }
            return(null);
        }
Beispiel #26
0
        public Scheme this[ColorSchemes scheme]
        {
            get
            {
                if (!_schemes.ContainsKey(scheme))
                {
                    throw new NotSupportedException();
                }

                return(_schemes[scheme]);
            }
        }
Beispiel #27
0
        private void RestoreDefaults()
        {
            // If users have customized the colors for the 'Default' or 'Debug'
            // schemes, use those customizations. Otherwise, add preset default
            // values to accommodate accidental deletion or intentional reset.

            string defaultKey = "Default";

            if (!ColorSchemes.ContainsKey(defaultKey) || ColorSchemes[defaultKey] == null)
            {
                // Vanity, to be sure, but a pleasant shade nonetheless.
                var tensLogoPurple = new Color(0.4f, 0.3607843f, 0.7960784f, 1.0f);

                ColorSchemes[defaultKey] = new Dictionary <string, Color>
                {
                    { "3D Wireframe", tensLogoPurple },
                    { "3D Flat", tensLogoPurple },
                    { "3D Textured", tensLogoPurple }
                };
            }

            string neutralKey = "Neutral";

            if (!ColorSchemes.ContainsKey(neutralKey) || ColorSchemes[neutralKey] == null)
            {
                var gray = new Color(0.5f, 0.5f, 0.5f, 1.0f);

                ColorSchemes[neutralKey] = new Dictionary <string, Color>
                {
                    { "3D Wireframe", gray },
                    { "3D Flat", gray },
                    { "3D Textured", gray }
                };
            }

            string debugKey = "Debug";

            if (!ColorSchemes.ContainsKey(debugKey) || ColorSchemes[debugKey] == null)
            {
                ColorSchemes[debugKey] = new Dictionary <string, Color>
                {
                    { "3D Wireframe", new Color(1.0f, 0.0f, 0.0f, 1.0f) },
                    { "3D Flat", new Color(0.0f, 1.0f, 0.0f, 1.0f) },
                    { "3D Textured", new Color(0.0f, 0.0f, 1.0f, 1.0f) }
                };
            }

            if (String.IsNullOrEmpty(CurrentColorScheme))
            {
                CurrentColorScheme = "Default";
            }
        }
        /// <summary>
        /// 应用所选的颜色方案
        /// </summary>
        private void ApplyColorScheme2Categories()
        {
            if (_shapefile.Categories.Count > 0)
            {
                MapWinGIS.ColorScheme scheme = null;
                if (icbCategories.SelectedIndex >= 0)
                {
                    ColorBlend blend = (ColorBlend)icbCategories.ColorSchemes.List[icbCategories.SelectedIndex];
                    scheme = ColorSchemes.ColorBlend2ColorScheme(blend);

                    // saving the settings
                    //MWLite.Symbology.Layer layer = Globals.Legend.Layers.ItemByHandle(_layerHandle);
                    //_settings.CategoriesColorScheme = blend;
                }
                else
                {
                    return;
                }

                if (chkRandomColors.Checked)
                {
                    _shapefile.Categories.ApplyColorScheme(MapWinGIS.tkColorSchemeType.ctSchemeRandom, scheme);
                }
                else
                {
                    _shapefile.Categories.ApplyColorScheme(MapWinGIS.tkColorSchemeType.ctSchemeGraduated, scheme);
                }

                MapWinGIS.ShapefileCategories categories = _shapefile.Categories;
                //绘制catagorise选项
                if (chkSetGradient.Checked)
                {
                    for (int i = 0; i < categories.Count; i++)
                    {
                        ShapeDrawingOptions options = categories.get_Item(i).DrawingOptions;
                        options.SetGradientFill(options.FillColor, 75);
                        options.FillType = tkFillType.ftGradient;
                    }
                }
                else
                {
                    for (int i = 0; i < categories.Count; i++)
                    {
                        ShapeDrawingOptions options = categories.get_Item(i).DrawingOptions;
                        options.FillColor2 = options.FillColor;
                        options.FillType   = tkFillType.ftStandard;
                    }
                }
            }
        }
        public HighContrast()
        {
            var structure = GetSystemParameters();
            var flags     = (Flags)structure.dwFlags;

            this.IsHighContrastAvailable = flags.HasFlag(Flags.HCF_AVAILABILE);
            this.IsConfirmDialogEnabled  = flags.HasFlag(Flags.HCF_CONFIRMHOTKEY);
            this.IsHighContrastOn        = flags.HasFlag(Flags.HCF_HIGHCONTRASTON);
            this.IsHotKeyActive          = flags.HasFlag(Flags.HCF_HOTKEYACTIVE);
            this.IsHotKeyAvailable       = flags.HasFlag(Flags.HCF_HOTKEYAVAILABLE);
            this.IsOnOffSirenEnabled     = flags.HasFlag(Flags.HCF_HOTKEYSOUND);

            this.Theme = GetColorSchemeEnum(Marshal.PtrToStringAuto(structure.lpszDefaultScheme));
        }
Beispiel #30
0
 public ColorPair GetColorPair(string key)
 {
     if (ColorSchemes.ContainsKey(key))
     {
         return(ColorSchemes[key]);
     }
     else if (Overflow != null)
     {
         return(Overflow.GetColorPair(key));
     }
     else
     {
         throw new KeyNotFoundException("Cannot find ColorPair for that key.");
     }
 }
Beispiel #31
0
 public Scheme(
     ColorSchemes colorScheme,
     Color backgroundBrush, 
     Color titleForegroundBrush,
     Color textForegroundBrush, 
     Color linkForegroundBrush,
     Color selectionBrush, 
     Color applicationBarBackgroundBrush,
     Color progressBarBrush, 
     Color systemTrayForegroundColor)
 {
     ColorScheme = colorScheme;
     BackgroundBrush = new SolidColorBrush(backgroundBrush);
     TitleForegroundBrush = new SolidColorBrush(titleForegroundBrush);
     TextForegroundBrush = new SolidColorBrush(textForegroundBrush);
     LinkForegroundBrush = new SolidColorBrush(linkForegroundBrush);
     SelectionBrush = new SolidColorBrush(selectionBrush);
     ApplicationBarBackgroundBrush = new SolidColorBrush(applicationBarBackgroundBrush);
     ProgressBarBrush = new SolidColorBrush(progressBarBrush);
     SystemTrayForegroundColor = systemTrayForegroundColor;
 }
        public string GetColorSchemeName(ColorSchemes colorScheme)
        {
            switch (colorScheme)
            {
                case ColorSchemes.Day:
                    return UISettings.SettingsPage_Themes_Day;
                case ColorSchemes.Night:
                    return UISettings.SettingsPage_Themes_Night;
                case ColorSchemes.GrayOne:
                    return UISettings.SettingsPage_Themes_GrayOne;
                case ColorSchemes.GrayTwo:
                    return UISettings.SettingsPage_Themes_GrayTwo;
                case ColorSchemes.Sepia:
                    return UISettings.SettingsPage_Themes_Sepia;
                case ColorSchemes.Coffee:
                    return UISettings.SettingsPage_Themes_Coffee;
                case ColorSchemes.Sky:
                    return UISettings.SettingsPage_Themes_Sky;
                case ColorSchemes.Asphalt:
                    return UISettings.SettingsPage_Themes_Asphalt;

            }
            throw new NotSupportedException();
        }
 private void RadioButtonOnChecked(object sender, RoutedEventArgs e)
 {
     var radioButton = (RadioButton) sender;
     var content = (ColorSchemeDataModel)radioButton.DataContext;
     ColorScheme = content.ColorScheme;
 }
        public void ApplyScheme(ColorSchemes scheme, IRaster raster)
        {
            GetValues(raster);
            double min = Statistics.Minimum;
            double max = Statistics.Maximum;
            
            if (Categories == null)
            {
                Categories = new ColorCategoryCollection(this);
            }
            int alpha = ByteRange(Convert.ToInt32(_opacity * 255F));
            // this part should be overridden in the type specific version
           
            Categories.Clear();
            IColorCategory low = new ColorCategory(min, (min + max)/2);
            low.Range.MaxIsInclusive = true;
            IColorCategory high = new ColorCategory((min + max)/2, max);
            high.Range.MaxIsInclusive = true;
            low.ApplyMinMax(EditorSettings);
            high.ApplyMinMax(EditorSettings);
            Categories.Add(low);
            Categories.Add(high);
            switch (scheme)
            {
                case ColorSchemes.Summer_Mountains:
                    low.LowColor = Color.FromArgb(alpha, 10, 100, 10);
                    low.HighColor = Color.FromArgb(alpha, 153, 125, 25);
                    high.LowColor = Color.FromArgb(alpha, 153, 125, 25);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemes.FallLeaves:
                    low.LowColor = Color.FromArgb(alpha, 10, 100, 10);
                    low.HighColor = Color.FromArgb(alpha, 199, 130, 61);
                    high.LowColor = Color.FromArgb(alpha, 199, 130, 61);
                    high.HighColor = Color.FromArgb(alpha, 241, 220, 133);
                    break;
                case ColorSchemes.Desert:
                    low.LowColor = Color.FromArgb(alpha, 211, 206, 97);
                    low.HighColor = Color.FromArgb(alpha, 139, 120, 112);
                    high.LowColor = Color.FromArgb(alpha, 139, 120, 112);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemes.Glaciers:
                    low.LowColor = Color.FromArgb(alpha, 105, 171, 224);
                    low.HighColor = Color.FromArgb(alpha, 162, 234, 240);
                    high.LowColor = Color.FromArgb(alpha, 162, 234, 240);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 255);
                    break;
                case ColorSchemes.Meadow:
                    low.LowColor = Color.FromArgb(alpha, 68, 128, 71);
                    low.HighColor = Color.FromArgb(alpha, 43, 91, 30);
                    high.LowColor = Color.FromArgb(alpha, 43, 91, 30);
                    high.HighColor = Color.FromArgb(alpha, 167, 220, 168);
                    break;
                case ColorSchemes.Valley_Fires:
                    low.LowColor = Color.FromArgb(alpha, 164, 0, 0);
                    low.HighColor = Color.FromArgb(alpha, 255, 128, 64);
                    high.LowColor = Color.FromArgb(alpha, 255, 128, 64);
                    high.HighColor = Color.FromArgb(alpha, 255, 255, 191);
                    break;
                case ColorSchemes.DeadSea:
                    low.LowColor = Color.FromArgb(alpha, 51, 137, 208);
                    low.HighColor = Color.FromArgb(alpha, 226, 227, 166);
                    high.LowColor = Color.FromArgb(alpha, 226, 227, 166);
                    high.HighColor = Color.FromArgb(alpha, 151, 146, 117);
                    break;
                case ColorSchemes.Highway:
                    low.LowColor = Color.FromArgb(alpha, 51, 137, 208);
                    low.HighColor = Color.FromArgb(alpha, 214, 207, 124);
                    high.LowColor = Color.FromArgb(alpha, 214, 207, 124);
                    high.HighColor = Color.FromArgb(alpha, 54, 152, 69);
                    break;
                default:
                    break;

            }
           
            OnItemChanged(this);
        }
 private void SetPrebuiltScheme(ColorSchemes scheme)
 {
     _rasterSymbolizer.ColorScheme = scheme;
     csvEditor.Refresh();
     OnDataChanged();
 }