public DrawDialogViewModel(int countDown, Action <int> afterHideCallback) : base() { this.countDown = countDown; this.Click = afterHideCallback; ApplicationContext context = Context.GetApplicationContext(); rewardRepository = context.GetService <IRewardRepository>(); this.dismissRequest = new InteractionRequest(this); confirmCommand = new SimpleCommand(() => { this.OnClick(DrawDialog.BUTTON_POSITIVE); }); cancelCommand = new SimpleCommand(() => { this.OnClick(DrawDialog.BUTTON_NEGATIVE); }); this.DrawCount = rewardRepository.GetDrawCount(); this.Money = rewardRepository.GetMoney(); }