public Withdrawal(IScreen screen, IKeyPad keypad, Account account) { _screen = screen; _keypad = keypad; _account = account; cashDispenser = new DispenseCash(); }
public Deposit(IScreen screen, IKeyPad keypad, Account account) { _screen = screen; _keypad = keypad; _account = account; depositSlot = new DepositSlot(); }
private static string FindKeyCode(string Input, IKeyPad KeyPad) { using (var Reader = new StreamReader(Input)) { var Builder = new StringBuilder(); while (!Reader.EndOfStream) { var Instructions = Reader.ReadLine(); foreach (var Instruction in Instructions) { switch (Instruction) { case 'U': KeyPad.Move(Direction.Up); break; case 'R': KeyPad.Move(Direction.Right); break; case 'D': KeyPad.Move(Direction.Down); break; case 'L': KeyPad.Move(Direction.Left); break; default: break; } } Builder.Append(KeyPad.Current); } return(Builder.ToString()); } }
public void interpretCommand(char command, IKeyPad pad) { if (command == 'U') { pad.MoveUp(); } if (command == 'R') { pad.MoveRight(); } if (command == 'D') { pad.MoveDown(); } if (command == 'L') { pad.MoveLeft(); } }
private Task InitializeKeyPad(bool enableKeyupEvent) { IGpioPinMapping[] mappings = new IGpioPinMapping[] { new GpioPinMappingColumn(column: 3, pinNumber: 13), new GpioPinMappingColumn(column: 2, pinNumber: 16), new GpioPinMappingColumn(column: 1, pinNumber: 18), new GpioPinMappingRow(row: 4, pinNumber: 22), new GpioPinMappingRow(row: 3, pinNumber: 23), new GpioPinMappingRow(row: 2, pinNumber: 24), new GpioPinMappingRow(row: 1, pinNumber: 25), }; // *** // *** Use the physical 3x4 keypad/comment // *** to use the emulator. // *** //_keypad = new Membrane3x4(mappings) //{ // EnableButtonUpEvent = enableKeyupEvent //}; // *** // *** Uncomment to use the emulator/comment // *** to use the physical keypad. // *** _keypad = new Membrane3x4Emulator() { EnableButtonUpEvent = enableKeyupEvent }; // *** // *** Return a task... // *** return(Task.FromResult(0)); }
public Check(IScreen screen, IKeyPad keypad) { _screen = screen; _keypad = keypad; }
public Flight1(IScreen screen, IKeyPad keyPad) : base(screen, keyPad) { _screen = screen; _keyPad = keyPad; }
public Routes(IScreen screen, IKeyPad keyPad) { _screen = screen; _keyPad = keyPad; }
public Ferry2(IScreen screen, IKeyPad keypad) : base(screen, keypad) { _screen = screen; _keypad = keypad; }
public Withdrawal(IScreen screen, IKeyPad keypad, Account account) { _screen = screen; _keypad = keypad; _account = account; }
public Kiosk(IScreen screen, IKeyPad keypad) { _screen = screen; _keypad = keypad; }
public Ferry(IScreen screen, IKeyPad keypad) : base(screen, keypad) { }
public ATM(IScreen screen, IKeyPad keypad) { _screen = screen; _keypad = keypad; }
public Flight(IScreen screen, IKeyPad keypad) : base(screen, keypad) { }