Source/Controls/BaseItemControl.cs

(开头部分) 20KB

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

using System;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using DevComponents.DotNetBar.Rendering;

namespace DevComponents.DotNetBar
{
    /// <summary>
    /// Represents the class for the BaseItem non-popup based control host.
    /// </summary>
    [ToolboxItem(false)]
    public abstract class BaseItemControl : Control
    {
        #region Private Variables
        private BaseItem m_Item = null;
        private ElementStyle m_BackgroundStyle = null;
        private ColorScheme m_ColorScheme = null;
        private bool m_DesignModeInternal = false;
        private bool m_AntiAlias = true;
        #endregion

        #region Constructor Dispose
        /// <summary>
        /// Creates new instance of the object.
        /// </summary>
        public BaseItemControl()
        {
            if (!ColorFunctions.ColorsLoaded)
            {
                NativeFunctions.RefreshSettings();
                NativeFunctions.OnDisplayChange();
                ColorFunctions.LoadColors();
            }

            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.Opaque, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.StandardDoubleClick, true);
            this.SetStyle(DisplayHelp.DoubleBufferFlag, true);
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);

            m_ColorScheme = new ColorScheme(eDotNetBarStyle.Office2007);
            m_BackgroundStyle = new ElementStyle();
            m_BackgroundStyle.SetColorScheme(m_ColorScheme);
            m_BackgroundStyle.StyleChanged += new EventHandler(this.VisualPropertyChanged);
        }
        #endregion

        #region Internal Implementation
#if FRAMEWORK20
        protected override void OnBindingContextChanged(EventArgs e)
        {
            base.OnBindingContextChanged(e);
            if (m_Item != null)
                m_Item.UpdateBindings();
后面还有 544 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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