Exemplo n.º 1
0
        public ICommand CreateCommand()
        {
            PathObjectTypeDialog dialog = new PathObjectTypeDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                ICommand cmd = new AddPathObjectTypeCommand(app, parent, dialog.pathObjectType);
                return(cmd);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        public ICommand CreateCommand()
        {
            PathObjectTypeDialog dialog = new PathObjectTypeDialog();

            dialog.pathObjectType = pathObjectTypeNode.PathObjectType;
            PathObjectType beforePathObjectType = new PathObjectType(dialog.pathObjectType);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                PathObjectType afterPathObjectType = new PathObjectType(dialog.pathObjectType);
                ICommand       cmd = new EditPathObjectTypeCommand(app, parent, pathObjectTypeNode,
                                                                   beforePathObjectType, afterPathObjectType);
                return(cmd);
            }
            else
            {
                return(null);
            }
        }
 public ICommand CreateCommand()
 {
     PathObjectTypeDialog dialog = new PathObjectTypeDialog();
     dialog.pathObjectType = pathObjectTypeNode.PathObjectType;
     PathObjectType beforePathObjectType = new PathObjectType(dialog.pathObjectType);
     if (dialog.ShowDialog() == DialogResult.OK) {
         PathObjectType afterPathObjectType = new PathObjectType(dialog.pathObjectType);
         ICommand cmd = new EditPathObjectTypeCommand(app, parent, pathObjectTypeNode,
                                                      beforePathObjectType, afterPathObjectType);
         return cmd;
     }
     else
         return null;
 }
 public ICommand CreateCommand()
 {
     PathObjectTypeDialog dialog = new PathObjectTypeDialog();
     if (dialog.ShowDialog() == DialogResult.OK) {
         ICommand cmd = new AddPathObjectTypeCommand(app, parent, dialog.pathObjectType);
         return cmd;
     }
     else
         return null;
 }