Exemple #1
0
        public void AddElement(string text)
        {
            var index = _elements.Count;
            var el    = new ElementControl
            {
                Index        = index,
                LabeledText  = text,
                Dock         = DockStyle.Top,
                ElementColor = ElementsColor,
                Height       = ElementHeight
            };

            el.ButtonClick += el_ButtonClick;
            panelExElementsContainer.Controls.Add(el);
            _elements.Add(el);

            SelectedIndex = index;
        }
        public void AddElement(string text)
        {
            var index = _elements.Count;
            var el = new ElementControl
            {
                Index = index,
                LabeledText = text,
                Dock = DockStyle.Top,
                ElementColor = ElementsColor,
                Height = ElementHeight
            };
            el.ButtonClick += el_ButtonClick;
            panelExElementsContainer.Controls.Add(el);
            _elements.Add(el);

            SelectedIndex = index;
        }