Ejemplo n.º 1
0
        private void extButton2_Click(object sender, EventArgs e)
        {
            CheckedListBoxForm f = new CheckedListBoxForm();

            f.Items.AddRange(new string[] { "One", "Two", "Three", "Four" });
            f.PositionBelow(extButton2, new Size(200, 500));
            f.SetChecked("Two;Four");
            f.CheckedChanged += F_CheckedChanged;
            f.Show(this);
        }
Ejemplo n.º 2
0
        public static List <string> ShowCheckBoxOptionsForm(IList items, Control parentControl)
        {
            CheckedListBoxForm        popup           = new CheckedListBoxForm();
            CheckBoxOptionsController popupController = new CheckBoxOptionsController(popup, items);

            popupController.LoadView();
            DialogResult dialogResult = popup.ShowDialog(parentControl);

            popup.Dispose();
            return(popupController.SelectedItems);
        }
Ejemplo n.º 3
0
 private void button17_Click(object sender, EventArgs e)
 {
     if (cc == null)
     {
         Button b = sender as Button;
         cc = new CheckedListBoxForm();
         cc.Items.Add("One");
         cc.Items.Add("Two");
         cc.Items.Add("Three four five six seven eight nine ten");
         cc.Items.Add("Four");
         cc.FormClosed += FormClosed2;
         cc.PositionBelow(b, new Size(b.Width, 400));
         cc.Show();
     }
     else
     {
         cc.Close();
     }
 }
Ejemplo n.º 4
0
 private void FormClosed2(Object sender, FormClosedEventArgs e)
 {
     cc = null;
 }