Exemple #1
0
        //public Command CommandDropOver { get; set; }

        private void SetupCommands()
        {
            CommandRedo                = new SimpleCommand(this, CommandUndoRedo.Redo);
            CommandUndo                = new SimpleCommand(this, CommandUndoRedo.Undo);
            CommandSelectAll           = new SimpleCommand(this, SelectedAll);
            CommandUnSelectAll         = new SimpleCommand(this, UnSelectedAll);
            CommandSelectorIntersect   = new SimpleCommand(this, SelectorIntersect);
            CommandCutterIntersect     = new SimpleCommand(this, CutterIntersect);
            CommandValidateNodeName    = new SimpleCommandWithParameter <ValidateObjectProperty <ViewModelNode, string> >(this, ValidateNodeName);
            CommandValidateConnectName = new SimpleCommandWithParameter <ValidateObjectProperty <ViewModelConnector, string> >(this, ValidateConnectName);

            CommandPartMoveAllNode         = new SimpleCommandWithParameter <MyPoint>(this, PartMoveAllNode);
            CommandPartMoveAllSelectedNode = new SimpleCommandWithParameter <MyPoint>(this, PartMoveAllSelectedNode);
            CommandZoom = new SimpleCommandWithParameter <object>(this, Zoom);

            //CommandAddConnect = new Command<ViewModelConnect, ViewModelConnect>(this, AddConnect, DeleteConnect);
            //CommandDeleteNode = new Command<MyPoint, ViewModelNode>(this, DeleteNode,);
            CommandSelect = new SimpleCommandWithParameter <MyPoint>(this, StartSelect);
            CommandCut    = new SimpleCommandWithParameter <MyPoint>(this, StartCut);

            CommandAddFreeConnect = new SimpleCommandWithParameter <ViewModelConnector>(this, AddFreeConnect);

            CommandDeleteFreeConnect       = new SimpleCommand(this, DeleteFreeConnect);
            CommandFullMoveAllNode         = new Command <MyPoint, List <ViewModelNode> >(this, FullMoveAllNode, UnFullMoveAllNode);
            CommandFullMoveAllSelectedNode = new Command <MyPoint, List <ViewModelNode> >(this, FullMoveAllSelectedNode, UnFullMoveAllSelectedNode);
            CommandAddNode             = new Command <MyPoint, ViewModelNode>(this, AddNode, DeleteNode);
            CommandAddConnect          = new Command <ViewModelConnect, ViewModelConnect>(this, AddConnect, DeleteConnect);
            CommandDeleteSelectedNodes = new Command <List <ViewModelNode>, List <ViewModelNode> >(this, DeleteSelectedNode, UnDeleteSelectedNode);
        }
Exemple #2
0
        private void SetupCommands()
        {
            CommandConnectPointDrag = new SimpleCommand(this, ConnectPointDrag);
            CommandConnectPointDrop = new SimpleCommand(this, ConnectPointDrop);

            CommandCheckConnectPointDrop = new SimpleCommand(this, CheckConnectPointDrop);

            CommandConnectorDrag      = new SimpleCommand(this, ConnectorDrag);
            CommandConnectorDragEnter = new SimpleCommand(this, ConnectorDragEnter);
            CommandConnectorDragOver  = new SimpleCommand(this, ConnectorDragOver);
            CommandConnectorDragLeave = new SimpleCommand(this, ConnectorDragLeave);

            CommandConnectorDrop      = new SimpleCommand(this, ConnectorDrop);
            CommandCheckConnectorDrop = new SimpleCommand(this, CheckConnectorDrop);



            CommandAdd          = new SimpleCommand(this, Add);
            CommandDelete       = new SimpleCommand(this, Delete);
            CommandMove         = new SimpleCommandWithParameter <MyPoint>(this, Move);
            CommandValidateName = new SimpleCommandWithParameter <string>(this, ValidateName);


            //SimpleCommandWithResult<bool, Func<bool>> t = new SimpleCommandWithResult<bool, Func<bool>>()
        }
Exemple #3
0
        //public SimpleCommand CommandTransitionsDragLeave { get; set; }

        //public SimpleCommand CommandTransitionsDragEnter { get; set; }

        //public SimpleCommand CommandTransitionsDrop { get; set; }

        //public SimpleCommand CommandTransitionsDragOver { get; set; }

        //public SimpleCommandWithParameter<ViewModelConnector> CommandConnectorDrag { get; set; }

        private void SetupCommands()
        {
            CommandSelect            = new SimpleCommandWithParameter <object>(this, Select);
            CommandMove              = new SimpleCommandWithParameter <MyPoint>(this, Move);
            CommandCollapse          = new SimpleCommandWithParameter <object>(this, Collapse);
            CommandAddEmptyConnector = new SimpleCommand(this, AddEmptyConnector);

            //CommandTransitionsDragLeave = new SimpleCommand(this, TransitionsDragLeave);
            //CommandTransitionsDragEnter = new SimpleCommand(this, TransitionsDragEnter);
            //CommandTransitionsDrop = new SimpleCommand(this, TransitionsDrop);
            //CommandTransitionsDragOver = new SimpleCommand(this, TransitionsDragOver);
            //CommandConnectorDrag = new SimpleCommandWithParameter<ViewModelConnector>(this, ConnectorDrag);

            CommandAddConnector    = new SimpleCommandWithParameter <ViewModelConnector>(this, AddConnector);
            CommandDeleteConnector = new SimpleCommandWithParameter <ViewModelConnector>(this, DeleteConnector);
            CommandValidateName    = new SimpleCommandWithParameter <string>(this, ValidateName);
        }
Exemple #4
0
 private void SetupCommands()
 {
     CommandStartSelect = new SimpleCommandWithParameter <MyPoint>(this, StartSelect);
     CommandEndSelect   = new SimpleCommand(this, EndSelect);
 }