コード例 #1
0
        /// <summary>
        /// Initializes the component.
        /// </summary>
        private void InitializeComponent()
        {
            this.Slider = new Panel();
            base.SuspendLayout();
            this.Slider.BackColor = SystemColors.HotTrack;
            this.Slider.Dock      = DockStyle.Left;
            this.Slider.Location  = new Point(0, 0);
            this.Slider.Name      = "ProgressBar";
            Panel slider = this.Slider;

            System.Drawing.Size size = new System.Drawing.Size(0, 15);
            slider.Size              = size;
            this.Slider.TabIndex     = 1;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor           = Color.Silver;
            base.Controls.Add(this.Slider);
            base.Name = "ShiftProgressBar";
            size      = new System.Drawing.Size(410, 15);
            base.Size = size;
            ZeroitSupremeProgressBar shiftProgressBar = this;

            base.Resize += new EventHandler(shiftProgressBar.ShiftProgressBar_Resize);
            base.ResumeLayout(false);
        }
コード例 #2
0
 /// <summary>
 /// Applies the specified control.
 /// </summary>
 /// <param name="ctrl">The control.</param>
 /// <param name="Elipse">The elipse.</param>
 public void Apply(Control ctrl, int Elipse)
 {
     try
     {
         ctrl.Region = System.Drawing.Region.FromHrgn(ZeroitSupremeProgressBar.CreateRoundRectRgn(0, 0, ctrl.Width, ctrl.Height, Elipse, Elipse));
     }
     catch (Exception exception)
     {
         ProjectData.SetProjectError(exception);
         ProjectData.ClearProjectError();
     }
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZeroitSupremeProgressBar" /> class.
        /// </summary>
        public ZeroitSupremeProgressBar()
        {
            ZeroitSupremeProgressBar.__ENCAddToList(this);
            this.MaxVal = 100;
            this.Int0   = 5;
            this.InitializeComponent();
            //if (LicenseManager.CurrentContext.UsageMode == LicenseUsageMode.Designtime)
            //{
            //	if (!ShiftTechControls.ShiftTechSupport.License.Check(this))
            //	{
            //		Interaction.MsgBox("License is invalid or unknown! Please download a valid license from the Shift Technologies App.", MsgBoxStyle.Critical, null);
            //		this.Dispose();
            //	}
            //}

            #region MyRegion
            if (DesignMode)
            {
                timer.Tick += Timer_Tick;
                if (AutoAnimate)
                {
                    timer.Interval = 100;
                    timer.Start();
                }
            }

            if (!DesignMode)
            {
                timer.Tick += Timer_Tick;

                if (AutoAnimate)
                {
                    timer.Interval = 100;
                    timer.Start();
                }
            }



            #endregion
        }