static void Main(string[] args) { // Assemble your system here from all the classes IUsbCharger charger = new UsbChargerSimulator(); DoorSimulator door = new DoorSimulator(); rfidReader rfid = new rfidReader(); IDisplay display = new Display(); ILog log = new LogFile(); ChargeControl chargeControl = new ChargeControl(charger, display); StationControl station = new StationControl(door, chargeControl, rfid, display, log); bool finish = false; do { string input; System.Console.WriteLine("Indtast E, O, C, R, T: "); input = Console.ReadLine(); if (string.IsNullOrEmpty(input)) { continue; } switch (input[0]) { case 'E': finish = true; break; case 'O': door.OpenDoor(); break; case 'C': door.CloseDoor(); break; case 'R': System.Console.WriteLine("Indtast RFID id: "); string idString = System.Console.ReadLine(); int id = Convert.ToInt32(idString); rfid.ScanRFID(id); break; case 'T': chargeControl.IsConnectedToggle(); break; default: break; } } while (!finish); }
public void Setup() { _receivedEventArgs = null; //fakeDoor = new FakeDoor(); _uut = new rfidReader(); _uut.IDLoadedEvent += (o, args) => { _receivedEventArgs = args; }; }
private void offOnline_Load(object sender, EventArgs e) { int port = Int32.Parse(ConfigurationManager.AppSettings["port"]); int baud = Int32.Parse(ConfigurationManager.AppSettings["baud"]); rfid = new rfidReader(port, baud); }
private void online_Load(object sender, EventArgs e) { int port = Int16.Parse(ConfigurationManager.AppSettings["port"]); int baud = Int16.Parse(ConfigurationManager.AppSettings["baud"]); rfid = new rfidReader(port, baud); string postData="studentID=1234325&activityID=1"; string returnText=ConnWebService(postData); }
public void Setup() { _rfidReader = new rfidReader(); _rfidReader.RFIDReadEvent += (o, args) => _rfidReadEvent = args; }