@@ -29,8 +29,7 @@ public class AnalyticsWindowViewModel : RegionViewModelBase
29
29
private readonly List < SignalPlotXYConst < double , double > > _signalPlotXyConst = new List < SignalPlotXYConst < double , double > > ( ) ;
30
30
private readonly List < int > _groupSensorId = new List < int > ( ) ;
31
31
private readonly Timer _timer ;
32
-
33
- private List < Color > _colors = new List < Color > ( )
32
+ private readonly List < Color > _colors = new List < Color > ( )
34
33
{
35
34
Color . FromArgb ( 0x00 , 0x3f , 0x5c ) ,
36
35
Color . FromArgb ( 0x44 , 0x4e , 0x86 ) ,
@@ -39,6 +38,7 @@ public class AnalyticsWindowViewModel : RegionViewModelBase
39
38
Color . FromArgb ( 0xff , 0x6e , 0x54 ) ,
40
39
Color . FromArgb ( 0xff , 0xa6 , 0x00 )
41
40
} ;
41
+
42
42
private WpfPlot _plotControl ;
43
43
private Plot _plot ;
44
44
private VLine _vLine ;
@@ -237,7 +237,7 @@ private async Task GetSensorDataAsync()
237
237
var result = getItemsTask . Result ;
238
238
239
239
var dateTime = result . Select ( x => x . DataTime . ToOADate ( ) ) . ToArray ( ) ;
240
- DateLegend = result [ 0 ] . DataTime . ToString ( ) ;
240
+ DateLegend = result [ 0 ] . DataTime . ToString ( CultureInfo . CurrentCulture ) ;
241
241
242
242
LegendItems . Clear ( ) ;
243
243
LegendValueItems . Clear ( ) ;
@@ -396,15 +396,15 @@ private void PlotControl_MouseMove(object sender, MouseEventArgs e)
396
396
397
397
var ( mouseCoordsX , _) = PlotControl . GetMouseCoordinates ( ) ;
398
398
_legendValueItems . Clear ( ) ;
399
- for ( int i = 0 ; i < LegendItems . Count ; i ++ )
399
+ for ( var i = 0 ; i < LegendItems . Count ; i ++ )
400
400
{
401
401
var data = _signalPlotXyConst [ i ] . GetPointNearestX ( mouseCoordsX ) . y ;
402
402
_legendValueItems . Add ( ( int ) data ) ;
403
403
}
404
404
405
405
var result = _signalPlotXyConst [ 0 ] . GetPointNearestX ( mouseCoordsX ) . x ;
406
406
_vLine . X = result ;
407
- DateLegend = DateTime . FromOADate ( result ) . ToString ( ) ;
407
+ DateLegend = DateTime . FromOADate ( result ) . ToString ( CultureInfo . CurrentCulture ) ;
408
408
409
409
_isUpdateChart = true ;
410
410
PlotControl . Render ( ) ;
0 commit comments