示例#1
0
        /// <summary>
        /// Creates and initializes the structure and preview controls in the visual style builder
        /// </summary>
        /// <param name="previewSurface"></param>
        /// <returns></returns>
        public override ControlStyleBuilderInfoList GetThemeDesignedControls(System.Windows.Forms.Control previewSurface)
        {
            RadRadioButton button = new RadRadioButton();

            button.AutoSize    = true;
            button.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On;

            button.Text = "RadRadioButton";
            button.Size = new Size(120, 20);

            RadRadioButton buttonStructure = new RadRadioButton();

            button.AutoSize = true;

            buttonStructure.Text = "RadRadioButton";

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

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

            res.Add(designed);

            return(res);
        }
示例#2
0
        private void LogicalOperator_CheckedChanged(object sender, StateChangedEventArgs args)
        {
            RadRadioButton radRadioButton = sender as RadRadioButton;

            if (sender == this.radioButtonAndOperator && radRadioButton.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
            {
                this.LogicalOperator = FilterLogicalOperator.And;
            }
            else
            {
                if (sender != this.radioButtonOrOperator || radRadioButton.ToggleState != Telerik.WinControls.Enumerations.ToggleState.On)
                {
                    return;
                }
                this.LogicalOperator = FilterLogicalOperator.Or;
            }
        }
示例#3
0
 protected virtual void SetTabStops(bool tabPressed)
 {
     if (this.firstFocus && this.Parent != null)
     {
         int count = this.Parent.Controls.Count;
         for (int index = 0; index < count; ++index)
         {
             RadRadioButton control = this.Parent.Controls[index] as RadRadioButton;
             if (control != null)
             {
                 if (!tabPressed)
                 {
                     control.firstFocus = false;
                 }
                 control.TabStop = false;
             }
         }
     }
     this.TabStop = this.IsChecked;
 }
示例#4
0
 // Methods
 public RadRadioButtonAccessibleObject(RadRadioButton owner)
     : base(owner)
 {
     owner.ToggleStateChanged += new StateChangedEventHandler(owner_ToggleStateChanged);
 }
示例#5
0
 private void InitializeComponent()
 {
     this.radDropDownListLeftOperator  = new RadDropDownList();
     this.radDropDownListRightOperator = new RadDropDownList();
     this.radLabelFormTitle            = new RadLabel();
     this.radioButtonAndOperator       = new RadRadioButton();
     this.radioButtonOrOperator        = new RadRadioButton();
     this.radButtonOK     = new RadButton();
     this.radButtonCancel = new RadButton();
     this.groupBox        = new RadGroupBox();
     this.rchbNot         = new RadCheckBox();
     this.radDropDownListLeftOperator.BeginInit();
     this.radLabelFormTitle.BeginInit();
     this.radDropDownListRightOperator.BeginInit();
     this.radioButtonAndOperator.BeginInit();
     this.radioButtonOrOperator.BeginInit();
     this.radButtonOK.BeginInit();
     this.radButtonCancel.BeginInit();
     this.groupBox.BeginInit();
     this.rchbNot.BeginInit();
     this.groupBox.SuspendLayout();
     this.BeginInit();
     this.SuspendLayout();
     this.radDropDownListLeftOperator.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
     this.radDropDownListLeftOperator.DropDownStyle      = RadDropDownStyle.DropDownList;
     this.radDropDownListLeftOperator.Location           = new Point(13, 32);
     this.radDropDownListLeftOperator.Name     = "radComboBoxLeftOperator";
     this.radDropDownListLeftOperator.Size     = new Size(149, 21);
     this.radDropDownListLeftOperator.TabIndex = 0;
     this.radDropDownListLeftOperator.TabStop  = false;
     this.radLabelFormTitle.Location           = new Point(4, 12);
     this.radLabelFormTitle.Name     = "radLabelFormTitle";
     this.radLabelFormTitle.Size     = new Size(96, 18);
     this.radLabelFormTitle.TabIndex = 2;
     this.radLabelFormTitle.Text     = "Show rows where:";
     this.radDropDownListRightOperator.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
     this.radDropDownListRightOperator.DropDownStyle      = RadDropDownStyle.DropDownList;
     this.radDropDownListRightOperator.Location           = new Point(13, 79);
     this.radDropDownListRightOperator.Name     = "radComboBoxRightOperator";
     this.radDropDownListRightOperator.Size     = new Size(149, 21);
     this.radDropDownListRightOperator.TabIndex = 4;
     this.radDropDownListRightOperator.TabStop  = false;
     this.radioButtonAndOperator.AutoSize       = true;
     this.radioButtonAndOperator.Location       = new Point(43, 57);
     this.radioButtonAndOperator.Name           = "radioButtonAndOperator";
     this.radioButtonAndOperator.Size           = new Size(46, 17);
     this.radioButtonAndOperator.TabIndex       = 2;
     this.radioButtonAndOperator.TabStop        = true;
     this.radioButtonAndOperator.Text           = "And";
     this.radioButtonOrOperator.AutoSize        = true;
     this.radioButtonOrOperator.Location        = new Point(93, 57);
     this.radioButtonOrOperator.Name            = "radioButtonOrOperator";
     this.radioButtonOrOperator.Size            = new Size(38, 17);
     this.radioButtonOrOperator.TabIndex        = 3;
     this.radioButtonOrOperator.TabStop         = true;
     this.radioButtonOrOperator.Text            = "Or";
     this.radButtonOK.DialogResult     = DialogResult.OK;
     this.radButtonOK.Location         = new Point(196, 161);
     this.radButtonOK.Name             = "radButtonOK";
     this.radButtonOK.Size             = new Size(75, 23);
     this.radButtonOK.TabIndex         = 6;
     this.radButtonOK.Text             = "OK";
     this.radButtonOK.Click           += new EventHandler(this.radButtonOK_Click);
     this.radButtonCancel.DialogResult = DialogResult.Cancel;
     this.radButtonCancel.Location     = new Point(280, 161);
     this.radButtonCancel.Name         = "radButtonCancel";
     this.radButtonCancel.Size         = new Size(75, 23);
     this.radButtonCancel.TabIndex     = 7;
     this.radButtonCancel.Text         = "Cancel";
     this.radButtonCancel.Click       += new EventHandler(this.radButtonCancel_Click);
     this.groupBox.BackColor           = Color.Transparent;
     this.groupBox.Controls.Add((Control)this.radDropDownListLeftOperator);
     this.groupBox.Controls.Add((Control)this.rchbNot);
     this.groupBox.Controls.Add((Control)this.radDropDownListRightOperator);
     this.groupBox.Controls.Add((Control)this.radioButtonAndOperator);
     this.groupBox.Controls.Add((Control)this.radioButtonOrOperator);
     this.groupBox.FooterImageIndex = -1;
     this.groupBox.FooterImageKey   = "";
     this.groupBox.HeaderImageIndex = -1;
     this.groupBox.HeaderImageKey   = "";
     this.groupBox.HeaderMargin     = new Padding(0);
     this.groupBox.Location         = new Point(4, 36);
     this.groupBox.Name             = "groupBox";
     this.groupBox.RootElement.EnableElementShadow = false;
     this.groupBox.Size               = new Size(361, 119);
     this.groupBox.TabIndex           = 9;
     this.rchbNot.Location            = new Point(14, 1);
     this.rchbNot.Name                = "rchbNot";
     this.rchbNot.Size                = new Size(39, 18);
     this.rchbNot.TabIndex            = 8;
     this.rchbNot.Text                = "Not";
     this.rchbNot.ToggleStateChanged += new StateChangedEventHandler(this.rchbNot_ToggleStateChanged);
     this.AcceptButton                = (IButtonControl)this.radButtonOK;
     this.CancelButton                = (IButtonControl)this.radButtonCancel;
     this.AutoScaleDimensions         = new SizeF(6f, 13f);
     this.AutoScaleMode               = AutoScaleMode.None;
     this.ClientSize = new Size(370, 196);
     this.Controls.Add((Control)this.groupBox);
     this.Controls.Add((Control)this.radButtonCancel);
     this.Controls.Add((Control)this.radButtonOK);
     this.Controls.Add((Control)this.radLabelFormTitle);
     this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
     this.Name            = nameof(CompositeFilterForm);
     this.MaximizeBox     = false;
     this.RootElement.ApplyShapeToControl = true;
     this.StartPosition = FormStartPosition.CenterScreen;
     this.Text          = "ComplexFilterForm";
     this.radDropDownListLeftOperator.EndInit();
     this.radDropDownListRightOperator.EndInit();
     this.radioButtonAndOperator.EndInit();
     this.radioButtonOrOperator.EndInit();
     this.radLabelFormTitle.EndInit();
     this.radButtonOK.EndInit();
     this.radButtonCancel.EndInit();
     this.groupBox.EndInit();
     this.rchbNot.EndInit();
     this.groupBox.ResumeLayout(false);
     this.groupBox.PerformLayout();
     this.EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }