@@ -20,7 +20,6 @@ namespace GadrocsWorkshop.Helios.Controls
2020 using System . Windows ;
2121 using System . Windows . Media ;
2222 using System . Xml ;
23- using System ;
2423
2524 [ HeliosControl ( "Helios.Base.CustomTape" , "Custom Tape" , "Custom Controls" , typeof ( Gauges . GaugeRenderer ) ) ]
2625
@@ -67,19 +66,20 @@ public class CustomTape : Gauges.BaseGauge
6766 private double _minInputRotation = 0d ;
6867 private double _maxInputRotation = 1d ;
6968
70- private bool _imageRefresh ;
71- private HeliosValue _tapeImageRefresh ;
7269
73- public CustomTape ( )
70+
71+
72+
73+
74+ public CustomTape ( )
7475 : base ( "CustomTape" , new Size ( 200d , 200d ) )
7576 {
7677 _Background = new Gauges . GaugeImage ( _backgroundImage , new Rect ( 0 , 0 , _gaugeWidth , _gaugeHeight ) ) ;
7778 Components . Add ( _Background ) ;
7879
7980 _Tape = new Gauges . CustomGaugeNeedle ( _tapeImage , new Point ( 0 , 0 ) , new Size ( 200 , 200 ) , new Point ( 100 , 100 ) ) ;
8081 _Tape . Clip = new RectangleGeometry ( new Rect ( 1d , 1d , 198d , 198d ) ) ;
81- Components . Add ( _Tape ) ;
82-
82+ Components . Add ( _Tape ) ;
8383
8484 _OffFlag = new Gauges . GaugeImage ( _offFlagImage , new Rect ( 1d , 1d , 55d , 55d ) ) ;
8585 _OffFlag . IsHidden = false ;
@@ -107,27 +107,10 @@ public CustomTape()
107107 _tapeRotation . Execute += new HeliosActionHandler ( TapeRotation_Execute ) ;
108108 Actions . Add ( _tapeRotation ) ;
109109 Values . Add ( _tapeRotation ) ;
110-
111- _tapeImageRefresh = new HeliosValue ( this , new BindingValue ( false ) , "" , "Tape Image Reload" , "Indicates a reload of the Tape image" , "True if reloaded." , BindingValueUnits . Boolean ) ;
112- _tapeImageRefresh . Execute += new HeliosActionHandler ( TapeImageRefresh_Execute ) ;
113- Actions . Add ( _tapeImageRefresh ) ;
114- Values . Add ( _tapeImageRefresh ) ;
115110 }
116111
117112
118- #region Properties
119-
120- public bool ImageRefresh
121- {
122- get { return _imageRefresh ; }
123- set
124- {
125- var oldValue = _imageRefresh ;
126- _imageRefresh = value ;
127- _Tape . ImageRefresh = _imageRefresh ;
128- OnPropertyChanged ( "ImageRefresh" , oldValue , value , true ) ;
129- }
130- }
113+ #region Properties
131114
132115 public string TapeImage
133116 {
@@ -743,13 +726,6 @@ public override void Reset()
743726
744727 #region Actions
745728
746- void TapeImageRefresh_Execute ( object action , HeliosActionEventArgs e )
747- {
748- _tapeImageRefresh . SetValue ( e . Value , e . BypassCascadingTriggers ) ;
749- ImageRefresh = true ;
750- Refresh ( ) ;
751- }
752-
753729 void OffFlag_Execute ( object action , HeliosActionEventArgs e )
754730 {
755731 _offFlag . SetValue ( e . Value , e . BypassCascadingTriggers ) ;
@@ -783,7 +759,6 @@ void TapeRotation_Execute(object action, HeliosActionEventArgs e)
783759
784760 public override void WriteXml ( XmlWriter writer )
785761 {
786-
787762 base . WriteXml ( writer ) ;
788763
789764 writer . WriteElementString ( "TapeImage" , TapeImage ) ;
@@ -821,7 +796,6 @@ public override void WriteXml(XmlWriter writer)
821796
822797 public override void ReadXml ( XmlReader reader )
823798 {
824-
825799 base . ReadXml ( reader ) ;
826800
827801 TapeImage = reader . ReadElementString ( "TapeImage" ) ;
0 commit comments