File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed
Source/RunActivity/Viewer3D Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -1560,8 +1560,7 @@ public interface ICabViewMouseControlRenderer
15601560 bool IsMouseWithin ( ) ;
15611561 void HandleUserInput ( ) ;
15621562 string GetControlName ( ) ;
1563- string GetControlLabel ( ) ;
1564-
1563+ string ControlLabel { get ; }
15651564 }
15661565
15671566 /// <summary>
@@ -2190,10 +2189,7 @@ public string GetControlName()
21902189 return ( Locomotive as MSTSLocomotive ) . TrainControlSystem . GetDisplayString ( GetControlType ( ) . ToString ( ) ) ;
21912190 }
21922191
2193- public string GetControlLabel ( )
2194- {
2195- return Control . Label ;
2196- }
2192+ public string ControlLabel { get { return Control . Label ; } }
21972193
21982194 /// <summary>
21992195 /// Handles cabview mouse events, and changes the corresponding locomotive control values.
Original file line number Diff line number Diff line change @@ -856,10 +856,7 @@ public string GetControlName()
856856 }
857857 return "" ;
858858 }
859- public string GetControlLabel ( )
860- {
861- return GetControlName ( ) ;
862- }
859+ public string ControlLabel { get { return GetControlName ( ) ; } }
863860 public override void Draw ( GraphicsDevice graphicsDevice )
864861 {
865862 DMI . Draw ( ControlView . SpriteBatch , new Point ( DrawPosition . X , DrawPosition . Y ) ) ;
Original file line number Diff line number Diff line change @@ -1478,7 +1478,7 @@ void HandleUserInput(ElapsedTime elapsedTime)
14781478 if ( MousePickedControl != null & MousePickedControl != OldMousePickedControl )
14791479 {
14801480 // say what control you have here
1481- Simulator . Confirmer . Message ( ConfirmLevel . None , String . IsNullOrEmpty ( MousePickedControl . GetControlLabel ( ) ) ? MousePickedControl . GetControlName ( ) : MousePickedControl . GetControlLabel ( ) ) ;
1481+ Simulator . Confirmer . Message ( ConfirmLevel . None , String . IsNullOrEmpty ( MousePickedControl . ControlLabel ) ? MousePickedControl . GetControlName ( ) : MousePickedControl . ControlLabel ) ;
14821482 }
14831483 if ( MousePickedControl != null ) ActualCursor = Cursors . Hand ;
14841484 else if ( ActualCursor == Cursors . Hand ) ActualCursor = Cursors . Default ;
@@ -1637,7 +1637,7 @@ void HandleUserInput(ElapsedTime elapsedTime)
16371637 if ( MousePickedControl != null & MousePickedControl != OldMousePickedControl )
16381638 {
16391639 // say what control you have here
1640- Simulator . Confirmer . Message ( ConfirmLevel . None , String . IsNullOrEmpty ( MousePickedControl . GetControlLabel ( ) ) ? MousePickedControl . GetControlName ( ) : MousePickedControl . GetControlLabel ( ) ) ;
1640+ Simulator . Confirmer . Message ( ConfirmLevel . None , String . IsNullOrEmpty ( MousePickedControl . ControlLabel ) ? MousePickedControl . GetControlName ( ) : MousePickedControl . ControlLabel ) ;
16411641 }
16421642 if ( MousePickedControl != null )
16431643 {
You can’t perform that action at this time.
0 commit comments