Пример #1
0
        public SuperTabPanelColorTable()
        {
            _Default = new SuperTabPanelItemColorTable();
            _Default.ColorTableChanged += PctColorTableChanged;

            _Left = new SuperTabPanelItemColorTable();
            _Left.ColorTableChanged += PctColorTableChanged;

            _Bottom = new SuperTabPanelItemColorTable();
            _Bottom.ColorTableChanged += PctColorTableChanged;

            _Right = new SuperTabPanelItemColorTable();
            _Right.ColorTableChanged += PctColorTableChanged;
        }
Пример #2
0
        public static SuperTabPanelItemColorTable GetPredefinedPanelColors(eTabItemColor c, ColorFactory factory)
        {
            SuperTabPanelItemColorTable sct = new SuperTabPanelItemColorTable();
            SuperTabLinearGradientColorTable lgt = GetPredefinedSelectedBackground(c, factory);

            sct.Background = new SuperTabLinearGradientColorTable(lgt.Colors[1]);
            sct.InnerBorder = Color.White;
            sct.OuterBorder = Color.DimGray;

            return (sct);
        }
Пример #3
0
 public void ResetLeft()
 {
     Left = new SuperTabPanelItemColorTable();
 }
Пример #4
0
 public void ResetDefault()
 {
     Default = new SuperTabPanelItemColorTable();
 }
Пример #5
0
        public object Clone()
        {
            SuperTabPanelItemColorTable sct = new SuperTabPanelItemColorTable();

            sct.Background = (SuperTabLinearGradientColorTable)Background.Clone();

            sct.OuterBorder = OuterBorder;
            sct.InnerBorder = InnerBorder;

            return (sct);
        }
Пример #6
0
        private void SetNewColorTable(
            ref SuperTabPanelItemColorTable sct, SuperTabPanelItemColorTable newSct)
        {
            if (sct != null)
                sct.ColorTableChanged -= PctColorTableChanged;

            sct = newSct;

            if (sct != null)
                sct.ColorTableChanged += PctColorTableChanged;

            OnColorTableChanged();
        }
Пример #7
0
 public void ResetRight()
 {
     Right = new SuperTabPanelItemColorTable();
 }
Пример #8
0
 public void ResetBottom()
 {
     Bottom = new SuperTabPanelItemColorTable();
 }
Пример #9
0
        private void ApplyPanelColors(SuperTabPanelItemColorTable sct, SuperTabPanelItemColorTable tct)
        {
            if (tct.Background.IsEmpty == false)
            {
                if (tct.Background.Colors != null)
                    sct.Background.Colors = tct.Background.Colors;

                if (tct.Background.Positions != null)
                    sct.Background.Positions = tct.Background.Positions;

                if (tct.Background.AdaptiveGradient.HasValue)
                    sct.Background.AdaptiveGradient = tct.Background.AdaptiveGradient;

                sct.Background.GradientAngle = tct.Background.GradientAngle;
            }

            if (tct.InnerBorder.IsEmpty == false)
                sct.InnerBorder = tct.InnerBorder;

            if (tct.OuterBorder.IsEmpty == false)
                sct.OuterBorder = tct.OuterBorder;
        }
Пример #10
0
        internal virtual void ApplyPredefinedColor(SuperTabPanelItemColorTable pct)
        {
            if (TabItem.PredefinedColor != eTabItemColor.Default)
            {
                SuperTabPanelItemColorTable ct =
                    SuperTabStyleColorFactory.GetPredefinedPanelColors(TabItem.PredefinedColor, ColorFactory.Empty);

                pct.InnerBorder = ct.InnerBorder;
                pct.OuterBorder = ct.OuterBorder;

                pct.Background = ct.Background;
            }
        }
Пример #11
0
        /// <summary>
        /// Applies the predefined color to the panel color table
        /// </summary>
        /// <param name="pct"></param>
        internal override void ApplyPredefinedColor(SuperTabPanelItemColorTable pct)
        {
            if (TabItem.PredefinedColor != eTabItemColor.Default)
            {
                SuperTabPanelItemColorTable ct =
                    SuperTabStyleColorFactory.GetPredefinedPanelColors(TabItem.PredefinedColor, ColorFactory.Empty);

                pct.Background = ct.Background;
                pct.InnerBorder = pct.Background.Colors[pct.Background.Colors.Length - 1];
                pct.OuterBorder = ct.OuterBorder;
            }
        }