private static void Main(string[] args) { ExecutableCommand[] commands = new[] { new ExecutableCommand("Открыть счёт", new BalanceOpening(_balancesDatabase)), new ExecutableCommand("Закрыть счёт", new BalanceClosing(_balancesDatabase)), new ExecutableCommand("Перевести деньги", new TransferBetweenBalances(_balancesDatabase)) }; BalancesUI UI = new BalancesUI(_balancesDatabase); while (true) { Console.Clear(); UI.Display(50, 0); string input = GetCommandName(); ProcessCommands(commands, input); } }
public BalanceClosing(BalancesDatabase database) { _database = database; _UI = new BalancesUI(_database); }
public TransferBetweenBalances(BalancesDatabase database) { _database = database; _UI = new BalancesUI(_database); }