Esempio n. 1
0
        void SetColors(Dt.Charts.Palette cg)
        {
            int num = _list.Count;

            if (cg == Dt.Charts.Palette.Default)
            {
                if (CustomBrushes != null)
                {
                    for (int j = 0; j < num; j++)
                    {
                        Brush customBrush = GetCustomBrush(j);
                        InitStyle(_list[j], customBrush, _list[j].DarkOutline);
                        SyncStyle(j);
                    }
                    return;
                }
                cg = Dt.Charts.Palette.Apex;
            }
            for (int i = 0; i < num; i++)
            {
                Windows.UI.Color clr = ColorPalette.GetOfficePalette(cg).GetColor(i);
                InitStyle(_list[i], clr, _list[i].DarkOutline);
                SyncStyle(i);
            }
        }
Esempio n. 2
0
        public ShapeStyle Next(bool dark)
        {
            ShapeStyle style2;
            ShapeStyle ss = new ShapeStyle();

            if ((CustomBrushes != null) && (_colorGen == Dt.Charts.Palette.Default))
            {
                InitStyle(ss, GetCustomBrush(_list.Count), dark);
            }
            else
            {
                Dt.Charts.Palette colorGenTheme = (_colorGen == Dt.Charts.Palette.Default) ? Dt.Charts.Palette.Apex : _colorGen;
                Windows.UI.Color  clr           = ColorPalette.GetOfficePalette(colorGenTheme).GetColor(_list.Count);
                InitStyle(ss, clr, dark);
            }
            ss.DarkOutline     = dark;
            ss.StrokeThickness = 2.0;
            _list.Add(ss);
            style2 = new ShapeStyle {
                FillAuto        = ss.FillAuto,
                Fill            = ss.FillAuto,
                StrokeAuto      = ss.StrokeAuto,
                Stroke          = ss.StrokeAuto,
                StrokeThickness = 2.0
            };
            _list2.Add(style2);
            return(ss);
        }