Does the diagram support Formatting and Edit commands?

Developer
Feb 22, 2012 at 9:05 AM

I am trying to work with the editing commands (Copy,Cut and Paste) and Formatting commands(Align to grid, align left,align right ...etc)

I tried working with the ClipBoardCommand like shown below;

  public void Copy()
        {
            ClipboardCommand cmd = new ClipboardCommand(this.Controller);
            cmd.CommandText = "copy";
            this.Controller.Model.Elements.SetModifiable(true);
            cmd.Shapes= Controller.Model.SelectedShapes();
            cmd.Lines = Controller.Model.SelectedLines();
            cmd.Execute();
        }
        public void Cut()
        {
            ClipboardCommand cmd = new ClipboardCommand(this.Controller);
            cmd.CommandText = "cut";
            this.Controller.Model.Elements.SetModifiable(true);
            cmd.Shapes = Controller.Model.SelectedShapes();
            cmd.Lines = Controller.Model.SelectedLines();
            cmd.Execute();

        }
        public void Paste()
        {
            ClipboardCommand cmd = new ClipboardCommand(this.Controller);
            cmd.CommandText = "paste";
            this.Controller.Model.Elements.SetModifiable(true);
            cmd.Shapes = Controller.Model.SelectedShapes();
            cmd.Lines = Controller.Model.SelectedLines();
            cmd.Execute();
        }

this is all done in the Diagram.cs but it does not seem to work. Is there something am doing wrong?

Thank you in advance.