using System.Drawing; namespace Netron.Diagramming.Core { public partial class SimpleConnectorPaintStyle : IPaintStyle { // ------------------------------------------------------------------ /// /// Event raised when this paint style is changed. /// // ------------------------------------------------------------------ public event PaintStyleChangedEventHandler PaintStyleChanged; #region Fields // ------------------------------------------------------------------ /// /// Implementation of IVersion - the current version of /// SimpleConnectorPaintStyle. /// // ------------------------------------------------------------------ protected const double simpleConnectorPaintStyleVersion = 1.0; Color mSolidColor = Color.Transparent; #endregion // ------------------------------------------------------------------ /// /// Gets the current version. /// // ------------------------------------------------------------------ public virtual double Version { get { return simpleConnectorPaintStyleVersion; } } // ------------------------------------------------------------------ /// /// Constructor. /// // ------------------------------------------------------------------ public SimpleConnectorPaintStyle() { } #region IPaintStyle Members // ------------------------------------------------------------------ /// /// Returns a brush that has a transparent color. /// /// Rectangle /// Brush // ------------------------------------------------------------------ public Brush GetBrush(Rectangle rectangle) { return new SolidBrush(mSolidColor); } #endregion // ------------------------------------------------------------------ /// /// Raises the PaintStyleChanged event. /// // ------------------------------------------------------------------ protected virtual void RaisePaintStyleChanged() { if (this.PaintStyleChanged != null) { // Raise the event this.PaintStyleChanged( this, new PaintStyleChangedEventArgs( this, FillType.LinearGradient)); } } } }