public Home() { InitializeComponent(); BindingContext = viewModel = new HomeViewModel(); viewModel.EbLayout = EbLayout; EbLayout.ShowLoader(); }
public MyApplications() { InitializeComponent(); EbLayout.ShowLoader(); BindingContext = viewModel = new MyApplicationsViewModel(EbLayout.GetMessageLoader()); EbLayout.HasBackButton = false; }
public LinkedListRender(EbMobilePage page, EbMobileVisualization context, EbDataRow row) { InitializeComponent(); BindingContext = ViewModel = new LinkedListViewModel(page, context, row); ViewModel.EbLayout = EbLayout; this.DrawContextHeader(row, context); EbLayout.ShowLoader(); }
private async void SaveSolution_Clicked(object sender, EventArgs e) { string surl = SolutionName.Text?.Trim(); if (string.IsNullOrEmpty(surl)) { return; } try { if (!Utils.HasInternet) { Utils.Alert_NoInternet(); return; } string domain = App.Settings.Vendor.GetDomain(); if (surl.Split(CharConstants.DOT).Length == 1) { surl += $".{domain}"; } if (viewModel.IsSolutionExist(surl)) { await viewModel.RedirectToExistingSolution(surl, isMasterPage); return; } EbLayout.ShowLoader(); response = await viewModel.Validate(surl); if (response.IsValid) { EbLayout.HideLoader(); SolutionLogoPrompt.Source = ImageSource.FromStream(() => new MemoryStream(response.Logo)); SolutionLabel.Text = surl.Split(CharConstants.DOT)[0]; ShowSIDConfirmBox(); SoluUrl = surl; } else { EbLayout.HideLoader(); Utils.Toast("Invalid solution URL"); } } catch (Exception ex) { EbLog.Error(ex.Message); } }
public MyApplications(bool is_internal) { isInternal = is_internal; InitializeComponent(); EbLayout.ShowLoader(); BindingContext = viewModel = new MyApplicationsViewModel(EbLayout.GetMessageLoader()) { IsInternal = is_internal }; EbLayout.HasBackButton = isInternal; }
protected async override void OnAppearing() { EbLayout.ShowLoader(); if (!IsRendered) { await viewModel.InitializeAsync(); IsRendered = true; } EbLayout.HideLoader(); }
private void QrScannerCallback(string payload) { SolutionQrMeta meta = null; try { meta = JsonConvert.DeserializeObject <SolutionQrMeta>(payload); } catch (Exception ex) { EbLog.Info("failed to parse qr payload in new solution page"); EbLog.Error(ex.Message); return; } if (meta == null) { return; } Device.BeginInvokeOnMainThread(async() => { try { if (string.IsNullOrEmpty(meta.Sid) || viewModel.IsSolutionExist(meta.Sid)) { Utils.Toast($"{meta.Sid} exist"); return; } EbLayout.ShowLoader(); response = await viewModel.Validate(meta.Sid); if (response.IsValid) { await viewModel.AddSolution(meta.Sid, response); await App.Navigation.NavigateToLogin(isMasterPage); } else { Utils.Toast("invalid qr code meta"); } EbLayout.HideLoader(); } catch (Exception) { EbLayout.HideLoader(); } }); }
private void LocSearchBox_TextChanged(object sender, TextChangedEventArgs e) { string search = LocSearchBox.Text; if (search != null) { if (search.Length >= 3) { EbLayout.ShowLoader(); viewModel.FilterBySearchValue(search); EbLayout.HideLoader(); EmptyLabel.IsVisible = viewModel.Locations.Count <= 0; } } }
protected override async void OnAppearing() { base.OnAppearing(); EbLayout.ShowLoader(); viewModel.MsgLoader = EbLayout.GetMessageLoader(); if (!isRendered) { await viewModel.InitializeAsync(); if (!viewModel.HasWebFormRef && viewModel.IsOnline()) { EbLog.Info($"Webform refid not configued for form '{viewModel.Page.Name}'"); SaveButton.IsEnabled = false; } isRendered = true; } EbLayout.HideLoader(); }
private async void EmptyBoxReloadClicked(object sender, EventArgs e) { if (!Utils.HasInternet) { Utils.Alert_NoInternet(); return; } EbLayout.ShowLoader(); try { await viewModel.UpdateAsync(); } catch (Exception ex) { EbLog.Error("error at [EmptyBoxReload] event in application page, " + ex.Message); } EbLayout.HideLoader(); }
private async void StartApplicationClicked(object sender, EventArgs e) { if (!Utils.HasInternet) { Utils.Alert_NoInternet(); return; } if (Vendor.BuildType == Enums.AppBuildType.Embedded) { EbLayout.ShowLoader(); try { ISolutionService service = new SolutionService(); ValidateSidResponse response = await service.ValidateSid(Vendor.SolutionURL); if (response != null && response.IsValid) { await service.CreateEmbeddedSolution(response, Vendor.SolutionURL); await Store.SetValueAsync(AppConst.FIRST_RUN, "true"); await App.Navigation.InitializeNavigation(); } } catch (Exception) { Utils.Toast("Unable to finish the request"); } EbLayout.HideLoader(); } else { await Store.SetValueAsync(AppConst.FIRST_RUN, "true"); await App.Navigation.InitializeNavigation(); } }
public MyActions() { InitializeComponent(); BindingContext = viewModel = new MyActionsViewModel(); EbLayout.ShowLoader(); }
public DoAction(int actionid) { InitializeComponent(); BindingContext = viewModel = new DoActionViewModel(actionid); EbLayout.ShowLoader(); }