protected ATemplateVm(TemplateDto template, ITerminalTasks terminalTasks) { terminalTasks.notNull(); template.notNull(); Chance = new ChanceVm(template,terminalTasks); Keyboard = new TemplateKeyboardVm(terminalTasks); }
public TerminalVm(IStateService stateService, ITerminalEvents terminalEvents, ITerminalTasks terminalTasks) { this.terminalTasks = terminalTasks.notNull(); this.stateService = stateService.notNull(); this.terminalEvents = terminalEvents.notNull(); currentState = stateService.CurrentState; terminalEvents.EndOfService += (s, e) => terminalEvents_EndOfTask_handling(); terminalEvents.OnTouchNumber += (s, e) => terminalEvents_OnTouchNumber_handling(); }
public GameKeyboardVm(ITerminalTasks terminalTasks) { terminalTasks.notNull(); Commands = new[] { new CommandVm("Regular Template",new Command(action => terminalTasks.newRegularPlayslip())), new CommandVm("Combo Template", new Command(action => terminalTasks.newComboPlayslip())), new CommandVm("Restart", new Command(action => terminalTasks.restart())), new CommandVm("Play", new Command(action => terminalTasks.play())) }; }
protected ABoardVm(BoardDto board, ITerminalEvents terminalEvents, ITerminalTasks terminalTasks) { board.notNull(); terminalEvents.OnTouchNumber += (s, e) => terminalEvents_OnTouchNumber_handling(e.Value); this.terminalTasks = terminalTasks.notNull(); Position = board.Position; Numbers = new GuessKeyboardVm(board, terminalTasks); Keyboard = new BoardKeyboardVm(Position, terminalTasks); }
public FiledPlayslipsVm(IEnumerable<FiledPlayslipDto> filedPlayslips, ITerminalTasks terminalTasks) { terminalTasks.notNull(); filedPlayslips.notNull(); Commands = new List<FiledPlayslipVm>( filedPlayslips.Select(filedPlayslip => new FiledPlayslipVm( filedPlayslip, new Command(action => terminalTasks.reviewPlayslip(filedPlayslip.RefId)) ) ) ); }
// todo: passing a hard-wired cmd's is not nice public TemplateKeyboardVm(ITerminalTasks terminalTasks) { terminalTasks.notNull(); Commands = new[] { new CommandVm("Quick", new Command(action => terminalTasks.quickTemplate())), new CommandVm("Store", new Command(action => terminalTasks.fileTemplate())), new CommandVm("Drop", new Command(action => terminalTasks.dropTemplate())), new CommandVm("Clear", new Command(action => terminalTasks.clearTemplate())) }; }
public GuessKeyboardVm(BoardDto board, ITerminalTasks terminalTasks) { terminalTasks.notNull(); board.notNull(); var cmds = new List<CommandWithStateVm>(49); for(byte i = 1; i <= 49; i++){ byte nr = i; // BEWARE OF ACCESS TO MODIFIED CLOSURE ! cmds.Add( new CommandWithStateVm(board.Numbers.Contains(nr), nr.ToString(), new Command(action => terminalTasks.touchNumber(board.Position, nr)))); } this.Commands = cmds; IsInvalid = board.IsInvalid; IsWin = board.IsWin; }
public ChanceVm(TemplateDto template, ITerminalTasks terminalTasks) { terminalTasks.notNull(); Nr = template.Nr; HasSpiel77 = template.HasSpiel77; HasSuper6 = template.HasSuper6; // TODO: yes/no is clearly a datatrigger's concern... Commands = new[] { new CommandVm("Losnummer: " + Nr, new Command(action => terminalTasks.changeLosnummer())), new CommandVm("Spiel 77: " + (HasSpiel77 ? "YES" : "NO"), new Command(action => terminalTasks.touchSpiel77())), new CommandVm("Super 6: "+ (HasSuper6 ? "YES" : "NO"), new Command(action => terminalTasks.touchSuper6())), }; }
public TemplateRVm(TemplateDto template, ITerminalEvents terminalEvents, ITerminalTasks terminalTasks) : base(template, terminalTasks) { boards = template.Boards.Select(board => new BoardRVm(board, terminalEvents, terminalTasks)); }
public EventWrappedTerminalTasks(ITerminalTasks eventWrapped) { this.terminalTasks = eventWrapped.notNull(); }
public ComboSelector(BoardDto board, ITerminalTasks terminalTasks) { ts = terminalTasks.notNull(); b = board.notNull(); }
public TemplateController(ITerminalTasks terminalTasks) { this.terminalTasks = terminalTasks.notNull(); }
public BoardCVm(BoardDto board, ITerminalEvents terminalEvents, ITerminalTasks terminalTasks) : base(board, terminalEvents, terminalTasks) { Description = board.Combo + " of 49"; Combo = new ComboSelector(board, terminalTasks); }
public SelectionController(ITerminalTasks terminalTasks) { this.terminalTasks = terminalTasks.notNull(); }
public BoardRVm(BoardDto board, ITerminalEvents terminalEvents, ITerminalTasks terminalTasks) : base(board, terminalEvents, terminalTasks) { }
public BoardKeyboardVm(string position, ITerminalTasks terminalTasks) { terminalTasks.notNull(); Commands = new[] { new CommandVm("Quick", new Command(action => terminalTasks.quickBoard(position))), new CommandVm("Clear", new Command(action => terminalTasks.clearBoard(position))), }; }
public ScopedTerminalTasks(ITerminalTasks scoped, IContextManager contextManager) { terminalTasks = scoped.notNull(); this.contextManager = contextManager.notNull(); }