public FailureFeedbackScreenViewModel(DataStorage data, IdleTimeoutTimer timer, Settings settings, MainPageMasterViewModel mainViewModel) : base(timer, settings) { this.MainViewModel = mainViewModel; this.DataStore = data; this.FailureFeedbackSelectCommand = new Command(async p => { if (p is string) { var failureReason = p as string; if (failureReason == OtherLabel) { // TODO Change this once adding multiple text entry screens await this.NavService.NavigateTo(EnabledScreens.GetNextScreen(this)).ConfigureAwait(false); } else { await this.GetFailureReasonAsync(failureReason).ConfigureAwait(false); } } }); var ButtonList = this.Settings.ListFailureReasons.Trim().Split(';'); this.AvailableButtons = new List <ButtonItem>(); foreach (string element in ButtonList) { this.AvailableButtons.Add(new ButtonItem(element, this.FailureFeedbackSelectCommand, Color.FromHex(Settings.ColorStandardButton))); } if (Settings.BoolCustomInputScreenEnabled) { //this.AvailableButtons.Add(new ButtonItem(OtherLabel, this.FailureFeedbackSelectCommand, Color.FromHex(Settings.ColorStandardButton))); } }
public FailureFeedbackScreenViewModel(DataStorage data, IdleTimeoutTimer timer, Settings settings) : base(timer, settings) { this.DataStore = data; this.FailureFeedbackSelectCommand = new Command(p => { var temp = p as string; if (temp != null) { if (temp == OtherLabel) { // TODO Change this once adding multiple text entry screens this.NavService.NavigateTo(EnabledScreens.GetNextScreen(this)); } else { this.GetFailureReason(temp); } } }); var ButtonList = this.Settings.ListFailureReasons.Trim().Split(';'); this.AvailableButtons = new List <IButtonListItem <Button> >(); foreach (string element in ButtonList) { this.AvailableButtons.Add(new ButtonListItem <Button>(element, this.FailureFeedbackSelectCommand, Color.FromHex(Settings.ColorStandardButton))); } if (Settings.BoolCustomInputScreenEnabled) { this.AvailableButtons.Add(new ButtonListItem <Button>(OtherLabel, this.FailureFeedbackSelectCommand, Color.FromHex(Settings.ColorStandardButton))); } }
public HomeScreenViewModel(IdleTimeoutTimer timer, Settings Settings) : base(timer, Settings) { this.Scanner = DependencyService.Get <IBarcodeScanner>(); // TODO add option to press trigger to proceed this.NavigateToScanRequestedScreenCommand = new Command(p => this.AssessConnection()); this.BypassCommand = new Command(p => this.CompletePage()); // HACK not sure how to get this to fire otherwise this.Initialize(); }
protected BaseViewModel(IdleTimeoutTimer timer, Settings Settings) { this.TimeoutTimer = timer; this.Settings = Settings; }