public override async Task Init() { //await UnhandledExceptionProccesing.SendErrorServer(); if (OrderRowId == default(Guid)) { OrderRowId = new Guid("4CB06476-B10C-406A-98A2-7A6693A4E590"); } HeaderTitle = Globalization.T("(!)OrderDetails"); AllPatientTabs.ForEach(q => PatientHeaderModels.Add(q, new PatientHeaderModel())); PatientAddCommand = CommandFunc.CreateAsync(PatientAdd); PatientDeleteCommand = CommandFunc.CreateAsync(PatientDelete, () => SelectedPatientOrderItem != null); CommitCommand = CommandFunc.CreateAsync(Commit, () => !HasPatientOrderItemError()); CancelCommand = CommandFunc.CreateAsync(Cancel); NavigationBarButton1Command = CommandFunc.CreateAsync(ProfileViewModel.OpenPage); PatientItemTapCommand = new Command <ItemTapCommandContext>(async(q) => await PatientItemTap(q)); ScheduleItemSlotTapCommand = new Command <ItemTapCommandContext>(ScheduleItemSlotTap); //this.PropertyChanged += PropertyChangedAction; U.RequestMainThread(async() => { if (!await LoadData()) { return; } CalendarManager.Control.SelectionChanged += (s, e) => CalcCurrentScheduleItemSlots(); //SelectedPatientOrderItem = PatientOrderItems.FirstOrDefault(); CalcAll(); }); }
public object ProvideValue(IServiceProvider serviceProvider) { var value = Globalization.T(ResourceId.ToString()); if (ToUpper) { value = value.ToUpper(); } if (SpaceToNewLine) { value = value.Replace(" ", "\n"); } return(value); }
void CalcPatients() { PatientTabText = Globalization.T("Patients") + " (" + PatientOrderItems.Count + ")"; foreach (var poitem in PatientOrderItems) { var selected = (poitem == SelectedPatientOrderItem); var patient = poitem.Patient; var haserror = poitem.IsHasError; //patient.BackgroundColor = selected ? U.GetAppColor("BlueBackColor") : U.GetAppColor("GreenBackColor"); //patient.TextColor = selected ? U.GetAppColor("WhiteTextColor") : U.GetAppColor("BlackLightTextColor"); //patient.BorderColor = haserror ? U.GetAppColor("RedErrorBorderColor") : Color.Transparent; patient.BackgroundColor = Color.Transparent; patient.TextColor = selected ? U.GetAppColor("BlackLightTextColor") : U.GetAppColor("BlackLightTextColor"); patient.BorderColor = haserror ? U.GetAppColor("RedErrorBorderColor") : Color.Transparent; } }
public override async Task Init() { HeaderTitle = Globalization.T("ChangePassword"); IsBackVisible = U.IsBackVisible; AllPatientTabs.ForEach(q => PatientHeaderModels.Add(q, new PatientHeaderModel())); CommitCommand = CommandFunc.CreateAsync(Commit, () => !HasModelErrors()); CancelCommand = CommandFunc.CreateAsync(Cancel); LocaleChooseCommand = CommandFunc.CreateAsync(async() => await Globalization.SwitchLocale()); U.RequestMainThread(async() => { if (!await LoadData()) { return; } CalcAll(); }); }
public override async Task Init() { //UserProfileRowId = new Guid("881C381C-2EEF-420B-9398-39B5190E9CEC"); UserProfileRowId = UserOptions.GetUserProfileRowId(); HeaderTitle = Globalization.T("Orders"); IsBackVisible = U.IsBackVisible; ItemTapCommand = new Command <ItemTapCommandContext>(ItemTap); NavigationBarButton1Command = CommandFunc.CreateAsync(ProfileViewModel.OpenPage); U.RequestMainThread(async() => { if (!await LoadData()) { return; } CalcAll(); }); }
public async Task Commit() { UIFunc.ShowLoading(U.StandartLoggingText); var result = await WebServiceFunc.SubmitLogin(Model); UIFunc.HideLoading(); if (!result.Item1) { var errtext = (string.IsNullOrEmpty(result.Item3) ? Globalization.T("(!)LoginError") : result.Item3); await UIFunc.AlertError(errtext); return; } var userProfileRowId = result.Item2.Value; var aspxauth = result.Item4; UserOptions.SetUsernamePassword(Model.email, Model.password, userProfileRowId); UserOptions.SetAspxauth(aspxauth); await NavFunc.RestartApp(); }
public override async Task Init() { //UserProfileRowId = new Guid("2fd3c1cb-be1a-4444-8131-c44447d3b6bc"); HeaderTitle = Globalization.T("Profile"); IsBackVisible = U.IsBackVisible; AllPatientTabs.ForEach(q => PatientHeaderModels.Add(q, new PatientHeaderModel())); CommitCommand = CommandFunc.CreateAsync(Commit, () => !HasModelErrors()); CancelCommand = CommandFunc.CreateAsync(Cancel); LogoutCommand = CommandFunc.CreateAsync(Logout); ChangePasswordCommand = CommandFunc.CreateAsync(ChangePassword); LocaleChooseCommand = CommandFunc.CreateAsync(async() => await Globalization.SwitchLocale()); U.RequestMainThread(async() => { if (!await LoadData()) { return; } CalcAll(); }); }
public object Convert(object value, Type type, object parameter, CultureInfo culture) { return(Globalization.T(value.ToString())); }
public HomeViewModel() { HeaderTitle = Globalization.T("Menu"); IsBackVisible = false; //this.PropertyChanged += DoPropertyChanged; }