Last change
on this file since 13398 was
4068,
checked in by swagner, 14 years ago
|
Sorted usings and removed unused usings in entire solution (#1094)
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2768] | 1 | using System;
|
---|
| 2 | using System.Drawing;
|
---|
[4068] | 3 | namespace 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 ControlDescriptor : DescriptorBase {
|
---|
[2768] | 8 |
|
---|
[4068] | 9 | protected override void GetValue(object sender, PropertyEventArgs e) {
|
---|
| 10 | switch (e.Name) {
|
---|
| 11 | case "BackColor":
|
---|
| 12 | e.Value = (e.Component as DiagramControlBase).BackColor;
|
---|
| 13 | break;
|
---|
| 14 | default:
|
---|
| 15 | base.GetValue(sender, e);
|
---|
| 16 | break;
|
---|
| 17 | }
|
---|
| 18 | }
|
---|
[2768] | 19 |
|
---|
[4068] | 20 | protected override void SetValue(object sender, PropertyEventArgs e) {
|
---|
| 21 | switch (e.Name) {
|
---|
| 22 | case "BackColor":
|
---|
| 23 | (e.Component as DiagramControlBase).BackColor = (Color)e.Value;
|
---|
| 24 | break;
|
---|
| 25 | default:
|
---|
| 26 | base.SetValue(sender, e);
|
---|
| 27 | break;
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
[2768] | 30 |
|
---|
[4068] | 31 | public ControlDescriptor(ControlProvider provider, Type type)
|
---|
| 32 | : base(provider, type) {
|
---|
| 33 | this.AddProperty("BackColor", typeof(Color));
|
---|
| 34 | }
|
---|
[2768] | 35 |
|
---|
| 36 |
|
---|
[4068] | 37 | }
|
---|
[2768] | 38 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.