Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionDescriptor.cs @ 13400

Last change on this file since 13400 was 4068, checked in by swagner, 14 years ago

Sorted usings and removed unused usings in entire solution (#1094)

File size: 1.5 KB
Line 
1using System;
2
3namespace Netron.Diagramming.Core {
4  /// <summary>
5  /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
6  /// </summary>
7  class ConnectionDescriptor : ConnectionBaseDescriptor {
8
9    /// <summary>
10    /// Override this method to return the appropriate value corresponding to the property
11    /// </summary>
12    /// <param name="sender"></param>
13    /// <param name="e"></param>
14    protected override void GetValue(object sender, PropertyEventArgs e) {
15      switch (e.Name) {
16        case "Demo":
17          e.Value = 123456;
18          break;
19        default:
20          base.GetValue(sender, e);
21          break;
22      }
23    }
24
25    /// <summary>
26    /// Override this method to set the appropriate value corresponding to the property
27    /// </summary>
28    /// <param name="sender"></param>
29    /// <param name="e"></param>
30    protected override void SetValue(object sender, PropertyEventArgs e) {
31      switch (e.Name) {
32        default:
33          base.SetValue(sender, e);
34          break;
35      }
36    }
37
38    /// <summary>
39    /// Initializes a new instance of the <see cref="T:ConnectionDescriptor"/> class.
40    /// </summary>
41    /// <param name="provider">The provider.</param>
42    /// <param name="type">The type.</param>
43    public ConnectionDescriptor(ConnectionProvider provider, Type type)
44      : base(provider, type) {
45      this.AddProperty("Demo", typeof(int));
46    }
47
48
49  }
50}
Note: See TracBrowser for help on using the repository browser.