Beispiel #1
0
 public virtual void ChangeValue(ChangedEventArgs e, bool undo)
 {
     switch (e.SubHint)
     {
         case 1000:
             {
                 return;
             }
         case 0x3e9:
             {
                 this.myBounds = e.GetRect(undo);
                 this.InvalidateViews();
                 return;
             }
         case 0x3eb:
             {
                 this.Visible = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3ec:
             {
                 this.Selectable = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3ed:
             {
                 this.Movable = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3ee:
             {
                 this.Copyable = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3ef:
             {
                 this.Resizable = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f0:
             {
                 this.Reshapable = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f1:
             {
                 this.Deletable = (bool)e.GetValue(undo);
                 return;
             }
         case 1010:
             {
                 this.Editable = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f3:
             {
                 this.AutoRescales = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f4:
             {
                 this.ResizesRealtime = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f5:
             {
                 this.Shadowed = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f6:
             {
                 DiagramShape obj1 = e.NewValue as DiagramShape;
                 if (!undo)
                 {
                     this.AddObserver(obj1);
                     return;
                 }
                 this.RemoveObserver(obj1);
                 return;
             }
         case 0x3f7:
             {
                 DiagramShape obj2 = e.OldValue as DiagramShape;
                 if (!undo)
                 {
                     this.RemoveObserver(obj2);
                     return;
                 }
                 this.AddObserver(obj2);
                 return;
             }
         case 0x3f8:
             {
                 this.DragsNode = (bool)e.GetValue(undo);
                 return;
             }
         case 0x3f9:
             {
                 this.Printable = (bool)e.GetValue(undo);
                 return;
             }
     }
     throw new ArgumentException("Unknown GoChangedEventArgs subhint--override DiagramShape.ChangeValue to handle the case: " + e.SubHint.ToString(NumberFormatInfo.InvariantInfo));
 }