Esempio n. 1
0
        protected override void Execute(bool isRedo)
        {
            oldColor = Node.Color;

            Node.ChangeColor(newColor);

            if (isRedo)
            {
                Node.Select();
            }
        }
Esempio n. 2
0
        public static void ChangeColorTransactional(this NodeBase node, INodeColor color)
        {
            if (node.Document != null && !Equals(node.Color, color) && color != null)
            {
                var transactionName = LocalizationManager.GetString("TransactionName_ChangeColor");

                node.Document.MakeTransaction(transactionName, commands =>
                {
                    commands.Apply(new ChangeColorCommand(node, color));
                });
            }
        }
Esempio n. 3
0
 public ChangeColorCommand(NodeBase node, INodeColor newColor)
     : base(node)
 {
     this.newColor = newColor;
 }
Esempio n. 4
0
 public ChangeColorCommand(PropertiesBag properties, Document document)
     : base(properties, document)
 {
     newColor = ThemeColor.TryParse(properties) ?? ValueColor.TryParse(properties);
 }
Esempio n. 5
0
 public bool Equals(INodeColor other)
 {
     return(Equals(other as ValueColor));
 }
Esempio n. 6
0
 internal void ChangeColor(INodeColor newColor)
 {
     Color = newColor;
 }