示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenTrackBar"/> class.
        /// </summary>
        /// <param name="serviceProvider">
        /// Requires:<para/>
        /// <see cref="INuGenTrackBarRenderer"/><para/>
        /// <see cref="INuGenButtonStateService"/><para/>
        /// <see cref="INuGenControlStateService"/><para/>
        /// <see cref="INuGenValueTrackerService"/><para/>
        /// </param>
        public NuGenTrackBar(INuGenServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            _trackButton = new TrackButton(serviceProvider);

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.Selectable, true);
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);

            this.BackColor = Color.Transparent;
            this.TabStop   = true;

            _trackButton.Parent    = this;
            _trackButton.TickStyle = this.TickStyle;

            _trackButton.MouseDown += this.TrackButton_MouseDown;
            _trackButton.MouseMove += this.TrackButton_MouseMove;
            _trackButton.MouseUp   += this.TrackButton_MouseUp;
            _trackButton.GotFocus  += this.TrackButton_GotFocus;
            _trackButton.LostFocus += this.TrackButton_LostFocus;

            this.ValueTracker.LargeChange = this.DefaultLargeChange;
            this.ValueTracker.Maximum     = this.DefaultMaximum;
            this.ValueTracker.Minimum     = this.DefaultMinimum;
            this.ValueTracker.SmallChange = this.DefaultSmallChange;
            this.ValueTracker.Value       = this.DefaultValue;

            this.AdjustTrackButtonBounds();
        }
示例#2
0
        private void OrderButton_Click(object sender, EventArgs e)
        {
            OrderButton.Hide();
            TrackButton.Hide();
            Button order = OrderButton;
            Button track = TrackButton;
            MakeorderUsercontrol orderControl = new MakeorderUsercontrol(order, track);

            orderControl.Location = new Point(80, 130);
            Controls.Add(orderControl);
        }
        void ReleaseDesignerOutlets()
        {
            if (EventTextField != null)
            {
                EventTextField.Dispose();
                EventTextField = null;
            }

            if (LoginButton != null)
            {
                LoginButton.Dispose();
                LoginButton = null;
            }

            if (ScreenTextField != null)
            {
                ScreenTextField.Dispose();
                ScreenTextField = null;
            }

            if (SetButton != null)
            {
                SetButton.Dispose();
                SetButton = null;
            }

            if (TestButton != null)
            {
                TestButton.Dispose();
                TestButton = null;
            }

            if (TrackButton != null)
            {
                TrackButton.Dispose();
                TrackButton = null;
            }

            if (UserIdTextField != null)
            {
                UserIdTextField.Dispose();
                UserIdTextField = null;
            }
        }
示例#4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenTrackBar"/> class.
		/// </summary>
		/// <param name="serviceProvider">
		/// Requires:<para/>
		/// <see cref="INuGenTrackBarRenderer"/><para/>
		/// <see cref="INuGenButtonStateService"/><para/>
		/// <see cref="INuGenControlStateService"/><para/>
		/// <see cref="INuGenValueTrackerService"/><para/>
		/// </param>
		public NuGenTrackBar(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
			_trackButton = new TrackButton(serviceProvider);

			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
			this.SetStyle(ControlStyles.ResizeRedraw, true);
			this.SetStyle(ControlStyles.Selectable, true);
			this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);

			this.BackColor = Color.Transparent;
			this.TabStop = true;

			_trackButton.Parent = this;
			_trackButton.TickStyle = this.TickStyle;

			_trackButton.MouseDown += this.TrackButton_MouseDown;
			_trackButton.MouseMove += this.TrackButton_MouseMove;
			_trackButton.MouseUp += this.TrackButton_MouseUp;
			_trackButton.GotFocus += this.TrackButton_GotFocus;
			_trackButton.LostFocus += this.TrackButton_LostFocus;

			this.ValueTracker.LargeChange = this.DefaultLargeChange;
			this.ValueTracker.Maximum = this.DefaultMaximum;
			this.ValueTracker.Minimum = this.DefaultMinimum;
			this.ValueTracker.SmallChange = this.DefaultSmallChange;
			this.ValueTracker.Value = this.DefaultValue;

			this.AdjustTrackButtonBounds();
		}