// a constructor that takes initial values for each of the attributes (balance, pin, accountNumber) public Account(int balance, int pin, int accountNum, bool dataRace, int ATMsToMake) { this.balance = balance; this.pin = pin; this.accountNum = accountNum; this.withdrawing = new Semaphore(1, 1); this.threadSyncer = new Barrier(ATMsToMake); this.dataRace = dataRace; //stop mutliple threads creating a file withdrawing.WaitOne(); this.logs = new logWriter(); withdrawing.Release(); }
/* * Calls the logwriter and reads in then displays log data */ public void readLogs(object sender, EventArgs e) { logWriter readLogs = new logWriter(); logBox.Text = readLogs.returnData(); }