Example #1
0
 /// <summary>
 /// Loads the Splash view. Requires the UI thread
 /// </summary>
 public void LoadSplashView()
 {
     Log.Debug($"{nameof(LoadSplashView)} State={_state}");
     ThreadHelper.JoinableTaskFactory.Run(async delegate {
         await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
         LoadHtml(CreateWebViewHarness(Assembly.GetAssembly(typeof(IBrowserService)), "waiting"));
         _state = WebviewState.Waiting;
     });
 }
Example #2
0
 /// <summary>
 /// Loads the Webview. Requires the UI thread
 /// </summary>
 public void LoadWebView()
 {
     if (_state == WebviewState.Unknown || _state == WebviewState.Waiting || _state == WebviewState.Restarting)
     {
         Log.Debug($"{nameof(LoadWebView)} State={_state}");
         ThreadHelper.JoinableTaskFactory.Run(async delegate {
             await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
             LoadHtml(CreateWebViewHarness(Assembly.GetAssembly(typeof(IBrowserService)), "webview"));
             _state = WebviewState.Loaded;
         });
     }
     else
     {
         Log.Debug($"Ignoring {nameof(LoadWebView)} State={_state}");
     }
 }
Example #3
0
 public void SetIsReloading()
 {
     _state = WebviewState.Restarting;
 }