Exemple #1
0
 public VanishingScreen(int lastBal, ATM_Object theATM)
 {
     InitializeComponent();
     myATM   = theATM;
     prevBal = lastBal;
     this.previous_balance.Text = lastBal.ToString();
     this.current_balance.Text  = theATM.getCurrentUserBalance().ToString();
 }
Exemple #2
0
        public ShowBalance(ATM_Object theATM)
        {
            InitializeComponent();
            myATM            = theATM;
            balance          = myATM.getCurrentUserBalance();
            this.label2.Text = balance.ToString();


            //   Text = balance.ToString();
        }
Exemple #3
0
        public static ATM_Object loadUsersFromDatabase()
        {
            ATM_Object tempATM  = new ATM_Object();
            var        filepath = "./../../atm_database.txt";

            using (StreamReader sr = new StreamReader(filepath))
            {
                while ((line = sr.ReadLine()) != null)
                {
                    string[] data = line.Split(',');
                    if (!data[0].Equals("Username"))
                    {
                        User tempUser = new User(data[0], data[1], Int32.Parse(data[2]));
                        tempATM.addNewUser(data[0], tempUser);
                    }
                }
            }
            return(tempATM);
        }
Exemple #4
0
 public Welcome()
 {
     myATM = Database.loadUsersFromDatabase();
     this.IsMdiContainer = true;
     InitializeComponent();
 }
Exemple #5
0
 public TaskPage(ATM_Object theATM)
 {
     myATM = theATM;
     InitializeComponent();
 }
Exemple #6
0
 public CustomWithdraw(ATM_Object theATM)
 {
     InitializeComponent();
     myATM = theATM;
 }
Exemple #7
0
 public Deposit(ATM_Object theATM)
 {
     InitializeComponent();
     myATM = theATM;
 }