예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:FillStyleCommand"/> class.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="bundle">The bundle.</param>
 /// <param name="paintStyle">The paint style.</param>
 public FillStyleCommand(IController controller, CollectionBase<IDiagramEntity> bundle, IPaintStyle paintStyle)
   : base(controller) {
   this.Text = "Fill style";
   this.controller = controller;
   this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
   this.newStyle = paintStyle;
 }
예제 #2
0
 // ------------------------------------------------------------------
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="paintStyle">IPaintStyle: The IPaintStyle that
 /// changed.</param>
 /// <param name="newFillType">FillType: The new fill type.</param>
 // ------------------------------------------------------------------
 public PaintStyleChangedEventArgs(
     IPaintStyle paintStyle,
     FillType newFillType)
 {
     mPaintStyle = paintStyle;
     mFillType   = newFillType;
 }
예제 #3
0
        /// <summary>
        /// Changes the paint style of the selected entities
        /// </summary>
        /// <param name="paintStyle"></param>
        public void ChangeStyle(IPaintStyle paintStyle)
        {
            //note that you need a copy of the selected item otherwise the undo/redo will fail once the selection has changed
            FillStyleCommand cmd = new FillStyleCommand(this, Selection.SelectedItems.Copy(), paintStyle);

            this.UndoManager.AddUndoCommand(cmd);
            cmd.Redo();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:FillStyleCommand"/> class.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="bundle">The bundle.</param>
 /// <param name="paintStyle">The paint style.</param>
 public FillStyleCommand(IController controller, CollectionBase <IDiagramEntity> bundle, IPaintStyle paintStyle)
     : base(controller)
 {
     this.Text       = "Fill style";
     this.controller = controller;
     this.bundle     = bundle;//the bundle should contain only IShape and IConnection entities!
     this.newStyle   = paintStyle;
 }
 /// <summary>
 /// Changes the paint style of the selected entities
 /// </summary>
 /// <param name="paintStyle"></param>
 public void ChangeStyle(IPaintStyle paintStyle)
 {
     //note that you need a copy of the selected item otherwise the undo/redo will fail once the selection has changed
     FillStyleCommand cmd = new FillStyleCommand(this, Selection.SelectedItems.Copy(), paintStyle);
     this.UndoManager.AddUndoCommand(cmd);
     cmd.Redo();
 }
예제 #6
0
 /// <summary>
 ///  Changes the paint style of the selected entities.
 /// </summary>
 /// <param name="paintStyle">The paint style.</param>
 public void ChangeStyle(IPaintStyle paintStyle)
 {
     this.Controller.ChangeStyle(paintStyle);
 }
예제 #7
0
 /// <summary>
 ///  Changes the paint style of the selected entities.
 /// </summary>
 /// <param name="paintStyle">The paint style.</param>
 public void ChangeStyle(IPaintStyle paintStyle)
 {
     this.Controller.ChangeStyle(paintStyle);
 }