Ejemplo n.º 1
0
        public ViewModel()
        {
            Model model            = new Model();
            StopwatchController sc = new StopwatchController();

            LettersViewModel   = new LettersViewModel(model, sc);
            StopwatchViewModel = new StopwatchViewModel(sc);
            SettingsViewModel  = new SettingsViewModel();
        }
Ejemplo n.º 2
0
        public ConundrumViewModel(Model model, StopwatchController sc)
        {
            Model = model ?? throw new ArgumentNullException(nameof(model));
            StopwatchController = sc ?? throw new ArgumentNullException(nameof(sc));

            SolveCommand  = new RelayCommand(ExecuteSolve, CanSolve);
            ChooseCommand = new RelayCommand(ExecuteChoose, CanChoose);

            ListSelectAllCommand = new RelayCommand(ExecuteSelectAll, CanSelectAll);
            ListCopyCommand      = new RelayCommand(ExecuteCopy, CanCopy);
        }
Ejemplo n.º 3
0
        public NumbersViewModel(Model model, StopwatchController sc)
        {
            Model = model ?? throw new ArgumentNullException(nameof(model));
            StopwatchController = sc ?? throw new ArgumentNullException(nameof(sc));

            ChooseNumbersCommand = new RelayCommand(ExecuteChoose);

            SolveCommand         = new RelayTaskCommand(ExecuteSolveAsync, CanSolve);
            ListSelectAllCommand = new RelayCommand(ExecuteSelectAll, CanSelectAll);
            ListCopyCommand      = new RelayCommand(ExecuteCopy, CanCopy);

            // initialise tile and target values
            TileOptionIndex = Settings.Default.PickNumberOption;
        }
Ejemplo n.º 4
0
        public LettersViewModel(Model model, StopwatchController sc)
        {
            Model = model ?? throw new ArgumentNullException(nameof(model));
            StopwatchController = sc ?? throw new ArgumentNullException(nameof(sc));

            ChooseLettersCommand = new RelayCommand(ExecuteChooseLetters);
            SolveCommand         = new RelayTaskCommand(ExecuteSolveAsync, CanSolve);
            ScrollToCommand      = new RelayCommand(ExecuteScrollTo, CanScrollTo);

            ClearCommand         = new RelayCommand(ExecuteClear, CanClear);
            PickVowelCommand     = new RelayCommand(ExecutePickVowel, CanPickVowel);
            PickConsonantCommand = new RelayCommand(ExecutePickConsonant, CanPickConsonant);

            ListSelectAllCommand = new RelayCommand(ExecuteSelectAll, CanSelectAll);
            ListCopyCommand      = new RelayCommand(ExecuteCopy, CanCopy);

            // initialise letter menu selected item
            LetterOptionIndex = Settings.Default.PickLetterOption;
        }
Ejemplo n.º 5
0
 public StopwatchViewModel(StopwatchController sc)
 {
     StopwatchController = sc ?? throw new ArgumentNullException(nameof(sc));
 }