Changeset 4068 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ComplexShapeBaseDescriptor.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ComplexShapeBaseDescriptor.cs
r2768 r4068 1 1 using System; 2 using System.Drawing; 3 using System.Collections.Generic; 4 using System.Text; 5 using System.ComponentModel; 6 using System.Drawing.Design; 7 namespace Netron.Diagramming.Core 8 { 9 /// <summary> 10 /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape). 11 /// </summary> 12 class ComplexShapeBaseDescriptor : ShapeBaseDescriptor 13 { 2 namespace Netron.Diagramming.Core { 3 /// <summary> 4 /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape). 5 /// </summary> 6 class ComplexShapeBaseDescriptor : ShapeBaseDescriptor { 14 7 15 protected override void GetValue(object sender, PropertyEventArgs e) 16 { 17 switch (e.Name) 18 { 19 case "Materials": 20 e.Value = (e.Component as ComplexShapeBase).Children; 21 break; 22 default: 23 base.GetValue(sender, e); 24 break; 25 } 26 } 8 protected override void GetValue(object sender, PropertyEventArgs e) { 9 switch (e.Name) { 10 case "Materials": 11 e.Value = (e.Component as ComplexShapeBase).Children; 12 break; 13 default: 14 base.GetValue(sender, e); 15 break; 16 } 17 } 27 18 28 protected override void SetValue(object sender, PropertyEventArgs e) 29 { 30 switch (e.Name) 31 { 32 default: 33 base.SetValue(sender, e); 34 break; 35 } 36 } 19 protected override void SetValue(object sender, PropertyEventArgs e) { 20 switch (e.Name) { 21 default: 22 base.SetValue(sender, e); 23 break; 24 } 25 } 37 26 38 public ComplexShapeBaseDescriptor(ShapeProvider provider, Type type) 39 : base(provider, type) 40 { 41 this.AddProperty("Materials", typeof(CollectionBase<IShapeMaterial>),constLayout,"The collection of shape materials."); 42 } 27 public ComplexShapeBaseDescriptor(ShapeProvider provider, Type type) 28 : base(provider, type) { 29 this.AddProperty("Materials", typeof(CollectionBase<IShapeMaterial>), constLayout, "The collection of shape materials."); 30 } 43 31 44 32 45 33 } 46 34 }
Note: See TracChangeset
for help on using the changeset viewer.