-
Notifications
You must be signed in to change notification settings - Fork 1
/
SplashForm.cs
39 lines (33 loc) · 941 Bytes
/
SplashForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using HnsExplorer.Data;
namespace HnsExplorer
{
public partial class SplashForm : Form
{
private HnsDatasource datasource;
public SplashForm(HnsDatasource datasource)
{
this.datasource = datasource;
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
private void timer1_Tick(object sender, EventArgs e)
{
label1.Text = datasource.LoadingState;
var p = datasource.NumberOfStepsLoaded;
var t = datasource.NumberOfStepsTotal;
var perc = (double)p / t * 100;
progressBar1.Value = (int)perc;
progressBar1.Update();
if (p == t)
{
timer1.Stop();
Close();
}
}
}
}