Exemplo n.º 1
0
        public ViewModel()
        {
            this.MainDataModel            = new MainModel();
            this.MainDataModel.DiceModel1 = new DiceModel(this.MainDataModel, "DiceModel1", MainModel.WHITEMODELPATH);
            this.MainDataModel.DiceModel2 = new DiceModel(this.MainDataModel, "DiceModel2", MainModel.WHITEMODELPATH);
            this.MainDataModel.DiceModel3 = new DiceModel(this.MainDataModel, "DiceModel3", MainModel.WHITEMODELPATH);
            this.MainDataModel.DiceModel4 = new DiceModel(this.MainDataModel, "DiceModel4", MainModel.WHITEMODELPATH);
            this.MainDataModel.DiceModel5 = new DiceModel(this.MainDataModel, "DiceModel5", MainModel.WHITEMODELPATH);
            this.MainDataModel.DiceModel6 = new DiceModel(this.MainDataModel, "DiceModel6", MainModel.WHITEMODELPATH);

            this.RollDiceCmd = new RelayCmd(new Func <object, bool>(x => true), new Action <object>(x => rollDice(x)));

            this.ResetCmd = new RelayCmd(new Func <object, bool>(x => true), new Action <object>(x =>
            {
                if (isAnyDieRotating() == false)
                {
                    resetAllDice();
                    resetTotalSteps();
                    stopRotatingDice();
                }
            }));
        }
Exemplo n.º 2
0
 public ConnectionDialogViewModel(string windowTitle, string message) : base(windowTitle, message)
 {
     CreateCommand = new RelayCmd <IDialogWindow>(Create, OnException);
     CancelCommand = new RelayCmd <IDialogWindow>(Cancel, OnException);
 }
Exemplo n.º 3
0
 public YesNoViewModel(string windowTitle, string message) : base(windowTitle, message)
 {
     YesCommand = new RelayCmd <IDialogWindow>(Yes, OnException);
     NoCommand  = new RelayCmd <IDialogWindow>(No, OnException);
 }