aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-06 12:34:00 -0400
committerlempamo <[email protected]>2017-07-06 12:34:00 -0400
commit44a5fb97c89311364b013f5ed610d59de0b0ccf0 (patch)
tree74d3ce2adeb6e1244e921a4aee860f0c5faf8990 /TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs
parente4ee95004a1655a61355d64818d633bcca00fd52 (diff)
downloadhistacom2-44a5fb97c89311364b013f5ed610d59de0b0ccf0.tar.gz
histacom2-44a5fb97c89311364b013f5ed610d59de0b0ccf0.tar.bz2
histacom2-44a5fb97c89311364b013f5ed610d59de0b0ccf0.zip
Installer is nearly done
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs65
1 files changed, 64 insertions, 1 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs
index 8377d54..e3924ee 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95Installer.cs
@@ -13,12 +13,16 @@ namespace TimeHACK.OS.Win95.Win95Apps
public partial class Win95Installer : UserControl
{
public int installStage = 0;
+ private Timer installbar = new Timer();
public Win95Installer()
{
InitializeComponent();
label1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
label2.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ label3.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ label4.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ label5.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
checkBox1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
cancelbutton1.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
nextbutton1.Paint += (sender, args) => Engine.Paintbrush.PaintClassicBorders(sender, args, 2);
@@ -28,6 +32,27 @@ namespace TimeHACK.OS.Win95.Win95Apps
private void Win95Installer_Load(object sender, EventArgs e)
{
label1.Text.Replace("GenericName", installname.Text);
+ label3.Text.Replace("GenericName", installname.Text);
+ label4.Text.Replace("GenericName", installname.Text);
+ installbar.Tick += Installbar_Tick;
+ }
+
+ private void Installbar_Tick(object sender, EventArgs e)
+ {
+ if (progressBar1.Value < 100)
+ {
+ progressBar1.Value = progressBar1.Value + 1;
+ }
+ else
+ {
+ panel3.Hide();
+ panel4.Show();
+ backbutton1.Hide();
+ nextbutton1.Hide();
+ cancelbutton1.Enabled = true;
+ cancelbutton1.Text = "Finish";
+ installbar.Stop();
+ }
}
private void nextbutton1_Click(object sender, EventArgs e)
@@ -38,9 +63,22 @@ namespace TimeHACK.OS.Win95.Win95Apps
label1.Hide();
panel1.Show();
backbutton1.Enabled = true;
- nextbutton1.Enabled = false;
+ if (!checkBox1.Checked) nextbutton1.Enabled = false;
installStage = 1;
break;
+ case 1:
+ panel1.Hide();
+ panel2.Show();
+ installStage = 2;
+ break;
+ case 2:
+ panel2.Hide();
+ panel3.Show();
+ backbutton1.Enabled = false;
+ nextbutton1.Enabled = false;
+ cancelbutton1.Enabled = false;
+ installbar.Start();
+ break;
}
}
@@ -49,5 +87,30 @@ namespace TimeHACK.OS.Win95.Win95Apps
if (checkBox1.Checked) nextbutton1.Enabled = true;
else nextbutton1.Enabled = false;
}
+
+ private void backbutton1_Click(object sender, EventArgs e)
+ {
+ switch (installStage)
+ {
+ case 1:
+ panel1.Hide();
+ label1.Show();
+ backbutton1.Enabled = false;
+ nextbutton1.Enabled = true;
+ installStage = 0;
+ break;
+ case 2:
+ panel2.Hide();
+ panel1.Show();
+ if (!checkBox1.Checked) nextbutton1.Enabled = false;
+ installStage = 1;
+ break;
+ }
+ }
+
+ private void cancelbutton1_Click(object sender, EventArgs e)
+ {
+ ParentForm.Close();
+ }
}
}