aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs31
1 files changed, 8 insertions, 23 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs
index 9f66bb6a6..9650aa342 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/ViewModels/BrowserViewVM.cs
@@ -1,6 +1,4 @@
-using CefSharp;
-using CefSharp.Wpf;
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -42,23 +40,6 @@ namespace Tango.PPC.Browser.ViewModels
{
DisplayAddressBar = true;
- if (!DesignMode)
- {
- try
- {
- var settings = new CefSettings();
- settings.BrowserSubprocessPath = @"x86\CefSharp.BrowserSubprocess.exe";
- settings.UserAgent = "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148";
-
- Cef.Initialize(settings, performDependencyCheck: false, browserProcessHandler: null);
- }
- catch (Exception ex)
- {
- //Log Here Not Throw!
- throw;
- }
- }
-
GoCommand = new RelayCommand(Go);
}
@@ -76,6 +57,7 @@ namespace Tango.PPC.Browser.ViewModels
public override void OnNavigatedTo()
{
base.OnNavigatedTo();
+
KeyboardView.Default.OutputMode = KeyboardOutputMode.Windows;
if (!_isFromObject)
@@ -92,9 +74,9 @@ namespace Tango.PPC.Browser.ViewModels
KeyboardView.Default.OutputMode = KeyboardOutputMode.Wpf;
}
- public override Task<bool> OnNavigateBackRequest()
+ public override Task<bool> OnNavigateBackRequest()
{
- if (View.CanGoBack())
+ if (View != null && View.CanGoBack())
{
View.GoBack();
return Task.FromResult(false);
@@ -115,7 +97,10 @@ namespace Tango.PPC.Browser.ViewModels
private void Go()
{
- View.NavigateTo(Address);
+ if (View != null)
+ {
+ View.NavigateTo(Address);
+ }
}
public void OnNavigatedToWithObject(BrowserNavigationRequest obj)