Пример #1
0
 /// <summary>
 /// Populate the ElementsBox listview
 /// </summary>
 void RebuildElementsBox()
 {
     ElementsBox.Items.Clear();
     ElementsBox.BeginUpdate();
     //	foreach (GuiBase element in CurrentLayout.Elements)
     //		ElementsBox.Items.Add(element.Name);
     ElementsBox.EndUpdate();
 }
Пример #2
0
        /// <summary>
        /// Select an element by its name
        /// </summary>
        /// <param name="name"></param>
        void SelectElement(string name)
        {
            CurrentElement = CurrentLayout.GetElement(name);

            if (CurrentElement != null)
            {
                SelectionBox.Rectangle            = CurrentElement.Rectangle;
                ElementPropertyBox.SelectedObject = CurrentElement;
                ElementsBox.SelectedItem          = name;
            }
            else
            {
                SelectionBox.Rectangle            = Rectangle.Empty;
                ElementPropertyBox.SelectedObject = null;
                if (ElementsBox.SelectedIndex != -1)
                {
                    ElementsBox.SetSelected(ElementsBox.SelectedIndex, false);
                }
            }
        }