Source/Rendering/Office2007ColorTable.cs

(开头部分) 72KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Text;
using System.Drawing;
using System.Collections;

namespace DevComponents.DotNetBar.Rendering
{
    /// <summary>
    /// Represents color table for Office 2007 style.
    /// </summary>
    public class Office2007ColorTable: IElementStyleClassProvider, IDisposable
    {
        #region Private Variables
        private Office2007ButtonItemColorTableCollection m_ButtonItemColors = new Office2007ButtonItemColorTableCollection();
        private Office2007ButtonItemColorTableCollection m_RibbonButtonItemColors = new Office2007ButtonItemColorTableCollection();
        private Office2007ButtonItemColorTableCollection m_MenuButtonItemColors = new Office2007ButtonItemColorTableCollection();
        private Office2007RibbonTabItemColorTableCollection m_RibbonTabItemColors = new Office2007RibbonTabItemColorTableCollection();
        private Office2007RibbonTabGroupColorTableCollection m_RibbonTabGroupColors = new Office2007RibbonTabGroupColorTableCollection();
        private eOffice2007ColorScheme m_ColorScheme = eOffice2007ColorScheme.Blue;
        private Hashtable m_StyleClasses = new Hashtable();
        private ColorFactory m_ColorFactory = new ColorFactory();
        #endregion

        #region Constructor
        /// <summary>
        /// Creates new instance of the object.
        /// </summary>
        public Office2007ColorTable()
        {
            InitializeBlueColorTable(m_ColorFactory);
        }

        /// <summary>
        /// Initializes a new instance of the Office2007ColorTable class.
        /// </summary>
        /// <param name="colorFactory">Specifies the color factory for the color table.</param>
        public Office2007ColorTable(ColorFactory colorFactory)
        {
            m_ColorFactory = colorFactory;
            InitializeBlueColorTable(m_ColorFactory);
        }

        private void InitializeBlueColorTable(ColorFactory factory)
        {
            #region RibbonControl Start Images
            this.RibbonControl.StartButtonDefault = BarFunctions.LoadBitmap("SystemImages.BlankStartButtonNormal.png");
            this.RibbonControl.StartButtonMouseOver = BarFunctions.LoadBitmap("SystemImages.BlankStartButtonHot.png");
            this.RibbonControl.StartButtonPressed = BarFunctions.LoadBitmap("SystemImages.BlankStartButtonPressed.png");
            #endregion

            #region RibbonControl
            this.RibbonControl.OuterBorder = new LinearGradientColorTable(factory.GetColor(0x8DB2E3), factory.GetColor(0x88A1C2));
            this.RibbonControl.InnerBorder = new LinearGradientColorTable(factory.GetColor(0xE7EFF8), factory.GetColor(0xC0F9FF));
            this.RibbonControl.TabsBackground = new LinearGradientColorTable(factory.GetColor(0xBFDBFF), Color.Empty);
            this.RibbonControl.TabDividerBorder = factory.GetColor(0xAECAF0);
            this.RibbonControl.TabDividerBorderLight = factory.GetColor(0xD4E3F5);
            this.RibbonControl.CornerSize = 3;
            this.RibbonControl.PanelTopBackgroundHeight = 15;
            this.RibbonControl.PanelTopBackground = new LinearGradientColorTable(factory.GetColor(0xDBE6F4), factory.GetColor(0xCFDDEF));
            this.RibbonControl.PanelBottomBackground = new LinearGradientColorTable(factory.GetColor(0xC9D9ED), factory.GetColor(0xE7F2FF));
后面还有 1123 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。