Ejemplo n.º 1
0
        private void UpdateButtons()
        {
            buttonRunHelperSetup.Enabled = comboBoxSetupHelperType.SelectedIndex >= 0;
            buttonAddTemplate.Enabled    = comboBoxNewItemType.SelectedIndex >= 0;

            List <ElementNode> elementList = SelectedElements.ToList();

            buttonRunHelperSetup.Enabled    = (elementList.Any());
            buttonAddProperty.Enabled       = (elementList.Any());
            buttonRemoveProperty.Enabled    = listViewProperties.Items.Count > 0 && listViewProperties.SelectedItems.Count > 0;
            buttonConfigureProperty.Enabled = listViewProperties.Items.Count > 0 && listViewProperties.SelectedItems.Count == 1;
        }
Ejemplo n.º 2
0
        public void OnSelectionChanged()
        {
            var selectedElements = SelectedElements.ToList();

            if (selectedElements.Count == 1)
            {
                _inspectorTool.SelectedObject = new InspectableObjectBuilder()
                                                .WithObjectProperties(selectedElements[0], x => true)
                                                .ToInspectableObject();
            }
            //else
            //    _inspectorTool.SelectedObject = null;
        }
Ejemplo n.º 3
0
 private void beginDragSelect(Point gridLocation)
 {
     m_dragState = DragState.Selecting;
     if (!ShiftPressed)
     {
         ClearSelectedElements();
     }
     else
     {
         tempSelectedElements = SelectedElements.ToList();
     }
     ClearSelectedRows(m_mouseDownElementRow);
     ClearActiveRows(m_mouseDownElementRow);
     SelectionArea             = new Rectangle(gridLocation.X, gridLocation.Y, 0, 0);
     m_selectionRectangleStart = gridLocation;
 }
Ejemplo n.º 4
0
 public void SaveAsPng(string filename, bool selectionOnly = false)
 {
     selectionOnly.If(() => SaveAsPng(filename, SelectedElements.ToList())).Else(() => SaveAsPng(filename, elements));
 }