/// <summary>
 /// Initializes a new instance of the <see cref="T:PenStyleCommand"/> class.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="bundle">The bundle.</param>
 /// <param name="penStyle">The pen style.</param>
 public PenStyleCommand(IController controller, CollectionBase<IDiagramEntity> bundle, IPenStyle penStyle)
   : base(controller) {
   this.Text = "Fill style";
   this.controller = controller;
   this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
   this.newStyle = penStyle;
 }
Beispiel #2
0
        /// <summary>
        /// Changes the style.
        /// </summary>
        /// <param name="penStyle">The pen style.</param>
        public void ChangeStyle(IPenStyle penStyle)
        {
            PenStyleCommand cmd = new PenStyleCommand(this, Selection.SelectedItems.Copy(), penStyle);

            this.UndoManager.AddUndoCommand(cmd);
            cmd.Redo();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:PenStyleCommand"/> class.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="bundle">The bundle.</param>
 /// <param name="penStyle">The pen style.</param>
 public PenStyleCommand(IController controller, CollectionBase <IDiagramEntity> bundle, IPenStyle penStyle)
     : base(controller)
 {
     this.Text       = "Fill style";
     this.controller = controller;
     this.bundle     = bundle;//the bundle should contain only IShape and IConnection entities!
     this.newStyle   = penStyle;
 }
 /// <summary>
 /// Changes the style.
 /// </summary>
 /// <param name="penStyle">The pen style.</param>
 public void ChangeStyle(IPenStyle penStyle)
 {
     PenStyleCommand cmd = new PenStyleCommand(this, Selection.SelectedItems.Copy(), penStyle);
     this.UndoManager.AddUndoCommand(cmd);
     cmd.Redo();
 }
Beispiel #5
0
 /// <summary>
 /// Changes the pen style of the selected entities.
 /// </summary>
 /// <param name="penStyle"></param>
 public void ChangeStyle(IPenStyle penStyle)
 {
     this.Controller.ChangeStyle(penStyle);
 }
 /// <summary>
 /// Changes the pen style of the selected entities.
 /// </summary>
 /// <param name="penStyle"></param>
 public void ChangeStyle(IPenStyle penStyle)
 {
     this.Controller.ChangeStyle(penStyle);
 }