finish??
This commit is contained in:
39
HCI_Coursework_EVCHARGE/BaySelection.cs
Normal file
39
HCI_Coursework_EVCHARGE/BaySelection.cs
Normal file
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user