/// <summary> /// Main GUI for selecting which GUI is wanted. /// </summary> public MainForm() { InitializeComponent(); counter = new Counter(); routes = new RouteList(); Setup(); }
/// <summary> /// Constructor for the scanner class that takes two parameters /// </summary> /// <param name="location"></param> /// <param name="entry"></param> public Scanner(Station location, bool entry) { _location = location; _entry = entry; _accounts = new AccountList(Persister.ReadFromBinaryFile <List <CustomerAccount> >(@"Accounts.txt")); _aBarrier = new Barrier(); _routeList = new RouteList(); }
/// <summary> /// A method that does nothing /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="z"></param> public void NewRoute(Station x, Station y, decimal z) { if (_routes == null) { _routes = new RouteList(); } _routes.AddRoute(new Route(x, y, z)); }
/// <summary> /// constructor for the scanner class that takes four parameters /// </summary> /// <param name="location"></param> /// <param name="entry"></param> /// <param name="a"></param> /// <param name="b"></param> public Scanner(Station location, bool entry, AccountList a, RouteList b) { _location = location; _entry = entry; _accounts = a; _aBarrier = new Barrier(); _routeList = new RouteList(); _routeList = b; }
public AdminAccount(int id) { var temp = new AccountList(true).GetAdminAccountById(id); _routes = temp._routes; _loginStatus = temp._loginStatus; _accountId = temp._accountId; _fullName = temp._fullName; _password = temp._password; _username = temp._username; }
/// <summary> /// The AdminGUI is initialized with the _routes paramater so that it can update the RouteList /// when routes are added. /// </summary> /// <param name="_routes">The RouteList object that is created in form1</param> public AdminGUI(RouteList _routes) { InitializeComponent(); lblLoginDetails.Visible = true; tbPassword.Visible = true; tbUsername.Visible = true; lblPassword.Visible = true; lblUsername.Visible = true; btnLogin.Visible = true; tbPassword.Text = "password"; tbUsername.Text = "admin-pete-w"; LoadStations(); routes = _routes; foreach (var station in _stations.GetStations()) { cbStations.Items.Add(station); cbSelectStation.Items.Add(station); } cbStations.SelectedIndex = 0; cbSelectStation.SelectedIndex = 0; }