aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-09-24 15:20:55 -0400
committerlempamo <[email protected]>2017-09-24 15:20:55 -0400
commit9e96ca19ed0904e7c80496071b0d7efdde405414 (patch)
treeab56237c7d4be359d489e40a6b8fdc6a9ec3e2e8
parentd55b0e22ae5006892e8a95d2f188a773dccada77 (diff)
downloadhistacom2-9e96ca19ed0904e7c80496071b0d7efdde405414.tar.gz
histacom2-9e96ca19ed0904e7c80496071b0d7efdde405414.tar.bz2
histacom2-9e96ca19ed0904e7c80496071b0d7efdde405414.zip
some more installer stuff
-rw-r--r--Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs1
-rw-r--r--Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs6
-rw-r--r--Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.Designer.cs131
-rw-r--r--Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.cs38
-rw-r--r--Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.resx120
-rw-r--r--Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs3
-rw-r--r--Histacom2/GlobalPrograms/WinClassicInstaller.cs25
-rw-r--r--Histacom2/Histacom2.csproj9
8 files changed, 331 insertions, 2 deletions
diff --git a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs
index 90dbbb1..5f78c44 100644
--- a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs
+++ b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.Designer.cs
@@ -111,6 +111,7 @@
this.radioButton1.TabIndex = 3;
this.radioButton1.Text = "I &accept the agreement";
this.radioButton1.UseVisualStyleBackColor = false;
+ this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// radioButton2
//
diff --git a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs
index c477836..e584117 100644
--- a/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs
+++ b/Histacom2/GlobalPrograms/InstallerPanes/EULAPane.cs
@@ -24,5 +24,11 @@ namespace Histacom2.GlobalPrograms.InstallerPanes
radioButton1.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular);
radioButton2.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular);
}
+
+ private void radioButton1_CheckedChanged(object sender, EventArgs e)
+ {
+ if (radioButton1.Checked) ((WinClassicInstaller)Parent.Parent).classicButton2.Enabled = true;
+ else ((WinClassicInstaller)Parent.Parent).classicButton2.Enabled = false;
+ }
}
}
diff --git a/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.Designer.cs b/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.Designer.cs
new file mode 100644
index 0000000..e0e8e04
--- /dev/null
+++ b/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.Designer.cs
@@ -0,0 +1,131 @@
+namespace Histacom2.GlobalPrograms.InstallerPanes
+{
+ partial class ProgressPane
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.classicLabel2 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel1 = new Histacom2.Engine.UI.ClassicLabel();
+ this.classicLabel3 = new Histacom2.Engine.UI.ClassicLabel();
+ this.progressBar1 = new Histacom2.Engine.UI.ProgressBar();
+ this.panel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // panel1
+ //
+ this.panel1.BackColor = System.Drawing.Color.White;
+ this.panel1.Controls.Add(this.pictureBox1);
+ this.panel1.Controls.Add(this.classicLabel2);
+ this.panel1.Controls.Add(this.classicLabel1);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(495, 58);
+ this.panel1.TabIndex = 0;
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.BackgroundImage = global::Histacom2.Properties.Resources.WinClassicInstallIcon;
+ this.pictureBox1.Location = new System.Drawing.Point(440, 2);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(53, 53);
+ this.pictureBox1.TabIndex = 2;
+ this.pictureBox1.TabStop = false;
+ //
+ // classicLabel2
+ //
+ this.classicLabel2.Location = new System.Drawing.Point(40, 28);
+ this.classicLabel2.Name = "classicLabel2";
+ this.classicLabel2.Size = new System.Drawing.Size(380, 13);
+ this.classicLabel2.TabIndex = 1;
+ this.classicLabel2.Text = "Please   wait   while   setup   installs   Program   on   your   computer.       " +
+ "  ";
+ //
+ // classicLabel1
+ //
+ this.classicLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.classicLabel1.Location = new System.Drawing.Point(25, 12);
+ this.classicLabel1.Name = "classicLabel1";
+ this.classicLabel1.Size = new System.Drawing.Size(274, 13);
+ this.classicLabel1.TabIndex = 0;
+ this.classicLabel1.Text = "Installi n g";
+ //
+ // classicLabel3
+ //
+ this.classicLabel3.Location = new System.Drawing.Point(25, 73);
+ this.classicLabel3.Name = "classicLabel3";
+ this.classicLabel3.Size = new System.Drawing.Size(446, 13);
+ this.classicLabel3.TabIndex = 1;
+ this.classicLabel3.Text = "Extracting Files...";
+ //
+ // progressBar1
+ //
+ this.progressBar1.BlockSpacing = 5;
+ this.progressBar1.BlockWidth = 20;
+ this.progressBar1.Location = new System.Drawing.Point(25, 93);
+ this.progressBar1.MarqueeWidth = 125;
+ this.progressBar1.Maximum = 100D;
+ this.progressBar1.Minimum = 0D;
+ this.progressBar1.Name = "progressBar1";
+ this.progressBar1.ProgressColor = System.Drawing.Color.DarkBlue;
+ this.progressBar1.ShowText = false;
+ this.progressBar1.Size = new System.Drawing.Size(436, 23);
+ this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Blocks;
+ this.progressBar1.TabIndex = 2;
+ this.progressBar1.Text = "progressBar1";
+ this.progressBar1.Value = 0D;
+ //
+ // ProgressPane
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.Silver;
+ this.Controls.Add(this.progressBar1);
+ this.Controls.Add(this.classicLabel3);
+ this.Controls.Add(this.panel1);
+ this.Name = "ProgressPane";
+ this.Size = new System.Drawing.Size(495, 314);
+ this.Load += new System.EventHandler(this.DirectoryPane_Load);
+ this.panel1.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel panel1;
+ private Engine.UI.ClassicLabel classicLabel1;
+ private Engine.UI.ClassicLabel classicLabel2;
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private Engine.UI.ClassicLabel classicLabel3;
+ private Engine.UI.ProgressBar progressBar1;
+ }
+}
diff --git a/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.cs b/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.cs
new file mode 100644
index 0000000..0a5cb60
--- /dev/null
+++ b/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Histacom2.Engine;
+
+namespace Histacom2.GlobalPrograms.InstallerPanes
+{
+ public partial class ProgressPane : UserControl
+ {
+ public ProgressPane()
+ {
+ InitializeComponent();
+ }
+
+ private void DirectoryPane_Load(object sender, EventArgs e)
+ {
+ classicLabel2.Text = $"Please   wait   while   setup   installs   {((WinClassicInstaller)Parent.Parent).progName}   on   your   computer.         ";
+ Timer t = new Timer();
+ t.Interval = 200;
+ t.Tick += (s, a) =>
+ {
+ if (progressBar1.Value == 100)
+ {
+ ((WinClassicInstaller)Parent.Parent).classicButton2.PerformClick();
+ t.Stop();
+ }
+ progressBar1.Value += 4;
+ };
+ t.Start();
+ }
+ }
+}
diff --git a/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.resx b/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Histacom2/GlobalPrograms/InstallerPanes/ProgressPane.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs
index 20688b5..6fcbf49 100644
--- a/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs
+++ b/Histacom2/GlobalPrograms/WinClassicInstaller.Designer.cs
@@ -90,7 +90,6 @@
this.classicButton3.AdaptForeColorWithTheme = true;
this.classicButton3.BackColor = System.Drawing.Color.Silver;
this.classicButton3.DialogResult = System.Windows.Forms.DialogResult.None;
- this.classicButton3.Enabled = false;
this.classicButton3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.classicButton3.ForeColor = System.Drawing.Color.Black;
this.classicButton3.Location = new System.Drawing.Point(248, 326);
@@ -125,7 +124,7 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.PictureBox pictureBox1;
private Engine.UI.ClassicButton classicButton1;
- private Engine.UI.ClassicButton classicButton2;
private Engine.UI.ClassicButton classicButton3;
+ public Engine.UI.ClassicButton classicButton2;
}
}
diff --git a/Histacom2/GlobalPrograms/WinClassicInstaller.cs b/Histacom2/GlobalPrograms/WinClassicInstaller.cs
index 4e0098c..e37ae24 100644
--- a/Histacom2/GlobalPrograms/WinClassicInstaller.cs
+++ b/Histacom2/GlobalPrograms/WinClassicInstaller.cs
@@ -15,6 +15,13 @@ namespace Histacom2.GlobalPrograms
public string progName;
public int state = 0;
+ public event EventHandler InstallCompleted;
+
+ protected void OnInstallCompleted(EventArgs e)
+ {
+ if (InstallCompleted != null) InstallCompleted(this, e);
+ }
+
public WinClassicInstaller(string prog)
{
InitializeComponent();
@@ -40,6 +47,24 @@ namespace Histacom2.GlobalPrograms
state = 1;
classicButton2.Enabled = false;
}
+ else if (state == 1)
+ {
+ var dir = new InstallerPanes.DirectoryPane();
+ dir.Parent = panel1;
+ state = 2;
+ }
+ else if (state == 2)
+ {
+ classicButton3.Hide();
+ classicButton1.Enabled = false;
+ var p = new InstallerPanes.ProgressPane();
+ p.Parent = panel1;
+ state = 3;
+ }
+ else if (state == 3)
+ {
+ OnInstallCompleted(EventArgs.Empty);
+ }
}
}
}
diff --git a/Histacom2/Histacom2.csproj b/Histacom2/Histacom2.csproj
index 1edcc08..474b6bd 100644
--- a/Histacom2/Histacom2.csproj
+++ b/Histacom2/Histacom2.csproj
@@ -132,6 +132,12 @@
<Compile Include="AchievementBox.Designer.cs">
<DependentUpon>AchievementBox.cs</DependentUpon>
</Compile>
+ <Compile Include="GlobalPrograms\InstallerPanes\ProgressPane.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="GlobalPrograms\InstallerPanes\ProgressPane.Designer.cs">
+ <DependentUpon>ProgressPane.cs</DependentUpon>
+ </Compile>
<Compile Include="GlobalPrograms\InstallerPanes\EULAPane.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -425,6 +431,9 @@
<EmbeddedResource Include="AchievementBox.resx">
<DependentUpon>AchievementBox.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="GlobalPrograms\InstallerPanes\ProgressPane.resx">
+ <DependentUpon>ProgressPane.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="GlobalPrograms\InstallerPanes\EULAPane.resx">
<DependentUpon>EULAPane.cs</DependentUpon>
</EmbeddedResource>