public ATMSystem(IATMFactory factory, ITransponderReceiver transponderReceiver) { //Calling factory methods receiver = transponderReceiver; _airSpace = factory.CreateAirSpace(); _condition = factory.CreateCondition(); _consolePrinter = factory.CreateConsolePrinter(); _logger = factory.CreateLogger(); _separationChecker = factory.CreateSeparationChecker(); //Subscribing to events this.receiver.TransponderDataReady += ReceiverOnTransponderReady; this.SeparationLogDataReady += _logger.SeparationLogDataHandler; this.ConsoleSeparationDataReady += _consolePrinter.ConsoleSeparationDataHandler; }
public static void PrintValidCode(IConsolePrinter consolePrinter, TerminalCode terminalCode, ConsoleColor overridingColor = default) { FormatCodeColor(consolePrinter, terminalCode.Code1, overridingColor); consolePrinter.PrintColored(ConsoleColor.White, "-"); FormatCodeColor(consolePrinter, terminalCode.Code2, overridingColor); consolePrinter.PrintColored(ConsoleColor.White, "-"); FormatCodeColor(consolePrinter, terminalCode.Code3, overridingColor); consolePrinter.PrintColored(ConsoleColor.White, " | "); FormatCodeNumber(consolePrinter, terminalCode.Code1, overridingColor); consolePrinter.PrintColored(ConsoleColor.White, "-"); FormatCodeNumber(consolePrinter, terminalCode.Code2, overridingColor); consolePrinter.PrintColored(ConsoleColor.White, "-"); FormatCodeNumber(consolePrinter, terminalCode.Code3, overridingColor); consolePrinter.PrintLine(); }
public static void PrintTerminalCodes(IConsolePrinter consolePrinter, TerminalCode alarmCode, TerminalCode secretCode, ConsoleColor overridingColor = default) { consolePrinter.PrintSectionHeader(); if (alarmCode.IsDefault) { consolePrinter.PrintColoredLine(ConsoleColor.Cyan, ResSoE.StatusNoTerminalCodeSet); } else if (alarmCode.Code1.ToUShort() == EmptySaveSlotValue) { consolePrinter.PrintColoredLine(ConsoleColor.Yellow, Resources.StatusSaveslotIsEmpty); } else { consolePrinter.PrintColored(ConsoleColor.White, $"{Resources.AlarmCode}: "); if (alarmCode.IsValid) { PrintValidCode(consolePrinter, alarmCode, overridingColor); } else { PrintInvalidCode(alarmCode); } consolePrinter.PrintColored(ConsoleColor.White, $"{Resources.SecretBossRoomCode}: "); if (secretCode.IsValid) { PrintValidCode(consolePrinter, secretCode, overridingColor); } else { PrintInvalidCode(secretCode); } } consolePrinter.ResetColor(); void PrintInvalidCode(TerminalCode alarmCode1) => consolePrinter.PrintColoredLine(ConsoleColor.Red, $"{ResSoE.StatusInvalidTerminalCode} ({alarmCode1.Code1}-{alarmCode1.Code2}-{alarmCode1.Code3})"); }
private static StorageCommand GetCommand(ConsoleCommandParser consoleCommandParser, IConsolePrinter consolePrinter) { consolePrinter.PrintСommandWaitingIcon(); string rowCommand = Console.ReadLine(); if (string.IsNullOrWhiteSpace(rowCommand)) { throw new ArgumentException("You have not entered a command."); } return(consoleCommandParser.Parse(rowCommand.ToLower().Trim())); }
public RunMe() { _fileManager = new FileManager(); _imageManager = new ImageManager(); _consolePrinter = new ConsolePrinter(); }
public Controller(IConsolePrinter consolePrinter, ILogger <Controller> logger, IMediator mediator) { _consolePrinter = consolePrinter; _logger = logger; _mediator = mediator; }
public FileManager() { _consolePrinter = new ConsolePrinter(); _imageManager = new ImageManager(); }
public TfsRepositoryWalker(IConsolePrinter consolePrinter, IConfigInterpreter configInterpreter, ITfsServerPathTranslator tfsServerPathTranslator) { ConsolePrinter = consolePrinter; this.configInterpreter = configInterpreter; this.tfsServerPathTranslator = tfsServerPathTranslator; }
public StatementPrinter(IConsolePrinter consolePrinter) { this.consolePrinter = consolePrinter; }
public SramComparerSoE(IConsolePrinter consolePrinter) : base(consolePrinter) { }
public FileSystemWalker(IConsolePrinter consolePrinter, IConfigInterpreter configInterpreter, IFileSystemPathTranslator fileSystemPathTranslator) { this.configInterpreter = configInterpreter; this.fileSystemPathTranslator = fileSystemPathTranslator; ConsolePrinter = consolePrinter; }
public ContinuousRunningProcessor(IConsolePrinter consolePrinter, ILogger <ContinuousRunningProcessor> logger) { this.consolePrinter = consolePrinter; this.logger = logger; }
public ImageManager() { _consolePrinter = new ConsolePrinter(); }
/// <summary> /// Prevents a default instance of the <see cref="MainMenu"/> class from being created. /// </summary> private MainMenu() { _consolePrinter = new ConsolePrinter(); _jsonReadWriter = new JsonReadWriter(); _wishlistDictionary = _jsonReadWriter.LoadWishlistsFromFile() ?? new Dictionary <int, IWishlist>(); }