public SplashScreen() { InitializeComponent(); _splashViewModel = new SplashViewModel(CallOnRetry); DataContext = _splashViewModel; ServerStatusAsync(); }
private async void Application_Startup(object sender, StartupEventArgs e) { DispatcherUnhandledException += AppDispatcherUnhandledException; Tools.Logging.Send(LogLevel.Trace, $"Version: {Assembly.GetExecutingAssembly().GetName().Version}"); Tools.Logging.Send(LogLevel.Trace, $"OS: {Environment.OSVersion}"); HockeyClient.Current.Configure("847a769d61234e969e7d4b321877e67c").SetExceptionDescriptionLoader(ex => "Exception HResult: " + ex.HResult); await HockeyClient.Current.SendCrashesAsync(); Settings.Load(); //Подгружаем настройки Settings.Program.Data.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); Settings.Program.Save(); mainVM = new MainViewModel(); if (!Settings.Program.Configure.UseGpu || ForceSoftwareRendering) { RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; } var splashVM = new SplashViewModel(mainVM); splashVM.Exited += OnSplashExited; splashScreen = new View.SplashScreen() { DataContext = splashVM }; splashScreen.Show(); splashVM.Run(); }
public SplashPage() { InitializeComponent(); BindingContext = new SplashViewModel(); _AuthenticationService = DependencyService.Get <IAuthenticationService>(); SignInButton.GestureRecognizers.Add( new TapGestureRecognizer() { NumberOfTapsRequired = 1, Command = new Command(SignInButtonTapped) }); SkipSignInButton.GestureRecognizers.Add( new TapGestureRecognizer() { NumberOfTapsRequired = 1, Command = new Command(SkipSignInButtonTapped) }); InfoButton.GestureRecognizers.Add( new TapGestureRecognizer() { NumberOfTapsRequired = 1, Command = new Command(InfoButtonTapped) }); }
public SplashPage() { InitializeComponent(); // BindingContext is set to the SplashViewModel where the properties for our Page is located. BindingContext = new SplashViewModel(); // Use dependency service to request a service. _authenticationService = DependencyService.Get <IAuthenticationService>(); XamarinLogo.Source = "epsl.png"; // Assign Gestures and Commands to Buttons. This is just another way to Do OnClickedListener Operations by using Command SignInButton.GestureRecognizers.Add( new TapGestureRecognizer() { NumberOfTapsRequired = 1, Command = new Command(SignInButtonTapped) }); // Assign Gestures and Commands to Buttons. This is just another way to Do OnClickedListener Operations by using Command SkipSignInButton.GestureRecognizers.Add( new TapGestureRecognizer() { NumberOfTapsRequired = 1, Command = new Command(SkipSignInButtonTapped) }); }
/// <summary> /// CreateShell creates the Shell Window for /// all of the other modules to show themselves. /// </summary> /// <returns>The Shell Window</returns> protected override DependencyObject CreateShell() { //Get the EventAggregator and subscribe to the ExitEvent IEventAggregator iea = this.Container.Resolve <IEventAggregator>(); iea.GetEvent <ShellEvent>().Subscribe(this.OnExitEvent); //Get the objects required for the Splash Screen SplashViewModel splashVM = this.Container.Resolve <SplashViewModel>(); SplashView splashV = this.Container.Resolve <SplashView>(); //Setup the SplashView and show it splashV.DataContext = splashVM; splashV.Show(); //Get the objects required for the ShellView ShellViewModel svm = this.Container.Resolve <ShellViewModel>(); ShellView sv = this.Container.Resolve <ShellView>(); //Register the ShellView instance so that the Bootstrapper //can get it later on this.Container.RegisterInstance <ShellView>(Strings.ShellViewName, sv); //Wire up the View and Show it through the Dispatcher sv.DataContext = svm; sv.Dispatcher.BeginInvoke((Action) delegate { sv.Show(); splashV.Close(); svm.CheckHardwareConfiguration(); }); //Return the result return(sv); }
private async void LoadMainAsync() { await Task.Delay(2000); SplashViewModel splashViewModel = new SplashViewModel(); await splashViewModel.Splash(); }
public SplashView(SplashViewModel splashViewModel, IEventAggregator events) { InitializeComponent(); Events = events; WindowStartupLocation = WindowStartupLocation.CenterScreen; Topmost = false; // do NOT block the user from doing email while we boot-up //Defaults for splash screen DebugUiSetup(); WindowStartupLocation = WindowStartupLocation.Manual; ResizeMode = ResizeMode.NoResize; WindowStyle = WindowStyle.None; Loaded += OnLoaded; if (splashViewModel != null) { SplashViewModel = splashViewModel; splashViewModel.PropertyChanged += delegate { this.Refresh(); }; } }
public void TrayBringToForeground() { if (IsMainWindowOpen) { Execute.PostToUIThread(FocusMainWindow); return; } // Initialize the shared UI when first showing the window if (!UI.Shared.Bootstrapper.Initialized) { UI.Shared.Bootstrapper.Initialize(_kernel); } Execute.OnUIThreadSync(() => { _splashViewModel?.RequestClose(); _splashViewModel = null; _rootViewModel = _kernel.Get <RootViewModel>(); _rootViewModel.Closed += RootViewModelOnClosed; _windowManager.ShowWindow(_rootViewModel); }); OnMainWindowOpened(); }
public SplashPage() { InitializeComponent(); _viewModel = new SplashViewModel(); BindingContext = _viewModel; }
private void ShowMainWindow(IWindowManager windowManager, SplashViewModel splashViewModel) { Execute.OnUIThread(() => { windowManager.ShowWindow(RootViewModel); splashViewModel.RequestClose(); }); }
public SplashPage() { InitializeComponent(); BindingContext = new SplashViewModel(); viewModel = new SearchListViewModel(""); this.txtProcessMessage.Text = "Wait..."; this.txtProcessMessage.IsVisible = true; }
private void ShowSplashScreen() { Execute.OnUIThread(() => { _splashViewModel = _kernel.Get <SplashViewModel>(); _windowManager.ShowWindow(_splashViewModel); }); }
public void TestInitialize() { _serverMock = new Mock <IServer>(); _externalProcessExecutorMock = new Mock <IExternalProcessExecutor>(); _changedProperties = new List <string>(); _target = new SplashViewModel(_serverMock.Object, _externalProcessExecutorMock.Object); _target.PropertyChanged += (sender, args) => { _changedProperties.Add(args.PropertyName); }; }
public SplashWindow() { InitializeComponent(); DataContext = new SplashViewModel(this); //var sb = FindResource("Storyboardflush") as Storyboard; //if (sb != null) // sb.Begin(); }
public void NavigateToMainList(SplashViewModel from) { var splashActivity = NavigationViewProvider.GetActivity <SplashScreenActivity, SplashViewModel>(from); var intent = new Intent(splashActivity, typeof(MainListActivity)); intent.AddFlags(ActivityFlags.ClearTask | ActivityFlags.ClearTop | ActivityFlags.NewTask); splashActivity.StartActivity(intent); }
public Splash() { InitializeComponent(); viewModel = new SplashViewModel(); actualizador = new Actualizador(); DataContext = viewModel; //IniciarConfig(); BorrarBackups(); }
public SplashPage() { InitializeComponent(); BindingContext = new SplashViewModel(); SignInButton.Command = ViewModel.SignInCommand; NewAccountButton.Command = ViewModel.NewAccountCommand; }
public SplashPage() : base() { InitializeComponent(); this.Loaded += AfterLoading; // Setup ViewModel _splashViewModel = new SplashViewModel(); this.DataContext = _splashViewModel; }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); this.DataContext = _viewModel = new SplashViewModel(); await Task.Delay(5000); this.Frame.Navigate(typeof(MainPage)); }
public SplashPage() : base() { InitializeComponent(); // Setup ViewModel _splashViewModel = new SplashViewModel(); this.DataContext = _splashViewModel; _setupApplicationTask = Task.Run(() => Setup.SetupApplicationAsync(UpdateText, _xamlSplashMinimumTime.Get())); ActionWrappers.ExecuteWithApplicationDispatcherAsync(Load); }
public SplashWindow() { InitializeComponent(); log.Trace("Initializing SplashWindow"); vm = new SplashViewModel(); DataContext = vm; SetLogo(); }
private void FetchTocken() { _retryButton.Visibility = Android.Views.ViewStates.Invisible; SplashViewModel viewModel = new SplashViewModel(); NavigationCommand navcommand = new NavigationCommand { callbackListener = Callback, IsDomainCall = false, IsConnected = Utils.Isconnected() }; viewModel.Execute(navcommand); }
void ShowSplash() { // Create the window var repository = ServerRepository.Instance; var server = repository.Source; server.ConnectAsync().Wait(3000); CustomContainer.Register(server); CustomContainer.Register(repository); var textToDisplay = Warewolf.Studio.Resources.Languages.Core.StandardStyling.Replace("\r\n", "") + Warewolf.Studio.Resources.Languages.HelpText.WarewolfDefaultHelpDescription + Warewolf.Studio.Resources.Languages.Core.StandardBodyParagraphClosing; CustomContainer.Register <IEventAggregator>(new EventAggregator()); CustomContainer.Register <IPopupController>(new PopupController()); CustomContainer.Register <IAsyncWorker>(new AsyncWorker()); CustomContainer.Register <IExplorerTooltips>(new ExplorerTooltips()); CustomContainer.Register <IWarewolfWebClient>(new WarewolfWebClient(new WebClient { Credentials = CredentialCache.DefaultCredentials })); CustomContainer.Register <IActivityParser>(new ActivityParser()); CustomContainer.Register <IServiceDifferenceParser>(new ServiceDifferenceParser()); var toolBoxViewModel = new ToolboxViewModel(new ToolboxModel(server, server, null), new ToolboxModel(server, server, null)); CustomContainer.Register <IToolboxViewModel>(toolBoxViewModel); var helpViewModel = new HelpWindowViewModel(new HelpDescriptorViewModel(new HelpDescriptor("", textToDisplay, null)), new HelpModel(new EventAggregator())); CustomContainer.Register <IHelpWindowViewModel>(helpViewModel); CustomContainer.RegisterInstancePerRequestType <IRequestServiceNameView>(() => new RequestServiceNameView()); CustomContainer.RegisterInstancePerRequestType <IJsonObjectsView>(() => new JsonObjectsView()); CustomContainer.RegisterInstancePerRequestType <IChooseDLLView>(() => new ChooseDLLView()); CustomContainer.RegisterInstancePerRequestType <IFileChooserView>(() => new FileChooserView()); var splashViewModel = new SplashViewModel(server, new ExternalProcessExecutor()); var splashPage = new SplashPage { DataContext = splashViewModel }; SplashView = splashPage; // Show it SplashView.Show(false); _resetSplashCreated?.Set(); splashViewModel.ShowServerStudioVersion(); Dispatcher.Run(); }
public SplashView(SplashViewModel viewModel) { InitializeComponent(); #if LOGO if (viewModel.HasCustomerSplash) { antuImage.Source = new BitmapImage(new Uri(viewModel.SplashFilePath, UriKind.Absolute)); } #endif #if Main antuImage.Visibility = Visibility.Visible; #else #endif DataContext = viewModel; }
private async void App_Startup(object sender, StartupEventArgs e) { var splashVM = new SplashViewModel(); var splash = new SplashWindow { DataContext = splashVM, }; splash.Show(); await Task.Yield(); await splashVM.InitializeAsync(null); splashVM.Info = "service1 initializing..."; // await service1.InitializeAsync(); await Task.Delay(150); splashVM.Info = "service2 initializing..."; await Task.Delay(250); splashVM.Info = "service3 initializing..."; await Task.Delay(350); splashVM.Info = "service4 initializing..."; await Task.Delay(450); splashVM.Info = "service5 initializing..."; await Task.Delay(550); splashVM.Info = "finished."; var mainVM = new MainViewModel(); MainWindow = new MainWindow { DataContext = mainVM, }; MainWindow.Show(); await mainVM.InitializeAsync(null); await Task.Delay(1000); splash.Close(); }
public MainWindowViewModel() { Globals.Model = new Model(Settings.Default.User); _home = new HomeViewModel(Navigate, null); _home.Backstage = _backstage = new BackstageViewModel(Navigate, _home); if (!Globals.Model.Assets.Exists("BasinShapefile")) { SelectedViewModel = new SplashViewModel(Navigate, _backstage, _home); } else { SelectedViewModel = _home; } RaisePropertyChanged(nameof(Title)); _home.PropertyChanged += (sender, args) => RaisePropertyChanged(nameof(Title)); _backstage.PropertyChanged += (sender, args) => RaisePropertyChanged(nameof(Title)); }
public SplashPage() { BindingContext = new SplashViewModel(); NavigationPage.SetHasNavigationBar(this, false); //BackgroundColor = Color.FromHex("#2196F3"); BackgroundColor = Color.White; Content = new Grid() { VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, Children = { new Image() { Source = "splash", Aspect = Aspect.AspectFit }, new StackLayout { HorizontalOptions = LayoutOptions.EndAndExpand, VerticalOptions = LayoutOptions.EndAndExpand, Spacing = 0, Children = { new ActivityIndicator() { IsEnabled = true, IsRunning = true, Color = Color.White }, new Label() { Text = "Carregando..", TextColor = Color.White } } } } }; }
protected override void Launch() { var windowManager = (IWindowManager)GetInstance(typeof(IWindowManager)); var splashViewModel = new SplashViewModel(Kernel); windowManager.ShowWindow(splashViewModel); Task.Run(() => { try { // Start the Artemis core _core = Kernel.Get <ICoreService>(); // When the core is done, hide the splash and show the main window _core.Initialized += (sender, args) => ShowMainWindow(windowManager, splashViewModel); // While the core is instantiated, start listening for events on the splash splashViewModel.ListenToEvents(); } catch (Exception e) { var logger = Kernel.Get <ILogger>(); logger.Fatal(e, "Fatal exception during initialization, shutting down."); // TODO: A proper exception viewer Execute.OnUIThread(() => { windowManager.ShowMessageBox(e.Message + "\n\n Please refer the log file for more details.", "Fatal exception during initialization", MessageBoxButton.OK, MessageBoxImage.Error ); Environment.Exit(1); }); throw; } }); }
public void SetViewModel(SplashViewModel viewModel) { this.viewModel = viewModel; }
public SplashView(SplashViewModel model) { InitializeComponent(); DataContext = model; }
public SplashView(SplashViewModel viewModel) { InitializeComponent(); DataContext = viewModel; }