10
10
using MetroFramework ;
11
11
using MetroFramework . Components ;
12
12
using MetroFramework . Controls ;
13
+ using MetroFramework . Drawing ;
13
14
using MetroFramework . Forms ;
14
15
15
16
namespace DataWrangler . Forms
16
17
{
17
18
public partial class Landing : MetroForm
18
19
{
19
20
private readonly MetroContextMenu _ctxMenuManage ;
20
- private readonly MetroToolTip _chartToolTip = new MetroToolTip ( ) ;
21
21
private readonly Dictionary < string , string > _dbSettings ;
22
22
private readonly UserAccount _user ;
23
- private Point ? _chartPrevPosition = null ;
24
23
25
24
public Landing ( Dictionary < string , string > dbSettings , UserAccount user )
26
25
{
@@ -69,6 +68,8 @@ void AddPoint()
69
68
chartData . Series [ "Records By Type" ] . Points . Add ( point ) ;
70
69
}
71
70
71
+
72
+
72
73
if ( statsBackgroundWorker != null && ! statsBackgroundWorker . CancellationPending &&
73
74
! chartData . IsDisposed )
74
75
try
@@ -104,6 +105,7 @@ void SetSum()
104
105
try
105
106
{
106
107
lblRecCount . Invoke ( ( Action ) SetSum ) ;
108
+ statsBackgroundWorker . ReportProgress ( 90 ) ;
107
109
LoadChartData ( recordCounts ) ;
108
110
statsBackgroundWorker . ReportProgress ( 100 ) ;
109
111
}
@@ -213,7 +215,10 @@ private void StatsBackgroundWorkerOnProgressChanged(object sender, ProgressChang
213
215
spinner3 . Visible = false ;
214
216
else if ( e . ProgressPercentage == 40 )
215
217
spinner2 . Visible = false ;
216
- else if ( e . ProgressPercentage == 100 ) spinner1 . Visible = false ;
218
+ else if ( e . ProgressPercentage == 90 )
219
+ spinner1 . Visible = false ;
220
+ else if ( e . ProgressPercentage == 100 )
221
+ chartData . Visible = true ;
217
222
}
218
223
219
224
private void SwitchChartStyle ( )
@@ -228,6 +233,7 @@ private void SwitchChartStyle()
228
233
chartData . ChartAreas [ 0 ] . AxisY . MajorGrid . LineColor = foreColor ;
229
234
chartData . ChartAreas [ 0 ] . AxisY . LabelStyle . ForeColor = foreColor ;
230
235
chartData . ChartAreas [ 0 ] . AxisY . MajorTickMark . LineColor = foreColor ;
236
+ chartData . Series [ 0 ] . Color = MetroPaint . GetStyleColor ( Style ) ;
231
237
}
232
238
233
239
public void SwitchFormStyle ( )
0 commit comments