Beispiel #1
0
        private void AddNewProps()
        {
            ItemPanel1.BeginUpdate();

            // Find new ID
            int  id   = 0;
            bool ende = false;

            while (!ende)
            {
                ende = true;
                foreach (DisplaylistProps props2 in propsList.OrderBy(n => n.ID))
                {
                    if (props2.ID == id)
                    {
                        id   = props2.ID + 1;
                        ende = false;
                    }
                }
            }

            // Create Props & Items
            var props = new DisplaylistProps(id);
            var item  = GetItem(props);

            propsList.Add(props);
            ItemPanel1.Items.Insert(ItemPanel1.Items.Count - 1, item);
            ItemPanel1.EndUpdate();
        }
        // C o n s t r u c t o r

        public CustomDisplaylistEntryEditor(DisplaylistProps props)
        {
            Props = props;
            InitializeComponent();
            StyleManager.UpdateAmbientColors(this);
            ComboBoxEx_Layer.Items.AddRange(PublicFunctions.GetDefaultGeolayerComboItems());
            LoadProps();
            isLoading = false;
        }
Beispiel #3
0
        // F e a t u r e s

        private BaseItem GetItem(DisplaylistProps props)
        {
            var editorControl = new CustomDisplaylistEntryEditor(props)
            {
                BackColor = Color.Transparent
            };

            editorControl.RemoveButtonClicked += RemoveProps;
            var containerItem = new ControlContainerItem()
            {
                Control = editorControl,
                Stretch = true
            };

            return(containerItem);
        }