Esempio n. 1
0
        protected ATemplateVm(TemplateDto template, ITerminalTasks terminalTasks)
        {
            terminalTasks.notNull();
            template.notNull();

            Chance = new ChanceVm(template,terminalTasks);
            Keyboard = new TemplateKeyboardVm(terminalTasks);
        }
Esempio n. 2
0
        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())),
            };
        }
Esempio n. 3
0
        public TerminalDto(Game game, Draw draw, GuessFrequency guessFrequency, WinFrequency winFrequency)
        {
            game.notNull();
            guessFrequency.notNull();
            winFrequency.notNull();

            game.Playslips.Each(playslip => filedPlayslips.Add(new FiledPlayslipDto(playslip, draw)));

            if(null != game.Template){
                Template = new TemplateDto(game.Template, draw);
                TemplateStyle = game.Template is PlayslipC ? Style.Combo : Style.Regular;
            }

            if(null != draw) {
                Draw = new DrawDto(draw);
                Evaluation = new EvaluationDto(game, draw);
            }

            GuessFrequency = new FrequencyDto(guessFrequency.Values, "Guessed Numbers");
            WinFrequency = new FrequencyDto(winFrequency.Values, "Winning Numbers");
        }
Esempio n. 4
0
 public TemplateRVm(TemplateDto template, ITerminalEvents terminalEvents, ITerminalTasks terminalTasks)
     : base(template, terminalTasks)
 {
     boards = template.Boards.Select(board => new BoardRVm(board, terminalEvents, terminalTasks));
 }