/****************************************************************************************************/ // METHODS - PERSISTENCE (String Data Manipulation) /****************************************************************************************************/ public void Reset() { for (int i = 0; i < _busList.GetCount(); i++) { _busList.GetBusAtIndex(i).Clear(); } for (int i = 0; i < _busStopList.GetCount(); i++) { _busStopList.At(i).Clear(); } _time = 0; for (int i = 0; i < _userList.GetCount(); i++) { _userList.FindUserWithIndex(i).Clear(); } T_VAL = 60; T_COST = 2; BUS_THRESHOLD = 10; BUSSTOP_THRESHOLD = 10; _hasEvent = false; _systemsmslog = new List<SMS>(); _interruptlog = new List<SMS>(); _autohopofflist = new List<string>(); _canhopoffnowlist = new List<string>(); _ticketList = new TicketExpiryList(); _busInterruptList = new List<BusInterrupt>(); _retailShop = new TopUpRetailShop(); }
private string _usedCardsListFile; // name of the file that stores all used card numbers /****************************************************************************************************/ // CONSTRUCTOR /****************************************************************************************************/ public EzySystem() { T_VAL = 5; T_COST = 2; BUS_THRESHOLD = 2; BUSSTOP_THRESHOLD = 2; _time = 0; _hasEvent = false; _systemsmslog = new List<SMS>(); _interruptlog = new List<SMS>(); _autohopofflist = new List<string>(); _canhopoffnowlist = new List<string>(); _userList = new UserList(); _busList = new BusList(); _busStopList = new BusStopList(); _ticketList = new TicketExpiryList(); _busInterruptList = new List<BusInterrupt>(); _retailShop = new TopUpRetailShop(); _userDataFile = "Data_User.txt"; _busListDataFile = "Data_Bus.txt"; _busStopListDataFile = "Data_BusStop.txt"; _ticketListDataFile = "Data_Ticket.txt"; _busInterruptListDataFile = "Data_BusInterrupt.txt"; _systemDataFile = "Data_System.txt"; _usedCardsListFile = "Data_CardList.txt"; }