Source/Controls/Slider.cs

(开头部分) 13KB

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

using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using System.ComponentModel;

namespace DevComponents.DotNetBar.Controls
{
    /// <summary>
    /// Represents the Slider control.
    /// </summary>
    [ToolboxBitmap(typeof(Slider), "Controls.Slider.ico"), ToolboxItem(true), DefaultEvent("ValueChanged"), ComVisible(false)]
    public class Slider : BaseItemControl, ICommandSource
    {
        #region Private Variables
        private SliderItem m_Slider = null;
        #endregion

        #region Events
        /// <summary>
        /// Occurs after Value property has changed.
        /// </summary>
        public event EventHandler ValueChanged;

        /// <summary>
        /// Occurs before Value property has changed.
        /// </summary>
        public event CancelIntValueEventHandler ValueChanging;
        #endregion

        #region Constructor, Dispose
        public Slider()
        {
            m_Slider = new SliderItem();
            m_Slider.Style = eDotNetBarStyle.Office2007;
            m_Slider.ValueChanged += new EventHandler(SliderValueChanged);
            m_Slider.ValueChanging += new CancelIntValueEventHandler(SliderValueChanging);
            this.HostItem = m_Slider;
        }

        /// <summary>
        /// Gets or sets whether text-markup support is enabled for controls Text property. Default value is true.
        /// Set this property to false to display HTML or other markup in the control instead of it being parsed as text-markup.
        /// </summary>
        [DefaultValue(true), Category("Appearance"), Description("Indicates whether text-markup support is enabled for controls Text property.")]
        public bool EnableMarkup
        {
            get { return m_Slider.EnableMarkup; }
            set
            {
                m_Slider.EnableMarkup = value;
            }
        }

        private void SliderValueChanging(object sender, CancelIntValueEventArgs e)
        {
            OnValueChanging(e);
        }

        private void SliderValueChanged(object sender, EventArgs e)
后面还有 325 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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