Changeset 4068 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SimpleConnectorPaintStyle.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/Utils/Styling/SimpleConnectorPaintStyle.cs
r2768 r4068 1 using System;2 using System.Collections.Generic;3 using System.Text;4 1 using System.Drawing; 5 using System.Drawing.Drawing2D;6 2 7 namespace Netron.Diagramming.Core 8 { 9 public partial class SimpleConnectorPaintStyle : IPaintStyle 10 { 11 // ------------------------------------------------------------------ 12 /// <summary> 13 /// Event raised when this paint style is changed. 14 /// </summary> 15 // ------------------------------------------------------------------ 16 public event PaintStyleChangedEventHandler PaintStyleChanged; 3 namespace Netron.Diagramming.Core { 4 public partial class SimpleConnectorPaintStyle : IPaintStyle { 5 // ------------------------------------------------------------------ 6 /// <summary> 7 /// Event raised when this paint style is changed. 8 /// </summary> 9 // ------------------------------------------------------------------ 10 public event PaintStyleChangedEventHandler PaintStyleChanged; 17 11 18 12 #region Fields 19 13 20 21 22 23 24 25 26 14 // ------------------------------------------------------------------ 15 /// <summary> 16 /// Implementation of IVersion - the current version of 17 /// SimpleConnectorPaintStyle. 18 /// </summary> 19 // ------------------------------------------------------------------ 20 protected const double simpleConnectorPaintStyleVersion = 1.0; 27 21 28 22 Color mSolidColor = Color.Transparent; 29 23 30 24 #endregion 31 25 32 // ------------------------------------------------------------------ 33 /// <summary> 34 /// Gets the current version. 35 /// </summary> 36 // ------------------------------------------------------------------ 37 public virtual double Version 38 { 39 get 40 { 41 return simpleConnectorPaintStyleVersion; 42 } 43 } 26 // ------------------------------------------------------------------ 27 /// <summary> 28 /// Gets the current version. 29 /// </summary> 30 // ------------------------------------------------------------------ 31 public virtual double Version { 32 get { 33 return simpleConnectorPaintStyleVersion; 34 } 35 } 44 36 45 // ------------------------------------------------------------------ 46 /// <summary> 47 /// Constructor. 48 /// </summary> 49 // ------------------------------------------------------------------ 50 public SimpleConnectorPaintStyle() 51 { 52 } 37 // ------------------------------------------------------------------ 38 /// <summary> 39 /// Constructor. 40 /// </summary> 41 // ------------------------------------------------------------------ 42 public SimpleConnectorPaintStyle() { 43 } 53 44 54 45 #region IPaintStyle Members 55 46 56 // ------------------------------------------------------------------ 57 /// <summary> 58 /// Returns a brush that has a transparent color. 59 /// </summary> 60 /// <param name="rectangle">Rectangle</param> 61 /// <returns>Brush</returns> 62 // ------------------------------------------------------------------ 63 public Brush GetBrush(Rectangle rectangle) 64 { 65 return new SolidBrush(mSolidColor); 66 } 47 // ------------------------------------------------------------------ 48 /// <summary> 49 /// Returns a brush that has a transparent color. 50 /// </summary> 51 /// <param name="rectangle">Rectangle</param> 52 /// <returns>Brush</returns> 53 // ------------------------------------------------------------------ 54 public Brush GetBrush(Rectangle rectangle) { 55 return new SolidBrush(mSolidColor); 56 } 67 57 68 #endregion 69 70 // ------------------------------------------------------------------ 71 /// <summary> 72 /// Raises the PaintStyleChanged event. 73 /// </summary> 74 // ------------------------------------------------------------------ 75 protected virtual void RaisePaintStyleChanged() 76 { 77 if (this.PaintStyleChanged != null) 78 { 79 // Raise the event 80 this.PaintStyleChanged( 81 this, 82 new PaintStyleChangedEventArgs( 83 this, 84 FillType.LinearGradient)); 85 } 86 } 58 #endregion 59 60 // ------------------------------------------------------------------ 61 /// <summary> 62 /// Raises the PaintStyleChanged event. 63 /// </summary> 64 // ------------------------------------------------------------------ 65 protected virtual void RaisePaintStyleChanged() { 66 if (this.PaintStyleChanged != null) { 67 // Raise the event 68 this.PaintStyleChanged( 69 this, 70 new PaintStyleChangedEventArgs( 71 this, 72 FillType.LinearGradient)); 73 } 87 74 } 75 } 88 76 }
Note: See TracChangeset
for help on using the changeset viewer.