diff --git a/HCI_Coursework_EVCHARGE/Assets/contactless.png b/HCI_Coursework_EVCHARGE/Assets/contactless.png new file mode 100644 index 0000000..de206aa Binary files /dev/null and b/HCI_Coursework_EVCHARGE/Assets/contactless.png differ diff --git a/HCI_Coursework_EVCHARGE/BaySelection.Designer.cs b/HCI_Coursework_EVCHARGE/BaySelection.Designer.cs new file mode 100644 index 0000000..73cd0c3 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/BaySelection.Designer.cs @@ -0,0 +1,336 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class BaySelection + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button6 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button10 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.button1 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.userLabel = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.panel3.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // button6 + // + this.button6.Dock = System.Windows.Forms.DockStyle.Left; + this.button6.Location = new System.Drawing.Point(25, 769); + this.button6.Margin = new System.Windows.Forms.Padding(25); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(911, 136); + this.button6.TabIndex = 9; + this.button6.Text = "Bay 10"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.bayButton_Click); + // + // button8 + // + this.button8.Dock = System.Windows.Forms.DockStyle.Left; + this.button8.Location = new System.Drawing.Point(25, 397); + this.button8.Margin = new System.Windows.Forms.Padding(25); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(911, 136); + this.button8.TabIndex = 7; + this.button8.Text = "Bay 8"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.bayButton_Click); + // + // button7 + // + this.button7.Dock = System.Windows.Forms.DockStyle.Left; + this.button7.Location = new System.Drawing.Point(25, 583); + this.button7.Margin = new System.Windows.Forms.Padding(25); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(911, 136); + this.button7.TabIndex = 8; + this.button7.Text = "Bay 9"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.bayButton_Click); + // + // button10 + // + this.button10.Dock = System.Windows.Forms.DockStyle.Left; + this.button10.Location = new System.Drawing.Point(25, 25); + this.button10.Margin = new System.Windows.Forms.Padding(25); + this.button10.Name = "button10"; + this.button10.Size = new System.Drawing.Size(911, 136); + this.button10.TabIndex = 5; + this.button10.Text = "Bay 6"; + this.button10.UseVisualStyleBackColor = true; + this.button10.Click += new System.EventHandler(this.bayButton_Click); + // + // button9 + // + this.button9.Dock = System.Windows.Forms.DockStyle.Left; + this.button9.Location = new System.Drawing.Point(25, 211); + this.button9.Margin = new System.Windows.Forms.Padding(25); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(911, 136); + this.button9.TabIndex = 6; + this.button9.Text = "Bay 7"; + this.button9.UseVisualStyleBackColor = true; + this.button9.Click += new System.EventHandler(this.bayButton_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); + this.label1.Location = new System.Drawing.Point(296, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(261, 31); + this.label1.TabIndex = 5; + this.label1.Text = "Select Charging Bay"; + // + // panel3 + // + this.panel3.AutoSize = true; + this.panel3.BackColor = System.Drawing.SystemColors.Control; + this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel3.Controls.Add(this.tableLayoutPanel3); + this.panel3.Controls.Add(this.userLabel); + this.panel3.Controls.Add(this.label2); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.ForeColor = System.Drawing.SystemColors.ControlText; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(1920, 1080); + this.panel3.TabIndex = 2; + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel3.BackColor = System.Drawing.SystemColors.ActiveCaptionText; + this.tableLayoutPanel3.ColumnCount = 2; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel2, 1, 0); + this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel1, 0, 0); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Bottom; + this.tableLayoutPanel3.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize; + this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 160); + this.tableLayoutPanel3.MaximumSize = new System.Drawing.Size(1918, 918); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 1; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel3.Size = new System.Drawing.Size(1918, 918); + this.tableLayoutPanel3.TabIndex = 4; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.AutoSize = true; + this.tableLayoutPanel2.BackColor = System.Drawing.SystemColors.Control; + this.tableLayoutPanel2.ColumnCount = 1; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.Controls.Add(this.button10, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.button8, 0, 2); + this.tableLayoutPanel2.Controls.Add(this.button9, 0, 1); + this.tableLayoutPanel2.Controls.Add(this.button7, 0, 3); + this.tableLayoutPanel2.Controls.Add(this.button6, 0, 4); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Left; + this.tableLayoutPanel2.Location = new System.Drawing.Point(959, 0); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 5; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(959, 930); + this.tableLayoutPanel2.TabIndex = 3; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.BackColor = System.Drawing.SystemColors.Control; + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.Controls.Add(this.button1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.button5, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.button2, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.button4, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.button3, 0, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Left; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 5; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(959, 930); + this.tableLayoutPanel1.TabIndex = 2; + // + // button1 + // + this.button1.Dock = System.Windows.Forms.DockStyle.Left; + this.button1.Location = new System.Drawing.Point(25, 25); + this.button1.Margin = new System.Windows.Forms.Padding(25); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(911, 136); + this.button1.TabIndex = 0; + this.button1.Text = "Bay 1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.bayButton_Click); + // + // button5 + // + this.button5.Dock = System.Windows.Forms.DockStyle.Left; + this.button5.Location = new System.Drawing.Point(25, 769); + this.button5.Margin = new System.Windows.Forms.Padding(25); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(911, 136); + this.button5.TabIndex = 4; + this.button5.Text = "Bay 5"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.bayButton_Click); + // + // button2 + // + this.button2.Dock = System.Windows.Forms.DockStyle.Left; + this.button2.Location = new System.Drawing.Point(25, 211); + this.button2.Margin = new System.Windows.Forms.Padding(25); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(911, 136); + this.button2.TabIndex = 1; + this.button2.Text = "Bay 2"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.bayButton_Click); + // + // button4 + // + this.button4.Dock = System.Windows.Forms.DockStyle.Left; + this.button4.Location = new System.Drawing.Point(25, 583); + this.button4.Margin = new System.Windows.Forms.Padding(25); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(911, 136); + this.button4.TabIndex = 3; + this.button4.Text = "Bay 4"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.bayButton_Click); + // + // button3 + // + this.button3.Dock = System.Windows.Forms.DockStyle.Left; + this.button3.Location = new System.Drawing.Point(25, 397); + this.button3.Margin = new System.Windows.Forms.Padding(25); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(911, 136); + this.button3.TabIndex = 2; + this.button3.Text = "Bay 3"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.bayButton_Click); + // + // userLabel + // + this.userLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.userLabel.AutoSize = true; + this.userLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); + this.userLabel.Location = new System.Drawing.Point(24, 64); + this.userLabel.Name = "userLabel"; + this.userLabel.Size = new System.Drawing.Size(176, 31); + this.userLabel.TabIndex = 1; + this.userLabel.Text = "Logged in as:"; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 40F); + this.label2.Location = new System.Drawing.Point(664, 40); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(519, 63); + this.label2.TabIndex = 0; + this.label2.Text = "Select Charging Bay"; + // + // BaySelection + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.AutoSize = true; + this.ClientSize = new System.Drawing.Size(1920, 1080); + this.Controls.Add(this.panel3); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "BaySelection"; + this.Text = "BaySelection"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.tableLayoutPanel3.ResumeLayout(false); + this.tableLayoutPanel3.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + + + #endregion + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button10; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label userLabel; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/BaySelection.cs b/HCI_Coursework_EVCHARGE/BaySelection.cs new file mode 100644 index 0000000..94d6d55 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/BaySelection.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class BaySelection : Form + { + public BaySelection( String accountNo ) + { + InitializeComponent(); + userLabel.Text += " " + accountNo; + tableLayoutPanel3.Height = this.ClientSize.Height; + } + + private void bayButton_Click(object sender, EventArgs e) + { + if( sender is Button button) + { + + int bayNo = Convert.ToInt32(button.Text.Substring(button.Text.Length - 1)); + button.BackColor = SystemColors.ControlDark; + ChargingDetails chargingDetails = new ChargingDetails(bayNo); + chargingDetails.Show(); + chargingDetails.FormClosed += delegate + { + chargingDetails = null; + button.BackColor = SystemColors.Control; + }; + } + } + } +} diff --git a/HCI_Coursework_EVCHARGE/Form2.resx b/HCI_Coursework_EVCHARGE/BaySelection.resx similarity index 100% rename from HCI_Coursework_EVCHARGE/Form2.resx rename to HCI_Coursework_EVCHARGE/BaySelection.resx diff --git a/HCI_Coursework_EVCHARGE/Charging.Designer.cs b/HCI_Coursework_EVCHARGE/Charging.Designer.cs new file mode 100644 index 0000000..02316f1 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Charging.Designer.cs @@ -0,0 +1,166 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class Charging + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.button1 = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.label1 = new System.Windows.Forms.Label(); + this.timeRemainingLabel = new System.Windows.Forms.Label(); + this.chargeRateLabel = new System.Windows.Forms.Label(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.chargeCapacityLabel = new System.Windows.Forms.Label(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); + this.button1.Location = new System.Drawing.Point(1544, 840); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(300, 150); + this.button1.TabIndex = 0; + this.button1.Text = "Cancel Charging"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.cancel_Button); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.timeRemainingLabel, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.chargeRateLabel, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.progressBar1, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.chargeCapacityLabel, 0, 2); + this.tableLayoutPanel1.Location = new System.Drawing.Point(56, 104); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1144, 696); + this.tableLayoutPanel1.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); + this.label1.Location = new System.Drawing.Point(10, 10); + this.label1.Margin = new System.Windows.Forms.Padding(10, 10, 10, 30); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(552, 203); + this.label1.TabIndex = 4; + this.label1.Text = "Charging..."; + this.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft; + // + // timeRemainingLabel + // + this.timeRemainingLabel.AutoSize = true; + this.timeRemainingLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.timeRemainingLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.timeRemainingLabel.Location = new System.Drawing.Point(50, 600); + this.timeRemainingLabel.Margin = new System.Windows.Forms.Padding(50, 10, 10, 10); + this.timeRemainingLabel.Name = "timeRemainingLabel"; + this.timeRemainingLabel.Size = new System.Drawing.Size(512, 86); + this.timeRemainingLabel.TabIndex = 3; + this.timeRemainingLabel.Text = "timeRemaining"; + // + // chargeRateLabel + // + this.chargeRateLabel.AutoSize = true; + this.chargeRateLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.chargeRateLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.chargeRateLabel.Location = new System.Drawing.Point(622, 496); + this.chargeRateLabel.Margin = new System.Windows.Forms.Padding(50, 10, 10, 10); + this.chargeRateLabel.Name = "chargeRateLabel"; + this.chargeRateLabel.Size = new System.Drawing.Size(512, 84); + this.chargeRateLabel.TabIndex = 2; + this.chargeRateLabel.Text = "chargeRate"; + // + // progressBar1 + // + this.tableLayoutPanel1.SetColumnSpan(this.progressBar1, 2); + this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill; + this.progressBar1.Location = new System.Drawing.Point(25, 268); + this.progressBar1.Margin = new System.Windows.Forms.Padding(25); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(1094, 193); + this.progressBar1.Step = 1; + this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.progressBar1.TabIndex = 0; + this.progressBar1.Value = 9; + // + // chargeCapacityLabel + // + this.chargeCapacityLabel.AutoSize = true; + this.chargeCapacityLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.chargeCapacityLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.chargeCapacityLabel.Location = new System.Drawing.Point(50, 496); + this.chargeCapacityLabel.Margin = new System.Windows.Forms.Padding(50, 10, 10, 10); + this.chargeCapacityLabel.Name = "chargeCapacityLabel"; + this.chargeCapacityLabel.Size = new System.Drawing.Size(512, 84); + this.chargeCapacityLabel.TabIndex = 1; + this.chargeCapacityLabel.Text = "chargeCapacity"; + // + // Charging + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1904, 1041); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.button1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Charging"; + this.Text = "Charging"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.Charging_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Label chargeCapacityLabel; + private System.Windows.Forms.Label chargeRateLabel; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label timeRemainingLabel; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Charging.cs b/HCI_Coursework_EVCHARGE/Charging.cs new file mode 100644 index 0000000..63a6ac9 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Charging.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.Remoting.Metadata.W3cXsd2001; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class Charging : Form + { + String bay; + String vehicle; + String duration; + public Charging(String bayNo, String vehicle, String duration) + { + InitializeComponent(); + this.bay = bayNo; + this.vehicle = vehicle; + this.duration = duration; + var details = new ChargingDetails(Convert.ToInt16(bay)).getCarInfo(vehicle); + label1.Text = $"{System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(vehicle)} Charging..."; + chargeRateLabel.Text = $"Charging Rate: {details[0]} kW"; + chargeCapacityLabel.Text = $" Total Charge: {Convert.ToString(decimal.Round( (Convert.ToDecimal(details[0]) / Convert.ToInt16(duration)), 2, MidpointRounding.ToEven))} kWh"; + } + + private void Charging_Load(object sender, EventArgs e) + { + timer1.Enabled = true; + timer1.Start(); + timer1.Interval = 1000; + progressBar1.Maximum = (Convert.ToInt16(duration) * 3600); + timer1.Tick += new EventHandler(timer1_Tick); + } + + private void timer1_Tick(object sender, EventArgs e) + { + TimeSpan timeRemaining = TimeSpan.FromSeconds(progressBar1.Maximum - progressBar1.Value); + if (progressBar1.Value != progressBar1.Maximum) + { + Console.WriteLine( timeRemaining.ToString() ); + progressBar1.Value++; + timeRemainingLabel.Text = string.Format("{0:D2}h:{1:D2}m:{2:D2}s" + " remaining.", + timeRemaining.Hours, + timeRemaining.Minutes, + timeRemaining.Seconds); + } + else + { + timer1.Stop(); + } + } + + private void cancel_Button(object sender, EventArgs e) + { + Application.Exit(); + } + } +} diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Form1.resx b/HCI_Coursework_EVCHARGE/Charging.resx similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Form1.resx rename to HCI_Coursework_EVCHARGE/Charging.resx diff --git a/HCI_Coursework_EVCHARGE/ChargingDetails.Designer.cs b/HCI_Coursework_EVCHARGE/ChargingDetails.Designer.cs new file mode 100644 index 0000000..503d196 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/ChargingDetails.Designer.cs @@ -0,0 +1,351 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class ChargingDetails + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.vehiclePanel = new System.Windows.Forms.TableLayoutPanel(); + this.backButton = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.scooterButton = new System.Windows.Forms.Button(); + this.carButton = new System.Windows.Forms.Button(); + this.bikeButton = new System.Windows.Forms.Button(); + this.infoPanel = new System.Windows.Forms.TableLayoutPanel(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.durationLabel = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.powerLabel = new System.Windows.Forms.Label(); + this.bayLabel = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.confirmPanel = new System.Windows.Forms.TableLayoutPanel(); + this.confirmDetailsButton = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.vehiclePanel.SuspendLayout(); + this.infoPanel.SuspendLayout(); + this.confirmPanel.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.vehiclePanel); + this.panel1.Controls.Add(this.infoPanel); + this.panel1.Controls.Add(this.confirmPanel); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(30, 30, 30, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1920, 1080); + this.panel1.TabIndex = 0; + // + // vehiclePanel + // + this.vehiclePanel.ColumnCount = 1; + this.vehiclePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.vehiclePanel.Controls.Add(this.backButton, 0, 4); + this.vehiclePanel.Controls.Add(this.label1, 0, 0); + this.vehiclePanel.Controls.Add(this.scooterButton, 0, 3); + this.vehiclePanel.Controls.Add(this.carButton, 0, 1); + this.vehiclePanel.Controls.Add(this.bikeButton, 0, 2); + this.vehiclePanel.Dock = System.Windows.Forms.DockStyle.Left; + this.vehiclePanel.Location = new System.Drawing.Point(0, 0); + this.vehiclePanel.Name = "vehiclePanel"; + this.vehiclePanel.RowCount = 5; + this.vehiclePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.vehiclePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.vehiclePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.vehiclePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.vehiclePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F)); + this.vehiclePanel.Size = new System.Drawing.Size(646, 1080); + this.vehiclePanel.TabIndex = 4; + // + // backButton + // + this.backButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.backButton.Location = new System.Drawing.Point(20, 938); + this.backButton.Margin = new System.Windows.Forms.Padding(20); + this.backButton.Name = "backButton"; + this.backButton.Size = new System.Drawing.Size(606, 122); + this.backButton.TabIndex = 4; + this.backButton.Text = "Cancel"; + this.backButton.UseVisualStyleBackColor = true; + this.backButton.Click += new System.EventHandler(this.backButton_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.label1.Location = new System.Drawing.Point(30, 30); + this.label1.Margin = new System.Windows.Forms.Padding(30); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(586, 48); + this.label1.TabIndex = 3; + this.label1.Text = "Select Vehicle Type"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // scooterButton + // + this.scooterButton.BackColor = System.Drawing.SystemColors.ActiveBorder; + this.scooterButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.scooterButton.Location = new System.Drawing.Point(30, 678); + this.scooterButton.Margin = new System.Windows.Forms.Padding(30); + this.scooterButton.Name = "scooterButton"; + this.scooterButton.Size = new System.Drawing.Size(586, 210); + this.scooterButton.TabIndex = 2; + this.scooterButton.Text = "E-Scooter"; + this.scooterButton.UseVisualStyleBackColor = false; + this.scooterButton.Click += new System.EventHandler(this.vehicleButton_Click); + // + // carButton + // + this.carButton.BackColor = System.Drawing.SystemColors.ActiveBorder; + this.carButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.carButton.Location = new System.Drawing.Point(30, 138); + this.carButton.Margin = new System.Windows.Forms.Padding(30); + this.carButton.Name = "carButton"; + this.carButton.Size = new System.Drawing.Size(586, 210); + this.carButton.TabIndex = 0; + this.carButton.Text = "Car"; + this.carButton.UseVisualStyleBackColor = false; + this.carButton.Click += new System.EventHandler(this.vehicleButton_Click); + // + // bikeButton + // + this.bikeButton.BackColor = System.Drawing.SystemColors.ActiveBorder; + this.bikeButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.bikeButton.Location = new System.Drawing.Point(30, 408); + this.bikeButton.Margin = new System.Windows.Forms.Padding(30); + this.bikeButton.Name = "bikeButton"; + this.bikeButton.Size = new System.Drawing.Size(586, 210); + this.bikeButton.TabIndex = 1; + this.bikeButton.Text = "E-Bike"; + this.bikeButton.UseVisualStyleBackColor = false; + this.bikeButton.Click += new System.EventHandler(this.vehicleButton_Click); + // + // infoPanel + // + this.infoPanel.ColumnCount = 1; + this.infoPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.infoPanel.Controls.Add(this.label6, 0, 7); + this.infoPanel.Controls.Add(this.textBox1, 0, 8); + this.infoPanel.Controls.Add(this.label2, 0, 0); + this.infoPanel.Controls.Add(this.durationLabel, 0, 6); + this.infoPanel.Controls.Add(this.label5, 0, 1); + this.infoPanel.Controls.Add(this.label4, 0, 5); + this.infoPanel.Controls.Add(this.powerLabel, 0, 4); + this.infoPanel.Controls.Add(this.bayLabel, 0, 2); + this.infoPanel.Controls.Add(this.label3, 0, 3); + this.infoPanel.Location = new System.Drawing.Point(646, 0); + this.infoPanel.Name = "infoPanel"; + this.infoPanel.RowCount = 9; + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); + this.infoPanel.Size = new System.Drawing.Size(1274, 904); + this.infoPanel.TabIndex = 11; + this.infoPanel.Visible = false; + // + // label6 + // + this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); + this.label6.Location = new System.Drawing.Point(20, 720); + this.label6.Margin = new System.Windows.Forms.Padding(20, 20, 20, 5); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(1234, 68); + this.label6.TabIndex = 11; + this.label6.Text = "Charging Duration ( Hours )"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // textBox1 + // + this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F); + this.textBox1.Location = new System.Drawing.Point(500, 830); + this.textBox1.Margin = new System.Windows.Forms.Padding(500, 30, 500, 30); + this.textBox1.MaxLength = 1; + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(274, 45); + this.textBox1.TabIndex = 12; + this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.textBox1.Enter += new System.EventHandler(this.accountPin_Focus); + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Margin = new System.Windows.Forms.Padding(0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(1264, 63); + this.label2.TabIndex = 4; + this.label2.Text = "Charging Information"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // durationLabel + // + this.durationLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F); + this.durationLabel.Location = new System.Drawing.Point(30, 605); + this.durationLabel.Margin = new System.Windows.Forms.Padding(30, 5, 30, 30); + this.durationLabel.Name = "durationLabel"; + this.durationLabel.Size = new System.Drawing.Size(1214, 63); + this.durationLabel.TabIndex = 10; + this.durationLabel.Text = "maxDuration"; + this.durationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); + this.label5.Location = new System.Drawing.Point(20, 120); + this.label5.Margin = new System.Windows.Forms.Padding(20, 20, 20, 5); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(1234, 63); + this.label5.TabIndex = 7; + this.label5.Text = "Charging Bay"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label4 + // + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); + this.label4.Location = new System.Drawing.Point(20, 520); + this.label4.Margin = new System.Windows.Forms.Padding(20, 20, 20, 5); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(1234, 63); + this.label4.TabIndex = 6; + this.label4.Text = "Maximum Duration"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // powerLabel + // + this.powerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F); + this.powerLabel.Location = new System.Drawing.Point(30, 405); + this.powerLabel.Margin = new System.Windows.Forms.Padding(30, 5, 30, 30); + this.powerLabel.Name = "powerLabel"; + this.powerLabel.Size = new System.Drawing.Size(1214, 63); + this.powerLabel.TabIndex = 9; + this.powerLabel.Text = "maxPower"; + this.powerLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // bayLabel + // + this.bayLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F); + this.bayLabel.Location = new System.Drawing.Point(30, 205); + this.bayLabel.Margin = new System.Windows.Forms.Padding(30, 5, 30, 30); + this.bayLabel.Name = "bayLabel"; + this.bayLabel.Size = new System.Drawing.Size(1214, 63); + this.bayLabel.TabIndex = 8; + this.bayLabel.Text = "chargingBay"; + this.bayLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F); + this.label3.Location = new System.Drawing.Point(20, 320); + this.label3.Margin = new System.Windows.Forms.Padding(20, 20, 20, 5); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(1234, 63); + this.label3.TabIndex = 5; + this.label3.Text = "Maximum Power"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // confirmPanel + // + this.confirmPanel.ColumnCount = 1; + this.confirmPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.confirmPanel.Controls.Add(this.confirmDetailsButton, 0, 0); + this.confirmPanel.Location = new System.Drawing.Point(648, 904); + this.confirmPanel.Name = "confirmPanel"; + this.confirmPanel.RowCount = 1; + this.confirmPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.confirmPanel.Size = new System.Drawing.Size(1272, 176); + this.confirmPanel.TabIndex = 3; + this.confirmPanel.Visible = false; + // + // confirmDetailsButton + // + this.confirmDetailsButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.confirmDetailsButton.Location = new System.Drawing.Point(20, 20); + this.confirmDetailsButton.Margin = new System.Windows.Forms.Padding(20); + this.confirmDetailsButton.Name = "confirmDetailsButton"; + this.confirmDetailsButton.Size = new System.Drawing.Size(1232, 136); + this.confirmDetailsButton.TabIndex = 3; + this.confirmDetailsButton.Text = "Confirm"; + this.confirmDetailsButton.UseVisualStyleBackColor = true; + this.confirmDetailsButton.Click += new System.EventHandler(this.confirmButton_Click); + // + // ChargingDetails + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1920, 1080); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "ChargingDetails"; + this.Text = "ChargingDetails"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.panel1.ResumeLayout(false); + this.vehiclePanel.ResumeLayout(false); + this.vehiclePanel.PerformLayout(); + this.infoPanel.ResumeLayout(false); + this.infoPanel.PerformLayout(); + this.confirmPanel.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label durationLabel; + private System.Windows.Forms.Label powerLabel; + private System.Windows.Forms.Label bayLabel; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Button confirmDetailsButton; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TableLayoutPanel confirmPanel; + private System.Windows.Forms.TableLayoutPanel infoPanel; + private System.Windows.Forms.TableLayoutPanel vehiclePanel; + private System.Windows.Forms.Button backButton; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button scooterButton; + private System.Windows.Forms.Button carButton; + private System.Windows.Forms.Button bikeButton; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/ChargingDetails.cs b/HCI_Coursework_EVCHARGE/ChargingDetails.cs new file mode 100644 index 0000000..2a46512 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/ChargingDetails.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class ChargingDetails : Form + { + Pinpad pinpad; + String vehicle; + String duration; + String bayNo; + + public ChargingDetails( int bayNo ) + { + this.bayNo = bayNo.ToString(); + InitializeComponent(); + bayLabel.Text = "Bay " + this.bayNo; + } + + public String[] getCarInfo( String vehicleType ) + { + String[] max = {"",""}; + switch (vehicleType) + { + case "car": + max[0] = ("7"); + max[1] = ("8"); + break; + case "e-bike": + max[0] = ("0.9"); + max[1] = ("2"); + break; + case "e-scooter": + max[0] = ("0.25"); + max[1] = ("1"); + break; + } + return max; + } + private void vehicleButton_Click( object sender, EventArgs e) + { + if ( sender is Button button) + { + carButton.BackColor = SystemColors.ActiveBorder; + bikeButton.BackColor = SystemColors.ActiveBorder; + scooterButton.BackColor = SystemColors.ActiveBorder; + vehicle = button.Text.ToLower(); + + String[] maxArr = getCarInfo(vehicle); + Console.WriteLine(maxArr[0], maxArr[1]); + if ( maxArr.Length > 0 ) + { + powerLabel.Text = $"{maxArr[0]} kW"; + durationLabel.Text = $"{maxArr[1]} hours"; + } + button.BackColor = SystemColors.ControlDark; + infoPanel.Visible = true; + System.Threading.Thread.Sleep(100); + } + } + + private void backButton_Click(object sender, EventArgs e) + { + pinpad?.Close(); + Close(); + } + + private void confirmButton_Click(object sender, EventArgs e) + { + pinpad?.Close(); + String maxDuration = getCarInfo(vehicle)[1]; + if (Convert.ToInt16(textBox1.Text) > Convert.ToInt16(maxDuration)) + { + MessageBox.Show($"Duration must be less than {maxDuration} hours."); + } + else + { + duration = textBox1.Text; + DialogResult confirm = MessageBox.Show($"Are you sure these details are correct?\nVehicle: {vehicle}\nDuration: {duration} hours?", "Confirm:", MessageBoxButtons.YesNo); + if (confirm == DialogResult.Yes) + { + Payment payment = new Payment(bayNo, vehicle, duration); + payment.Show(); + payment.FormClosed += delegate + { + payment = null; + }; + } + } + } + private void accountPin_Focus(object sender, EventArgs e) + { + TextBox textBox = (TextBox)sender; + + if (pinpad == null) + { + pinpad = new Pinpad(); + pinpad.FormClosed += delegate + { + if( textBox.Text != null ) + { + confirmPanel.Visible = true; + } + pinpad = null; + this.ActiveControl = label1; + }; + } + pinpad.setTextBox(textBox); + pinpad.Show(); + pinpad.Top = this.Top + textBox.Top + textBox.Height - 250; + } + } +} diff --git a/HCI_Coursework_EVCHARGE/ChargingDetails.resx b/HCI_Coursework_EVCHARGE/ChargingDetails.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/ChargingDetails.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/HCI_Coursework_EVCHARGE.csproj b/HCI_Coursework_EVCHARGE/HCI_Coursework_EVCHARGE.csproj index 65856b9..01606f3 100644 --- a/HCI_Coursework_EVCHARGE/HCI_Coursework_EVCHARGE.csproj +++ b/HCI_Coursework_EVCHARGE/HCI_Coursework_EVCHARGE.csproj @@ -33,6 +33,15 @@ 4 + + packages\AForge.2.2.5\lib\AForge.dll + + + packages\AForge.Video.2.2.5\lib\AForge.Video.dll + + + packages\AForge.Video.DirectShow.2.2.5\lib\AForge.Video.DirectShow.dll + @@ -44,36 +53,99 @@ + + packages\ZXing.Net.0.16.6\lib\net47\zxing.dll + + + packages\ZXing.Net.0.16.6\lib\net47\zxing.presentation.dll + - + Form - - Form1.cs + + BaySelection.cs - + Form - - Form2.cs + + Charging.cs - + Form - - Form3.cs + + ChargingDetails.cs + + + Form + + + LandingForm.cs + + + Form + + + LoginForm.cs + + + Form + + + Keyboard.cs + + + Form + + + Payment.cs + + + Form + + + Pinpad.cs - - Form1.cs + + Form + + + QRReader.cs + + + Form + + + TapCard.cs + + + BaySelection.cs - - Form2.cs + + Charging.cs - - Form3.cs + + ChargingDetails.cs + + + LandingForm.cs + + + LoginForm.cs + + + Keyboard.cs + + + Payment.cs + + + Pinpad.cs ResXFileCodeGenerator @@ -83,7 +155,15 @@ True Resources.resx + True + + QRReader.cs + + + TapCard.cs + + SettingsSingleFileGenerator Settings.Designer.cs @@ -97,5 +177,8 @@ + + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Form3.Designer.cs b/HCI_Coursework_EVCHARGE/Keyboard.Designer.cs similarity index 97% rename from HCI_Coursework_EVCHARGE/Form3.Designer.cs rename to HCI_Coursework_EVCHARGE/Keyboard.Designer.cs index 88aac34..7f75dce 100644 --- a/HCI_Coursework_EVCHARGE/Form3.Designer.cs +++ b/HCI_Coursework_EVCHARGE/Keyboard.Designer.cs @@ -476,19 +476,22 @@ this.buttonConfirm.TabIndex = 28; this.buttonConfirm.Text = "Confirm"; this.buttonConfirm.UseVisualStyleBackColor = true; + this.buttonConfirm.Click += new System.EventHandler(this.confirm_Click); // // buttonCaps // + this.buttonCaps.BackColor = System.Drawing.SystemColors.ControlDark; this.buttonCaps.FlatAppearance.BorderColor = System.Drawing.Color.Silver; this.buttonCaps.FlatAppearance.BorderSize = 4; this.buttonCaps.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.buttonCaps.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F); + this.buttonCaps.ForeColor = System.Drawing.SystemColors.ControlText; this.buttonCaps.Location = new System.Drawing.Point(18, 312); this.buttonCaps.Name = "buttonCaps"; this.buttonCaps.Size = new System.Drawing.Size(128, 50); this.buttonCaps.TabIndex = 29; this.buttonCaps.Text = "Caps Lock"; - this.buttonCaps.UseVisualStyleBackColor = true; + this.buttonCaps.UseVisualStyleBackColor = false; this.buttonCaps.Click += new System.EventHandler(this.caps_Click); // // panel1 @@ -552,6 +555,7 @@ this.button0.TabIndex = 39; this.button0.Text = "0"; this.button0.UseVisualStyleBackColor = true; + this.button0.Click += new System.EventHandler(this.button_Click); // // button9 // @@ -565,6 +569,7 @@ this.button9.TabIndex = 38; this.button9.Text = "9"; this.button9.UseVisualStyleBackColor = true; + this.button9.Click += new System.EventHandler(this.button_Click); // // button8 // @@ -578,6 +583,7 @@ this.button8.TabIndex = 37; this.button8.Text = "8"; this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button_Click); // // button7 // @@ -591,6 +597,7 @@ this.button7.TabIndex = 36; this.button7.Text = "7"; this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button_Click); // // button6 // @@ -604,6 +611,7 @@ this.button6.TabIndex = 35; this.button6.Text = "6"; this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button_Click); // // button5 // @@ -617,6 +625,7 @@ this.button5.TabIndex = 34; this.button5.Text = "5"; this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button_Click); // // button4 // @@ -630,6 +639,7 @@ this.button4.TabIndex = 33; this.button4.Text = "4"; this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button_Click); // // button3 // @@ -643,6 +653,7 @@ this.button3.TabIndex = 32; this.button3.Text = "3"; this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button_Click); // // button2 // @@ -656,6 +667,7 @@ this.button2.TabIndex = 31; this.button2.Text = "2"; this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button_Click); // // button1 // @@ -669,6 +681,7 @@ this.button1.TabIndex = 30; this.button1.Text = "1"; this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button_Click); // // Keyboard // diff --git a/HCI_Coursework_EVCHARGE/Form3.cs b/HCI_Coursework_EVCHARGE/Keyboard.cs similarity index 69% rename from HCI_Coursework_EVCHARGE/Form3.cs rename to HCI_Coursework_EVCHARGE/Keyboard.cs index e2e38ec..6243e24 100644 --- a/HCI_Coursework_EVCHARGE/Form3.cs +++ b/HCI_Coursework_EVCHARGE/Keyboard.cs @@ -31,14 +31,22 @@ namespace HCI_Coursework_EVCHARGE private void button_Click(object sender, EventArgs e) { - if( capsLock == true ) + if (entryBox.Text.Length < 10) { - entryBox.Text += ((Button)sender).Text; + if (capsLock == true) + { + entryBox.Text += ((Button)sender).Text; + } + else + { + entryBox.Text += ((Button)sender).Text.ToLower(); + } } else { - entryBox.Text += ((Button)sender).Text.ToLower(); + MessageBox.Show("Account Number cannot be more than 10 characters!"); } + } private void backspace_Click(object sender, EventArgs e) @@ -58,12 +66,19 @@ namespace HCI_Coursework_EVCHARGE { if ( capsLock == true ) { + buttonCaps.BackColor = SystemColors.Control; capsLock = false; } else { + buttonCaps.BackColor = SystemColors.ControlDark; capsLock = true; } } + + private void confirm_Click(object sender, EventArgs e) + { + Close(); + } } } diff --git a/HCI_Coursework_EVCHARGE/Form3.resx b/HCI_Coursework_EVCHARGE/Keyboard.resx similarity index 100% rename from HCI_Coursework_EVCHARGE/Form3.resx rename to HCI_Coursework_EVCHARGE/Keyboard.resx diff --git a/HCI_Coursework_EVCHARGE/Form1.Designer.cs b/HCI_Coursework_EVCHARGE/LandingForm.Designer.cs similarity index 78% rename from HCI_Coursework_EVCHARGE/Form1.Designer.cs rename to HCI_Coursework_EVCHARGE/LandingForm.Designer.cs index d7e0f5d..23bda7e 100644 --- a/HCI_Coursework_EVCHARGE/Form1.Designer.cs +++ b/HCI_Coursework_EVCHARGE/LandingForm.Designer.cs @@ -37,11 +37,13 @@ // // accountNoButton // - this.accountNoButton.Anchor = System.Windows.Forms.AnchorStyles.None; - this.accountNoButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); - this.accountNoButton.Location = new System.Drawing.Point(220, 232); + this.accountNoButton.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.accountNoButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F); + this.accountNoButton.Location = new System.Drawing.Point(544, 664); this.accountNoButton.Name = "accountNoButton"; - this.accountNoButton.Size = new System.Drawing.Size(144, 96); + this.accountNoButton.Size = new System.Drawing.Size(318, 172); this.accountNoButton.TabIndex = 0; this.accountNoButton.Text = "Account Number"; this.accountNoButton.UseVisualStyleBackColor = true; @@ -49,25 +51,30 @@ // // qrCodeButton // - this.qrCodeButton.Anchor = System.Windows.Forms.AnchorStyles.None; - this.qrCodeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); - this.qrCodeButton.Location = new System.Drawing.Point(504, 232); + this.qrCodeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.qrCodeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F); + this.qrCodeButton.Location = new System.Drawing.Point(1096, 664); this.qrCodeButton.Name = "qrCodeButton"; - this.qrCodeButton.Size = new System.Drawing.Size(144, 96); + this.qrCodeButton.Size = new System.Drawing.Size(318, 172); this.qrCodeButton.TabIndex = 1; this.qrCodeButton.Text = "Account Card"; this.qrCodeButton.UseVisualStyleBackColor = true; + this.qrCodeButton.Click += new System.EventHandler(this.qr_Click); // // loginLabel // this.loginLabel.Anchor = System.Windows.Forms.AnchorStyles.None; this.loginLabel.AutoSize = true; - this.loginLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 34F); - this.loginLabel.Location = new System.Drawing.Point(360, 144); + this.loginLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 50F); + this.loginLabel.Location = new System.Drawing.Point(19, 436); + this.loginLabel.MinimumSize = new System.Drawing.Size(1920, 0); this.loginLabel.Name = "loginLabel"; - this.loginLabel.Size = new System.Drawing.Size(149, 53); + this.loginLabel.Size = new System.Drawing.Size(1920, 76); this.loginLabel.TabIndex = 2; this.loginLabel.Text = "Log in"; + this.loginLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.loginLabel.Click += new System.EventHandler(this.loginLabel_Click); // // panel1 @@ -77,18 +84,18 @@ | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BackColor = System.Drawing.SystemColors.Control; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.loginLabel); - this.panel1.Controls.Add(this.qrCodeButton); this.panel1.Controls.Add(this.accountNoButton); + this.panel1.Controls.Add(this.qrCodeButton); + this.panel1.Controls.Add(this.loginLabel); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(854, 480); + this.panel1.Size = new System.Drawing.Size(1920, 1080); this.panel1.TabIndex = 3; // // LandingForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(854, 480); + this.ClientSize = new System.Drawing.Size(1920, 1080); this.Controls.Add(this.panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "LandingForm"; diff --git a/HCI_Coursework_EVCHARGE/Form1.cs b/HCI_Coursework_EVCHARGE/LandingForm.cs similarity index 61% rename from HCI_Coursework_EVCHARGE/Form1.cs rename to HCI_Coursework_EVCHARGE/LandingForm.cs index 3ab2ba0..2ebf8c8 100644 --- a/HCI_Coursework_EVCHARGE/Form1.cs +++ b/HCI_Coursework_EVCHARGE/LandingForm.cs @@ -26,9 +26,29 @@ namespace HCI_Coursework_EVCHARGE { var loginForm = new AccountDetailForm(); loginForm.Show(); + loginForm.FormClosed += delegate + { + loginForm = null; + }; //loginForm.Top = this.Top + ( loginForm.Height / 3 ); //loginForm.Left = this.Left + ( ( this.Width * 3 ) / 7 ); } + + private void debugclose_click(object sender, EventArgs e) + { + Application.Exit(); + } + + private void qr_Click(object sender, EventArgs e) + { + var loginForm = new QRReader(); + + loginForm.Show(); + loginForm.FormClosed += delegate + { + loginForm = null; + }; + } } } diff --git a/HCI_Coursework_EVCHARGE/Form1.resx b/HCI_Coursework_EVCHARGE/LandingForm.resx similarity index 100% rename from HCI_Coursework_EVCHARGE/Form1.resx rename to HCI_Coursework_EVCHARGE/LandingForm.resx diff --git a/HCI_Coursework_EVCHARGE/Form2.Designer.cs b/HCI_Coursework_EVCHARGE/LoginForm.Designer.cs similarity index 83% rename from HCI_Coursework_EVCHARGE/Form2.Designer.cs rename to HCI_Coursework_EVCHARGE/LoginForm.Designer.cs index 77e81f8..25cb148 100644 --- a/HCI_Coursework_EVCHARGE/Form2.Designer.cs +++ b/HCI_Coursework_EVCHARGE/LoginForm.Designer.cs @@ -29,13 +29,13 @@ private void InitializeComponent() { this.panel1 = new System.Windows.Forms.Panel(); - this.accountNoTextBox = new System.Windows.Forms.TextBox(); - this.loginLabel = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.confirmLoginButton = new System.Windows.Forms.Button(); - this.cancelLoginButton = new System.Windows.Forms.Button(); - this.accountIDLabel = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); + this.accountIDLabel = new System.Windows.Forms.Label(); + this.cancelLoginButton = new System.Windows.Forms.Button(); + this.confirmLoginButton = new System.Windows.Forms.Button(); + this.accountPinTextBox = new System.Windows.Forms.TextBox(); + this.loginLabel = new System.Windows.Forms.Label(); + this.accountNoTextBox = new System.Windows.Forms.TextBox(); this.panel1.SuspendLayout(); this.SuspendLayout(); // @@ -47,7 +47,7 @@ this.panel1.Controls.Add(this.accountIDLabel); this.panel1.Controls.Add(this.cancelLoginButton); this.panel1.Controls.Add(this.confirmLoginButton); - this.panel1.Controls.Add(this.textBox1); + this.panel1.Controls.Add(this.accountPinTextBox); this.panel1.Controls.Add(this.loginLabel); this.panel1.Controls.Add(this.accountNoTextBox); this.panel1.Location = new System.Drawing.Point(0, 0); @@ -55,6 +55,74 @@ this.panel1.Size = new System.Drawing.Size(456, 544); this.panel1.TabIndex = 0; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F); + this.label1.Location = new System.Drawing.Point(88, 256); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(49, 26); + this.label1.TabIndex = 6; + this.label1.Text = "PIN"; + // + // accountIDLabel + // + this.accountIDLabel.AutoSize = true; + this.accountIDLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F); + this.accountIDLabel.Location = new System.Drawing.Point(88, 152); + this.accountIDLabel.Name = "accountIDLabel"; + this.accountIDLabel.Size = new System.Drawing.Size(119, 26); + this.accountIDLabel.TabIndex = 5; + this.accountIDLabel.Text = "Account ID"; + // + // cancelLoginButton + // + this.cancelLoginButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cancelLoginButton.Location = new System.Drawing.Point(264, 392); + this.cancelLoginButton.Name = "cancelLoginButton"; + this.cancelLoginButton.Size = new System.Drawing.Size(150, 75); + this.cancelLoginButton.TabIndex = 4; + this.cancelLoginButton.Text = "Cancel"; + this.cancelLoginButton.UseVisualStyleBackColor = true; + this.cancelLoginButton.Click += new System.EventHandler(this.cancel_Click); + // + // confirmLoginButton + // + this.confirmLoginButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.confirmLoginButton.Location = new System.Drawing.Point(40, 392); + this.confirmLoginButton.Name = "confirmLoginButton"; + this.confirmLoginButton.Size = new System.Drawing.Size(150, 75); + this.confirmLoginButton.TabIndex = 3; + this.confirmLoginButton.Text = "Login"; + this.confirmLoginButton.UseVisualStyleBackColor = true; + this.confirmLoginButton.Click += new System.EventHandler(this.login_Click); + // + // accountPinTextBox + // + this.accountPinTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; + this.accountPinTextBox.BackColor = System.Drawing.SystemColors.Window; + this.accountPinTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.accountPinTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; + this.accountPinTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.accountPinTextBox.Location = new System.Drawing.Point(80, 288); + this.accountPinTextBox.MaxLength = 6; + this.accountPinTextBox.Name = "accountPinTextBox"; + this.accountPinTextBox.PasswordChar = '*'; + this.accountPinTextBox.Size = new System.Drawing.Size(288, 35); + this.accountPinTextBox.TabIndex = 2; + this.accountPinTextBox.Enter += new System.EventHandler(this.accountPin_Focus); + // + // loginLabel + // + this.loginLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.loginLabel.AutoSize = true; + this.loginLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F); + this.loginLabel.Location = new System.Drawing.Point(120, 72); + this.loginLabel.Name = "loginLabel"; + this.loginLabel.Size = new System.Drawing.Size(208, 36); + this.loginLabel.TabIndex = 1; + this.loginLabel.Text = "Account Login"; + // // accountNoTextBox // this.accountNoTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; @@ -68,71 +136,7 @@ this.accountNoTextBox.Size = new System.Drawing.Size(288, 35); this.accountNoTextBox.TabIndex = 0; this.accountNoTextBox.Enter += new System.EventHandler(this.accountNo_Focus); - // - // loginLabel - // - this.loginLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.loginLabel.AutoSize = true; - this.loginLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F); - this.loginLabel.Location = new System.Drawing.Point(120, 72); - this.loginLabel.Name = "loginLabel"; - this.loginLabel.Size = new System.Drawing.Size(208, 36); - this.loginLabel.TabIndex = 1; - this.loginLabel.Text = "Account Login"; - // - // textBox1 - // - this.textBox1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.textBox1.BackColor = System.Drawing.SystemColors.Window; - this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.textBox1.Cursor = System.Windows.Forms.Cursors.IBeam; - this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); - this.textBox1.Location = new System.Drawing.Point(80, 288); - this.textBox1.MaxLength = 6; - this.textBox1.Name = "textBox1"; - this.textBox1.PasswordChar = '*'; - this.textBox1.Size = new System.Drawing.Size(288, 35); - this.textBox1.TabIndex = 2; - // - // confirmLoginButton - // - this.confirmLoginButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.confirmLoginButton.Location = new System.Drawing.Point(40, 392); - this.confirmLoginButton.Name = "confirmLoginButton"; - this.confirmLoginButton.Size = new System.Drawing.Size(150, 75); - this.confirmLoginButton.TabIndex = 3; - this.confirmLoginButton.Text = "Login"; - this.confirmLoginButton.UseVisualStyleBackColor = true; - // - // cancelLoginButton - // - this.cancelLoginButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cancelLoginButton.Location = new System.Drawing.Point(264, 392); - this.cancelLoginButton.Name = "cancelLoginButton"; - this.cancelLoginButton.Size = new System.Drawing.Size(150, 75); - this.cancelLoginButton.TabIndex = 4; - this.cancelLoginButton.Text = "Cancel"; - this.cancelLoginButton.UseVisualStyleBackColor = true; - // - // accountIDLabel - // - this.accountIDLabel.AutoSize = true; - this.accountIDLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F); - this.accountIDLabel.Location = new System.Drawing.Point(88, 152); - this.accountIDLabel.Name = "accountIDLabel"; - this.accountIDLabel.Size = new System.Drawing.Size(119, 26); - this.accountIDLabel.TabIndex = 5; - this.accountIDLabel.Text = "Account ID"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F); - this.label1.Location = new System.Drawing.Point(88, 256); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(49, 26); - this.label1.TabIndex = 6; - this.label1.Text = "PIN"; + this.accountNoTextBox.Leave += new System.EventHandler(this.accountNo_LoseFocus); // // AccountDetailForm // @@ -158,7 +162,7 @@ private System.Windows.Forms.Label accountIDLabel; private System.Windows.Forms.Button cancelLoginButton; private System.Windows.Forms.Button confirmLoginButton; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox accountPinTextBox; private System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Form2.cs b/HCI_Coursework_EVCHARGE/LoginForm.cs similarity index 51% rename from HCI_Coursework_EVCHARGE/Form2.cs rename to HCI_Coursework_EVCHARGE/LoginForm.cs index 7c5fe77..7a9be62 100644 --- a/HCI_Coursework_EVCHARGE/Form2.cs +++ b/HCI_Coursework_EVCHARGE/LoginForm.cs @@ -15,6 +15,7 @@ namespace HCI_Coursework_EVCHARGE public partial class AccountDetailForm : Form { Keyboard keyboard; + Pinpad pinpad; public AccountDetailForm() { InitializeComponent(); @@ -42,5 +43,64 @@ namespace HCI_Coursework_EVCHARGE keyboard.Top = this.Top + textBox.Top + textBox.Height + 30; } + + private void accountPin_Focus(object sender, EventArgs e) { + TextBox textBox = (TextBox)sender; + + if ( pinpad == null ) + { + pinpad = new Pinpad(); + pinpad.FormClosed += delegate + { + pinpad = null; + this.ActiveControl = loginLabel; + }; + } + pinpad.setTextBox(textBox); + pinpad.Show(); + pinpad.Top = this.Top + textBox.Top + textBox.Height + 30; + + + } + + private void cancel_Click(object sender, EventArgs e) + { + keyboard?.Close(); + pinpad?.Close(); + Close(); + } + + private void login_Click(object sender, EventArgs e) + { + if ( accountNoTextBox.Text == "" ) + { + if ( accountPinTextBox.Text == "" ) + { + BaySelection baySelection = new BaySelection( accountNoTextBox.Text ); + baySelection.Show(); + baySelection.FormClosed += delegate + { + baySelection = null; + }; + Close(); + } + } + } + + private void accountNo_LoseFocus(object sender, EventArgs e) + { + if (keyboard != null) + { + keyboard.Close(); + } + } + + private void accountPin_LoseFocus(Object sender, EventArgs e) + { + if (pinpad != null ) + { + pinpad.Close(); + } + } } } diff --git a/HCI_Coursework_EVCHARGE/LoginForm.resx b/HCI_Coursework_EVCHARGE/LoginForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/LoginForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Payment.Designer.cs b/HCI_Coursework_EVCHARGE/Payment.Designer.cs new file mode 100644 index 0000000..c8a3ded --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Payment.Designer.cs @@ -0,0 +1,116 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class Payment + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.loginLabel = new System.Windows.Forms.Label(); + this.qrCodeButton = new System.Windows.Forms.Button(); + this.accountNoButton = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // loginLabel + // + this.loginLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.loginLabel.AutoSize = true; + this.loginLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 34F); + this.loginLabel.Location = new System.Drawing.Point(0, 456); + this.loginLabel.MinimumSize = new System.Drawing.Size(1920, 0); + this.loginLabel.Name = "loginLabel"; + this.loginLabel.Size = new System.Drawing.Size(1920, 53); + this.loginLabel.TabIndex = 3; + this.loginLabel.Text = "Choose a Payment Method"; + this.loginLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // qrCodeButton + // + this.qrCodeButton.Dock = System.Windows.Forms.DockStyle.Left; + this.qrCodeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.qrCodeButton.Location = new System.Drawing.Point(1042, 3); + this.qrCodeButton.Margin = new System.Windows.Forms.Padding(90, 3, 3, 3); + this.qrCodeButton.Name = "qrCodeButton"; + this.qrCodeButton.Size = new System.Drawing.Size(144, 114); + this.qrCodeButton.TabIndex = 5; + this.qrCodeButton.Text = "Tap Payment Card"; + this.qrCodeButton.UseVisualStyleBackColor = true; + this.qrCodeButton.Click += new System.EventHandler(this.tapButton_Click); + // + // accountNoButton + // + this.accountNoButton.Dock = System.Windows.Forms.DockStyle.Right; + this.accountNoButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.accountNoButton.Location = new System.Drawing.Point(718, 3); + this.accountNoButton.Margin = new System.Windows.Forms.Padding(3, 3, 90, 3); + this.accountNoButton.Name = "accountNoButton"; + this.accountNoButton.Size = new System.Drawing.Size(144, 114); + this.accountNoButton.TabIndex = 4; + this.accountNoButton.Text = "Account Credit"; + this.accountNoButton.UseVisualStyleBackColor = true; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.qrCodeButton, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.accountNoButton, 0, 0); + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 632); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1904, 120); + this.tableLayoutPanel1.TabIndex = 6; + // + // Payment + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1904, 1041); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.loginLabel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Payment"; + this.Text = "Payment"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label loginLabel; + private System.Windows.Forms.Button qrCodeButton; + private System.Windows.Forms.Button accountNoButton; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Payment.cs b/HCI_Coursework_EVCHARGE/Payment.cs new file mode 100644 index 0000000..7af9322 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Payment.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.Remoting.Metadata.W3cXsd2001; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class Payment : Form + { + String bay; + String vehicle; + String duration; + public Payment( String bay, String vehicle, String duration) + { + InitializeComponent(); + this.bay = bay; + this.vehicle = vehicle; + this.duration = duration; + } + + private void tapButton_Click(object sender, EventArgs e) + { + TapCard tapCard = new TapCard( bay, vehicle, duration ); + tapCard.Show(); + tapCard.FormClosed += delegate + { + tapCard = null; + }; + } + } +} diff --git a/HCI_Coursework_EVCHARGE/Payment.resx b/HCI_Coursework_EVCHARGE/Payment.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Payment.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Pinpad.Designer.cs b/HCI_Coursework_EVCHARGE/Pinpad.Designer.cs new file mode 100644 index 0000000..21b477a --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Pinpad.Designer.cs @@ -0,0 +1,264 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class Pinpad + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); + this.button0 = new System.Windows.Forms.Button(); + this.buttonConfirm = new System.Windows.Forms.Button(); + this.buttonBack = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.SuspendLayout(); + // + // button1 + // + this.button1.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button1.FlatAppearance.BorderSize = 4; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button1.Location = new System.Drawing.Point(16, 16); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(50, 50); + this.button1.TabIndex = 31; + this.button1.Text = "1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button_Click); + // + // button2 + // + this.button2.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button2.FlatAppearance.BorderSize = 4; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button2.Location = new System.Drawing.Point(88, 16); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(50, 50); + this.button2.TabIndex = 32; + this.button2.Text = "2"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button_Click); + // + // button3 + // + this.button3.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button3.FlatAppearance.BorderSize = 4; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button3.Location = new System.Drawing.Point(160, 16); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(50, 50); + this.button3.TabIndex = 33; + this.button3.Text = "3"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button_Click); + // + // button4 + // + this.button4.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button4.FlatAppearance.BorderSize = 4; + this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button4.Location = new System.Drawing.Point(16, 88); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(50, 50); + this.button4.TabIndex = 34; + this.button4.Text = "4"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button_Click); + // + // button5 + // + this.button5.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button5.FlatAppearance.BorderSize = 4; + this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button5.Location = new System.Drawing.Point(88, 88); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(50, 50); + this.button5.TabIndex = 35; + this.button5.Text = "5"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button_Click); + // + // button6 + // + this.button6.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button6.FlatAppearance.BorderSize = 4; + this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button6.Location = new System.Drawing.Point(160, 88); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(50, 50); + this.button6.TabIndex = 36; + this.button6.Text = "6"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button_Click); + // + // button7 + // + this.button7.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button7.FlatAppearance.BorderSize = 4; + this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button7.Location = new System.Drawing.Point(16, 160); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(50, 50); + this.button7.TabIndex = 37; + this.button7.Text = "7"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button_Click); + // + // button8 + // + this.button8.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button8.FlatAppearance.BorderSize = 4; + this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button8.Location = new System.Drawing.Point(88, 160); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(50, 50); + this.button8.TabIndex = 38; + this.button8.Text = "8"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button_Click); + // + // button9 + // + this.button9.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button9.FlatAppearance.BorderSize = 4; + this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button9.Location = new System.Drawing.Point(160, 160); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(50, 50); + this.button9.TabIndex = 39; + this.button9.Text = "9"; + this.button9.UseVisualStyleBackColor = true; + this.button9.Click += new System.EventHandler(this.button_Click); + // + // button0 + // + this.button0.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.button0.FlatAppearance.BorderSize = 4; + this.button0.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button0.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F); + this.button0.Location = new System.Drawing.Point(88, 232); + this.button0.Name = "button0"; + this.button0.Size = new System.Drawing.Size(50, 50); + this.button0.TabIndex = 40; + this.button0.Text = "0"; + this.button0.UseVisualStyleBackColor = true; + this.button0.Click += new System.EventHandler(this.button_Click); + // + // buttonConfirm + // + this.buttonConfirm.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.buttonConfirm.FlatAppearance.BorderSize = 4; + this.buttonConfirm.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.buttonConfirm.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.buttonConfirm.Location = new System.Drawing.Point(16, 304); + this.buttonConfirm.Name = "buttonConfirm"; + this.buttonConfirm.Size = new System.Drawing.Size(192, 50); + this.buttonConfirm.TabIndex = 41; + this.buttonConfirm.Text = "Confirm"; + this.buttonConfirm.UseVisualStyleBackColor = true; + this.buttonConfirm.Click += new System.EventHandler(this.confirm_Click); + // + // buttonBack + // + this.buttonBack.FlatAppearance.BorderColor = System.Drawing.Color.Silver; + this.buttonBack.FlatAppearance.BorderSize = 4; + this.buttonBack.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.buttonBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.buttonBack.Location = new System.Drawing.Point(160, 232); + this.buttonBack.Name = "buttonBack"; + this.buttonBack.Size = new System.Drawing.Size(48, 50); + this.buttonBack.TabIndex = 42; + this.buttonBack.Text = "|<-"; + this.buttonBack.UseVisualStyleBackColor = true; + this.buttonBack.Click += new System.EventHandler(this.backspace_Click); + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(225, 370); + this.panel1.TabIndex = 43; + // + // Pinpad + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(225, 370); + this.Controls.Add(this.buttonBack); + this.Controls.Add(this.buttonConfirm); + this.Controls.Add(this.button0); + this.Controls.Add(this.button9); + this.Controls.Add(this.button8); + this.Controls.Add(this.button7); + this.Controls.Add(this.button6); + this.Controls.Add(this.button5); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Pinpad"; + this.Text = "Enter PIN"; + this.TopMost = true; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button button0; + private System.Windows.Forms.Button buttonConfirm; + private System.Windows.Forms.Button buttonBack; + private System.Windows.Forms.Panel panel1; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Pinpad.cs b/HCI_Coursework_EVCHARGE/Pinpad.cs new file mode 100644 index 0000000..0a428f9 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Pinpad.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class Pinpad : Form + { + TextBox entryBox; + + public Pinpad() + { + InitializeComponent(); + this.TopMost = true; + StartPosition = FormStartPosition.CenterScreen; + } + + public void setTextBox(TextBox textBox) + { + entryBox = textBox; + } + + private void backspace_Click(object sender, EventArgs e) + { + if (entryBox.Text.Length > 0) + { + entryBox.Text = entryBox.Text.Substring(0, entryBox.Text.Length - 1); + } + } + + private void confirm_Click(object sender, EventArgs e) + { + Close(); + } + + private void button_Click(object sender, EventArgs e) + { + if ( entryBox.Text.Length < 6 ) + { + entryBox.Text += ((Button)sender).Text; + } + else + { + MessageBox.Show("PIN cannot be more than 6 numbers!"); + } + + } + } +} diff --git a/HCI_Coursework_EVCHARGE/Pinpad.resx b/HCI_Coursework_EVCHARGE/Pinpad.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/Pinpad.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/Properties/Resources.Designer.cs b/HCI_Coursework_EVCHARGE/Properties/Resources.Designer.cs index d902c88..3147e49 100644 --- a/HCI_Coursework_EVCHARGE/Properties/Resources.Designer.cs +++ b/HCI_Coursework_EVCHARGE/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace HCI_Coursework_EVCHARGE.Properties -{ - - +namespace HCI_Coursework_EVCHARGE.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,53 +19,55 @@ namespace HCI_Coursework_EVCHARGE.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HCI_Coursework_EVCHARGE.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap contactless { + get { + object obj = ResourceManager.GetObject("contactless", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/HCI_Coursework_EVCHARGE/Properties/Resources.resx b/HCI_Coursework_EVCHARGE/Properties/Resources.resx index af7dbeb..8e0232a 100644 --- a/HCI_Coursework_EVCHARGE/Properties/Resources.resx +++ b/HCI_Coursework_EVCHARGE/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,13 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Assets\contactless.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/QRReader.Designer.cs b/HCI_Coursework_EVCHARGE/QRReader.Designer.cs new file mode 100644 index 0000000..2b0d22c --- /dev/null +++ b/HCI_Coursework_EVCHARGE/QRReader.Designer.cs @@ -0,0 +1,121 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class QRReader + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.cboCamera = new System.Windows.Forms.ComboBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.panel1 = new System.Windows.Forms.Panel(); + this.cancelButton = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // cboCamera + // + this.cboCamera.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cboCamera.FormattingEnabled = true; + this.cboCamera.Location = new System.Drawing.Point(346, 26); + this.cboCamera.Name = "cboCamera"; + this.cboCamera.Size = new System.Drawing.Size(252, 32); + this.cboCamera.TabIndex = 0; + this.cboCamera.Visible = false; + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; + this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(852, 478); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // timer1 + // + this.timer1.Interval = 1000; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.cancelButton); + this.panel1.Controls.Add(this.pictureBox1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(854, 480); + this.panel1.TabIndex = 3; + // + // cancelButton + // + this.cancelButton.BackColor = System.Drawing.Color.LightGray; + this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cancelButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 17F); + this.cancelButton.ForeColor = System.Drawing.Color.Black; + this.cancelButton.Location = new System.Drawing.Point(312, 424); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(232, 55); + this.cancelButton.TabIndex = 3; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = false; + this.cancelButton.Click += new System.EventHandler(this.cancel_Click); + // + // QRReader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(854, 480); + this.Controls.Add(this.panel1); + this.Controls.Add(this.cboCamera); + this.Cursor = System.Windows.Forms.Cursors.Default; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "QRReader"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Form1"; + this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + this.Load += new System.EventHandler(this.Form1_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ComboBox cboCamera; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button cancelButton; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/QRReader.cs b/HCI_Coursework_EVCHARGE/QRReader.cs new file mode 100644 index 0000000..e3f7afb --- /dev/null +++ b/HCI_Coursework_EVCHARGE/QRReader.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + + +// include the libraries +using AForge.Video; +using AForge.Video.DirectShow; +using ZXing; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class QRReader : Form + { + // foxlearn.com/windows-forms/qr-code-scanner-using-camera-in-csharp-380.html + + + FilterInfoCollection filterInfoCollection; + VideoCaptureDevice videoCaptureDevice; + + public QRReader() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + // this will list the available cameras + filterInfoCollection = new FilterInfoCollection(FilterCategory.VideoInputDevice); + foreach (FilterInfo Device in filterInfoCollection) + cboCamera.Items.Add(Device.Name); + cboCamera.SelectedIndex = 0; + + // start the camera device + videoCaptureDevice = new VideoCaptureDevice(filterInfoCollection[cboCamera.SelectedIndex].MonikerString); + videoCaptureDevice.NewFrame += FinalFrame_NewFrame; + videoCaptureDevice.Start(); + timer1.Start(); + } + + private void FinalFrame_NewFrame(object sender, NewFrameEventArgs eventArgs) + { + // show the video in the picturebox + pictureBox1.Image = (Bitmap)eventArgs.Frame.Clone(); + } + + private void Form1_FormClosing(object sender, FormClosingEventArgs e) + { + // close the camera device when the app is closed + if (videoCaptureDevice.IsRunning == true) + videoCaptureDevice.Stop(); + } + + private void timer1_Tick(object sender, EventArgs e) + { + // try and detect a barcode/qrcode in the image frame + BarcodeReader Reader = new BarcodeReader(); + Result result = Reader.Decode((Bitmap)pictureBox1.Image); + if (result != null && result.Text == "AB87654321") + { + BaySelection baySelection = new BaySelection(result.Text); + baySelection.Show(); + baySelection.FormClosed += delegate + { + baySelection = null; + }; + Close(); + } + } + + private void cancel_Click(object sender, EventArgs e) + { + Close(); + } + } +} + + diff --git a/HCI_Coursework_EVCHARGE/QRReader.resx b/HCI_Coursework_EVCHARGE/QRReader.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/QRReader.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/TapCard.Designer.cs b/HCI_Coursework_EVCHARGE/TapCard.Designer.cs new file mode 100644 index 0000000..2f4e810 --- /dev/null +++ b/HCI_Coursework_EVCHARGE/TapCard.Designer.cs @@ -0,0 +1,121 @@ +namespace HCI_Coursework_EVCHARGE +{ + partial class TapCard + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TapCard)); + this.label1 = new System.Windows.Forms.Label(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.button1 = new System.Windows.Forms.Button(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F); + this.label1.Location = new System.Drawing.Point(3, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(378, 92); + this.label1.TabIndex = 0; + this.label1.Text = "Present Payment Card"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.button1, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 0, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 5; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(384, 461); + this.tableLayoutPanel1.TabIndex = 1; + // + // button1 + // + this.button1.Dock = System.Windows.Forms.DockStyle.Fill; + this.button1.Location = new System.Drawing.Point(10, 378); + this.button1.Margin = new System.Windows.Forms.Padding(10); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(364, 73); + this.button1.TabIndex = 1; + this.button1.Text = "Cancel"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.backButton_Click); + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.ImageLocation = "contactless.png"; + this.pictureBox1.Location = new System.Drawing.Point(3, 187); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(378, 86); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox_Click); + // + // TapCard + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(384, 461); + this.Controls.Add(this.tableLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "TapCard"; + this.Text = "TapCard"; + this.TopMost = true; + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.PictureBox pictureBox1; + } +} \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/TapCard.cs b/HCI_Coursework_EVCHARGE/TapCard.cs new file mode 100644 index 0000000..142734e --- /dev/null +++ b/HCI_Coursework_EVCHARGE/TapCard.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HCI_Coursework_EVCHARGE +{ + public partial class TapCard : Form + { + String bay; + String vehicle; + String duration; + + public TapCard(string bay, string vehicle, string duration) + { + InitializeComponent(); + this.bay = bay; + this.vehicle = vehicle; + this.duration = duration; + } + + private void pictureBox_Click(object sender, EventArgs e) + { + Charging charging = new Charging(bay, vehicle, duration); + charging.Show(); + charging.FormClosed += delegate + { + charging = null; + }; + } + + private void backButton_Click(object sender, EventArgs e) + { + Close(); + } + } +} diff --git a/HCI_Coursework_EVCHARGE/TapCard.resx b/HCI_Coursework_EVCHARGE/TapCard.resx new file mode 100644 index 0000000..e9d5b8b --- /dev/null +++ b/HCI_Coursework_EVCHARGE/TapCard.resx @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAANIAAAEACAYAAADGGCjSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH5QUGFgQIFcpiyQAAI0JJREFU + eF7tnQe0NWV1hjUVo5ImFhCxYDSKRk2CBRUUIoiFoliwEFs0iIIailgIgogRJaAYgwWxUVWKGmwxCkYx + KiQCKlGQKNYkaGJLNe9DmH/dsv/LOffOfvfcme9d61ku17qcf58z88183643aGoq0A3FjcRviPuJF4g3 + ik9ex/vFCeIgsb24hfgV8XOiqalJYgHdXbxI/L342Qx8SxwpdhAsvragmiatTcUTxCXif0S0aFbiX8Wr + xLbil0VT0+R0S7Gf+EcRLZJZ+W/B9o+308+LpqbJ6KbiOeIbIloc8/If4nTx26KpaRL6RbGLuFhEi2K1 + XCNeLnBENDWNXncUZwm2ZNGCWAtfF08Wm4imptEKD93TxA9FtBD64G/F3URT02i1uXiPiBZAX/ynOE78 + pmhqGp3wqD1EcKNHC6BPfir2FL8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4V0aKJ4G/5b5qHrqlpgYj7 + bCroHEu7rI3xELGF4G8HGiu6wQ3+D+yBOeI0wqhFAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/HCI_Coursework_EVCHARGE/contactless.png b/HCI_Coursework_EVCHARGE/contactless.png new file mode 100644 index 0000000..de206aa Binary files /dev/null and b/HCI_Coursework_EVCHARGE/contactless.png differ diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/packages.config b/HCI_Coursework_EVCHARGE/packages.config similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/packages.config rename to HCI_Coursework_EVCHARGE/packages.config diff --git a/QRreaderWindowsForms.zip b/QRreaderWindowsForms.zip new file mode 100644 index 0000000..1b6be10 Binary files /dev/null and b/QRreaderWindowsForms.zip differ diff --git a/QRreaderWindowsForms/QRreaderWindowsForms.sln b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms.sln similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms.sln rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms.sln diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/App.config b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/App.config similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/App.config rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/App.config diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Form1.Designer.cs b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.Designer.cs similarity index 82% rename from QRreaderWindowsForms/QRreaderWindowsForms/Form1.Designer.cs rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.Designer.cs index 53c9b13..83e2f41 100644 --- a/QRreaderWindowsForms/QRreaderWindowsForms/Form1.Designer.cs +++ b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.Designer.cs @@ -41,19 +41,18 @@ namespace QRreaderWindowsForms // // cboCamera // - this.cboCamera.Dock = System.Windows.Forms.DockStyle.Top; this.cboCamera.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cboCamera.FormattingEnabled = true; - this.cboCamera.Location = new System.Drawing.Point(0, 0); + this.cboCamera.Location = new System.Drawing.Point(346, 26); this.cboCamera.Name = "cboCamera"; - this.cboCamera.Size = new System.Drawing.Size(534, 32); + this.cboCamera.Size = new System.Drawing.Size(252, 32); this.cboCamera.TabIndex = 0; // // btnStart // - this.btnStart.Location = new System.Drawing.Point(330, 207); + this.btnStart.Location = new System.Drawing.Point(355, 285); this.btnStart.Name = "btnStart"; - this.btnStart.Size = new System.Drawing.Size(100, 35); + this.btnStart.Size = new System.Drawing.Size(75, 23); this.btnStart.TabIndex = 1; this.btnStart.Text = "Start"; this.btnStart.UseVisualStyleBackColor = true; @@ -61,21 +60,17 @@ namespace QRreaderWindowsForms // // pictureBox1 // - this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left; - this.pictureBox1.Location = new System.Drawing.Point(0, 32); + this.pictureBox1.Location = new System.Drawing.Point(33, 73); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(328, 307); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.Size = new System.Drawing.Size(280, 235); this.pictureBox1.TabIndex = 2; this.pictureBox1.TabStop = false; // // btnDecode // - this.btnDecode.Location = new System.Drawing.Point(432, 207); + this.btnDecode.Location = new System.Drawing.Point(475, 285); this.btnDecode.Name = "btnDecode"; - this.btnDecode.Size = new System.Drawing.Size(100, 35); + this.btnDecode.Size = new System.Drawing.Size(75, 23); this.btnDecode.TabIndex = 3; this.btnDecode.Text = "Decode"; this.btnDecode.UseVisualStyleBackColor = true; @@ -89,16 +84,16 @@ namespace QRreaderWindowsForms // txtResult // this.txtResult.FormattingEnabled = true; - this.txtResult.Location = new System.Drawing.Point(328, 32); + this.txtResult.Location = new System.Drawing.Point(349, 74); this.txtResult.Name = "txtResult"; - this.txtResult.Size = new System.Drawing.Size(206, 173); + this.txtResult.Size = new System.Drawing.Size(248, 173); this.txtResult.TabIndex = 4; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(534, 339); + this.ClientSize = new System.Drawing.Size(622, 339); this.Controls.Add(this.txtResult); this.Controls.Add(this.btnDecode); this.Controls.Add(this.pictureBox1); diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Form1.cs b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.cs similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Form1.cs rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.cs diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.resx b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Form1.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Program.cs b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Program.cs similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Program.cs rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Program.cs diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Properties/AssemblyInfo.cs b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/AssemblyInfo.cs similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Properties/AssemblyInfo.cs rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/AssemblyInfo.cs diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.Designer.cs b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.Designer.cs similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.Designer.cs rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.Designer.cs diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.resx b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.resx similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.resx rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Resources.resx diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.Designer.cs b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.Designer.cs similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.Designer.cs rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.Designer.cs diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.settings b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.settings similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.settings rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/Properties/Settings.settings diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms.csproj b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms.csproj similarity index 100% rename from QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms.csproj rename to QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms.csproj diff --git a/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/packages.config b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/packages.config new file mode 100644 index 0000000..90d3684 --- /dev/null +++ b/QRreaderWindowsForms/QRreaderWindowsForms/QRreaderWindowsForms/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file