WinHtmlEditor/Common/OfficeColorPicker.cs

(开头部分) 17KB

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

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace WinHtmlEditor
{
    /// <summary>
    /// Provides color picker control that could be used in a model or non-model form.
    /// </summary
    [DefaultEvent("SelectedColorChanged"), DefaultProperty("Color"), 
    ToolboxItem(true) ,
   ToolboxBitmap(typeof(OfficeColorPicker), "OfficeColorPicker"),
    Description("Provides color picker control that could be used in a model or non-model form.")]       
    public partial class OfficeColorPicker : UserControl
    {
        #region Static Methods
        /// <summary>
        /// The preferred height to span the control to
        /// </summary>
        public static readonly int PreferredHeight = 120;
        /// <summary>
        /// The preferred width to span the control to
        /// </summary>
        public static readonly int PreferredWidth = 146;

        #endregion

        #region Events
        /// <summary>
        /// Occurs when the value of the Color property changes. 
        /// </summary>
        [Category("Behavior"), Description("Occurs when the value of the Color property changes.")]
        public event EventHandler SelectedColorChanged;
        #endregion

        #region Properties
        private Color _color = Color.Black;
        /// <summary>
        /// Gets or sets the selected color from the OfficeColorPicker
        /// </summary>
        [Category("Data"), Description("The color selected in the dialog"),
       DefaultValue(typeof(Color), "System.Drawing.Color.Black")]
        public Color Color
        {
            get { return _color; }
            set 
            { 
                _color = value;
                // Set Selected Color in the GUI
                SetColor(value);
                // Fires the SelectedColorChanged event.
                OnSelectedColorChanged(EventArgs.Empty);                
            }
        }
        /// <summary>
        /// Gets the selected color name, or 'Custom' if it is not one
        /// of the Selectable colors.
        /// </summary>
        [Browsable(false)]
后面还有 394 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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