public override async Task Load(INavigationParameters parameters) { var stopWatch = new Stopwatch(); stopWatch.Start(); try { BusyLoader.SetIsLoading(true); await this.NavigateTAsync(appOptions.SplashPageType.Name); await InitializeAsync(); BusyLoader.SetIsLoading(false); } catch (Exception ex) { HandleException(ex); } finally { stopWatch.Stop(); } }
public override async Task InitializeAsync() { //here u put your app initialization logic BusyLoader.SetIsLoading(true, "Your message of loader"); //someload await Task.Delay(3000); await this.NavigateTAsync(nameof(HomePage)); BusyLoader.SetIsLoading(false); }
public virtual async void OnNavigatedTo(INavigationParameters parameters) { if (parameters.GetNavigationMode() == NavigationMode.New) { try { BusyLoader.SetIsLoading(true); await Load(parameters); } catch (Exception ex) { HandleException(ex); } finally { BusyLoader.SetIsLoading(false); } } }
public override async Task Load(INavigationParameters parameters) { try { BusyLoader.SetIsLoading(true); var env = GetCurrentEnv(); switch (env) { case "dev": CurrentEnv = "Desenvolvimento"; break; case "test": CurrentEnv = "Teste"; break; case "stag": CurrentEnv = "Homologação"; break; case "prod": CurrentEnv = "Produção"; break; } } catch (Exception ex) { HandleException(ex); } finally { BusyLoader.SetIsLoading(false); } }