-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlobalDataClass.cs
45 lines (38 loc) · 1.97 KB
/
GlobalDataClass.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* Gavin Rodgers
* 3309 ATM Project
* This GlobalDataClass handles and stores all the instantiation for the forms and classes
* Last edited: 10/13/18
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ATM;
using System.Windows.Forms;
namespace ATM
{
public static class GlobalDataClass
{
// NOTE:
// Static methods of a class may be called without instantiating the class
// They called from the class itself
// Static objects or variables may be accessed without creating an instance of the class
// that contains them
// When you declare a class as static, all its members are automatically static
private static string currentFilePath = "C:\\Users\\gavinr\\source\\repos\\ATM\\ATM\\CurrentATMBankFile.txt";
// private static string updatedFilePath = "C:\\Users\\gavinr\\source\\repos\\ATM\\ATMUpdatedATMBankFile.txt";
// Application classes
public static ATMBankClass ATMBank = new ATMBankClass();
public static CustomerClass customer = new CustomerClass();
public static currentFileClass currentFile = new currentFileClass(currentFilePath);
// public static updatedFileClass updatedFile = new updatedFileClass(updatedFilePath);
// Creating instances of all the forms ...
public static Form TransactionCompleteForm = new frmTransactionComplete();
public static Form TransactionEntryForm = new frmTransactionEntry();
// Only need these two (below) forms once so there is no need to instantiate them global and public. We Instatiate them as we need them
public static Form PinIDEntryForm = new frmPinIDEntry();
public static Form SplashStartForm = new frmForm1();
// For communication between forms ...
public static string FormsCode = "";
} // end Global Data Class
} // end namespace