Beispiel #1
0
        public void AddOption(StringItem option)
        {
            option.Number = Convert.ToByte(_items.Count + 1);
            _items.Add(option);
            var oc = new UCStringItem(option);

            oc.Width        = fLPanel.Width - 30;
            oc.Anchor       = AnchorStyles.Right | AnchorStyles.Left;
            oc.ItemRemoved += OptionRemoved;
            fLPanel.Controls.Add(oc);
        }
Beispiel #2
0
        private void Make()
        {
            fLPanel.Controls.Clear();
            byte i = 1;

            foreach (StringItem o in _items)
            {
                o.Number = i++;

                var oc = new UCStringItem(o);
                //oc.CheckedChanged += OptionItem_CheckedChanged;
                oc.Width = fLPanel.Width - 30;
                //oc.Anchor = AnchorStyles.Right | AnchorStyles.Left;



                oc.ItemRemoved += OptionRemoved;

                fLPanel.Controls.Add(oc);
            }
        }
Beispiel #3
0
 private void OptionRemoved(UCStringItem ucoptionpractical)
 {
     _items.Remove(ucoptionpractical.Item);
     fLPanel.Controls.Remove(ucoptionpractical);
     RefreshNumbers();
 }