async void Init() { IsLoaded = await contextLoader.LoadAsync <Service>(); IsLoadingAnimation = false; if (IsLoaded) { pageService.ChangePage <Pages.HomePage>(Rules.Pages.MainPool, defaultAnim); } else { IsErrorLoading = true; ErrorMessage = contextLoader.Message; ErrorMessageDetail = contextLoader.MessageDetail; } }
async void init() { eventBus.Subscribe <Events.UpdatePipe, MainViewModel>(Update, false); serverPipeHandler.Init(); try { await loader.LoadAsync <Client>(); LoadingContext = false; } catch (Exception ex) { MessageBoxResult res = MessageBox.Show(ex.Message, "", MessageBoxButton.OK); if (res == MessageBoxResult.OK || res == MessageBoxResult.Cancel) { Application.Current.Shutdown(); } } }
async void Init() { IsSplashVisible = true; IsLoadingAnimation = true; var value = await updaterService.GetValue(5); if (!updaterService.IsConnected || value) { ClearScreen(); SplashScreenService_OverlapScreen(updaterService.ErrorMessage); return; } pipeHanlder.Init("CruisesPipe"); pipeHanlder.UpdateCalled += PipeHanlder_UpdateCalled; ImagesCopy(); await ContractCopy(); IsLoaded = await contextLoader.LoadAsync <Layner>(); await sourceService.ReloadAsync(); IsLoaded = true; IsLoadingAnimation = false; if (IsLoaded) { ClearScreen(); pageService.ChangePage <Pages.HomePage>(Rules.Pages.MainPool, defaultAnim); } else { IsMessageVisible = true; Message = contextLoader.Message; MessageDetail = contextLoader.MessageDetail; } }
async void Init() { pipeHanlder.Init(); pipeHanlder.UpdateCalled += PipeHanlder_UpdateCalled; userService.Autorized += UserService_Autorized; userService.Exited += UserService_Exited; try { await contextLoader.LoadAsync(); IsLoaded = true; pageService.ChangePage <Pages.SearchAutoPage>(Rules.Pages.MainPool, new DisappearAnimation() { TimeOpacityNewSec = 0.6f }); } catch (Exception e) { LoadingText = e.Message; } }
async void Init() { ////IsLoaded = true; //pipeHanlder.Init("DomofonApp"); //pipeHanlder.UpdateCalled += PipeHanlder_UpdateCalled; CheckFile(); IsLoaded = await contextLoader.LoadAsync <Product>(); IsLoadingAnimation = false; if (IsLoaded) { //pageService.ChangeNewPage<Pages.CatalogPage>(defaultAnim); pageService.ChangeNewPage <Pages.AdminPage>(defaultAnim); } else { IsErrorLoading = true; ErrorMessage = contextLoader.Message; ErrorMessageDetail = contextLoader.MessageDetail; } }