Exemple #1
0
        void solutionWindow_InterfaceChosen(EditInterfaceViewEventArgs evt)
        {
            EditInterface editInterface = evt.EditInterface;

            if (editInterface.hasEditableProperties())
            {
                //Determine if the EditInterface is an ObjectPlaceholderInterface
                ObjectPlaceholderInterface objectPlaceholder = editInterface.getEditableProperties().First() as ObjectPlaceholderInterface;
                if (objectPlaceholder != null)
                {
                    showPlaceholder(objectPlaceholder);
                }
                else
                {
                    objectEditor.setEditInterface(editInterface, null, null);
                }
            }
            else if (editInterface.canAddRemoveProperties())
            {
                objectEditor.setEditInterface(editInterface, null, null);
            }
            else
            {
                objectEditor.clearEditInterface();
            }
            processInstanceSelection(editInterface);
        }
Exemple #2
0
 private void processInstanceSelection(EditInterface editInterface)
 {
     if (editInterface.hasEditableProperties())
     {
         InstanceFileInterface instanceFile = editInterface.getEditableProperties().First() as InstanceFileInterface;
         if (instanceFile != null)
         {
             if (AddSelectable.HeldDown)
             {
                 controller.SelectionController.addSelectedObject(instanceFile);
             }
             else if (RemoveSelectable.HeldDown)
             {
                 controller.SelectionController.removeSelectedObject(instanceFile);
             }
             else
             {
                 controller.SelectionController.setSelectedObject(instanceFile);
             }
         }
         else
         {
             controller.SelectionController.clearSelection();
         }
     }
     else
     {
         controller.SelectionController.clearSelection();
     }
 }