// Main View Model Function public RequestsViewModel(IAPerson dbs, IToast toast) { this.dbs = dbs; ReloadCommand.Execute(null); SelectPer = new MvxCommand <Perso>(selectedPer => { MyGlobals.perr = null; MyGlobals.perr = selectedPer; ShowViewModel <AnswerViewModel>(); }); }
public WelcomeViewModel(IToast toast, IAPerson per) { adb = per; Gur = new Perso { pFirstname = "Gurpreet", pLastname = "Dhaliwal", PEmail = "*****@*****.**", photo = "@drawable/gur", PCalCheck = true, PLocation = "Available", PLocCheck = true }; Hari = new Perso { pFirstname = "Harri", pLastname = "Tuononen", PEmail = "*****@*****.**", photo = "@drawable/harri", PCalCheck = true, PLocation = "Having Food", PLocCheck = true }; //Perso Ian = new Perso //{ // pFirstname = "Ian", // pLastname = "Maskell", // PEmail = "*****@*****.**", // photo = "@drawable/iam", // PCalCheck = true, // PLocation = "Meeting in QUT", // PLocCheck = true //}; //getCount(Gur); //getCount(Hari); //getCount(Ian); GurButton = new MvxCommand(() => { MyGlobals.SelPer = Gur; toast.Show("Logged in as " + MyGlobals.SelPer.pFirstname + ""); ShowViewModel <SettingsViewModel>(); }); HarriButton = new MvxCommand(() => { MyGlobals.SelPer = Hari; toast.Show("Logged in as " + MyGlobals.SelPer.pFirstname + ""); ShowViewModel <SettingsViewModel>(); }); }