Example #1
0
        private void AddCheckToListBox(RadToolStripItem item, FloatingForm form, RadToolStripManager manager)
        {
            CheckItem checkBox = new CheckItem(item, form, manager);

            checkBox.Alignment       = ContentAlignment.MiddleLeft;
            this.radListBox1.Visible = true;

            if (item != null)
            {
                if (item.Text == "")
                {
                    return;
                }

                checkBox.Text = item.Text;
                if (item.Visibility == ElementVisibility.Visible)
                {
                    checkBox.ToggleState = ToggleState.On;
                }
                else
                {
                    checkBox.ToggleState = ToggleState.Off;
                }
            }
            else if (form != null)
            {
                checkBox.Text = form.Text;
                if (form.Visible)
                {
                    checkBox.ToggleState = ToggleState.On;
                }
                else
                {
                    checkBox.ToggleState = ToggleState.Off;
                }
            }

            checkBox.MinSize = new Size(150, 20);
            checkBox.Click  += new EventHandler(checkBox_Click);

            if (!this.radListBox1.Items.Contains(checkBox))
            {
                this.radListBox1.Items.Add(checkBox);
            }
        }
Example #2
0
 public CheckItem(RadToolStripItem item, FloatingForm form, RadToolStripManager manager)
 {
     this.associatedItem    = item;
     this.associatedForm    = form;
     this.associatedManager = manager;
 }