示例#1
0
        // implement IChangeDataValue for undo/redo
        public void ChangeDataValue(ModelChangedEventArgs e, bool undo)
        {
            switch (e.PropertyName)
            {
            case "Color": this.Color = (String)e.GetValue(undo); break;

            default: throw new NotImplementedException("Socket change: " + e.ToString());
            }
        }
示例#2
0
 override public void ChangeDataValue(ModelChangedEventArgs e, bool undo)
 {
     if (e == null)
     {
         return;
     }
     if (e.PropertyName == "IsDynamic")
     {
         this.IsDynamic = (bool)e.GetValue(undo);
     }
     else
     {
         base.ChangeDataValue(e, undo);
     }
 }