Пример #1
0
        protected override void OnClick(EventArgs e)
        {
            bool flag = this.timer != null && this.timer.Enabled;

            if (flag)
            {
                this.timer.Enabled = false;
            }
            base.OnClick(e);
            RadRepeatButton radRepeatButton = (RadRepeatButton)null;

            if (this.ElementTree != null)
            {
                radRepeatButton = this.ElementTree.Control as RadRepeatButton;
            }
            radRepeatButton?.PerformButtonClick();
            if (!flag)
            {
                return;
            }
            this.timer.Enabled = flag;
        }
Пример #2
0
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadRepeatButton button = new RadRepeatButton();

            button.AutoSize = false;
            button.Size     = new Size(120, 65);

            button.Text = "RadRepeatButton";

            RadRepeatButton buttonStructure = new RadRepeatButton();

            button.AutoSize = true;

            buttonStructure.Text = "RadRepeatButton";

            ControlStyleBuilderInfo designed = new ControlStyleBuilderInfo(button, buttonStructure.RootElement);

            designed.MainElementClassName = typeof(RadRepeatButtonElement).FullName;
            ControlStyleBuilderInfoList res = new ControlStyleBuilderInfoList();

            res.Add(designed);

            return(res);
        }
Пример #3
0
 private void InitializeComponent()
 {
     this.radTextBox1 = new RadTextBox();
     this.plusButton  = new RadRepeatButton();
     this.minusButton = new RadRepeatButton();
     this.radPanel1   = new RadPanel();
     this.radTextBox1.BeginInit();
     this.plusButton.BeginInit();
     this.minusButton.BeginInit();
     this.radPanel1.BeginInit();
     this.radPanel1.SuspendLayout();
     this.SuspendLayout();
     this.radTextBox1.Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.radTextBox1.AutoSize = false;
     this.radTextBox1.Location = new Point(26, 2);
     this.radTextBox1.Name     = "radTextBox1";
     this.radTextBox1.RootElement.StretchVertically = true;
     this.radTextBox1.Size     = new Size(62, 17);
     this.radTextBox1.TabIndex = 2;
     this.radTextBox1.TabStop  = false;
     this.radTextBox1.Text     = "text";
     this.radTextBox1.GetChildAt(0).StretchVertically        = true;
     ((RadItem)this.radTextBox1.GetChildAt(0)).Text          = "text";
     this.radTextBox1.GetChildAt(0).GetChildAt(0).Alignment  = ContentAlignment.MiddleCenter;
     this.radTextBox1.GetChildAt(0).GetChildAt(2).Visibility = ElementVisibility.Collapsed;
     this.plusButton.Dock      = DockStyle.Right;
     this.plusButton.Location  = new Point(88, 1);
     this.plusButton.Name      = "plusButton";
     this.plusButton.Size      = new Size(25, 19);
     this.plusButton.TabIndex  = 1;
     this.plusButton.Text      = "+";
     this.plusButton.Click    += new EventHandler(this.plusButton_Click);
     this.minusButton.Dock     = DockStyle.Left;
     this.minusButton.Location = new Point(1, 1);
     this.minusButton.Name     = "minusButton";
     this.minusButton.Size     = new Size(25, 19);
     this.minusButton.TabIndex = 0;
     this.minusButton.Text     = "-";
     this.minusButton.Click   += new EventHandler(this.minusButton_Click);
     this.radPanel1.Controls.Add((Control)this.radTextBox1);
     this.radPanel1.Controls.Add((Control)this.plusButton);
     this.radPanel1.Controls.Add((Control)this.minusButton);
     this.radPanel1.Dock                = DockStyle.Fill;
     this.radPanel1.Location            = new Point(0, 0);
     this.radPanel1.Name                = "radPanel1";
     this.radPanel1.Padding             = new Padding(1);
     this.radPanel1.RootElement.Padding = new Padding(1);
     this.radPanel1.Size                = new Size(114, 21);
     this.radPanel1.TabIndex            = 3;
     this.AutoScaleDimensions           = new SizeF(6f, 13f);
     this.AutoScaleMode = AutoScaleMode.None;
     this.Controls.Add((Control)this.radPanel1);
     this.Name = nameof(PlusMinusEditor);
     this.Size = new Size(114, 21);
     this.radTextBox1.EndInit();
     this.plusButton.EndInit();
     this.minusButton.EndInit();
     this.radPanel1.EndInit();
     this.radPanel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }