aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-13 00:23:55 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-13 00:23:55 +0200
commitfea4547613d57f8fcc8cb94671c54d82a5b11dbb (patch)
tree19db6439b6694884da2414df5d6ae92ba2464bcf /Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs
parent85e27ca4c292329a894a49ed950912285465fa2e (diff)
downloadTango-fea4547613d57f8fcc8cb94671c54d82a5b11dbb.tar.gz
Tango-fea4547613d57f8fcc8cb94671c54d82a5b11dbb.zip
Added browser cef loading error support.
Implemented better module loading error handling in general.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs
index cd8372277..dc7b294d5 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/BrowserModule.cs
@@ -10,6 +10,8 @@ using Tango.PPC.Browser.Views;
using Tango.SharedUI.Helpers;
using Tango.Core.DI;
using Tango.PPC.Common.Application;
+using System.IO;
+using Tango.Core.Helpers;
namespace Tango.PPC.Browser
{
@@ -68,7 +70,7 @@ namespace Tango.PPC.Browser
{
get
{
- return typeof(BrowserView);
+ return IsCefAvailable() ? typeof(BrowserView) : typeof(ErrorView);
}
}
@@ -83,6 +85,11 @@ namespace Tango.PPC.Browser
}
}
+ private bool IsCefAvailable()
+ {
+ return File.Exists(Path.Combine(AssemblyHelper.GetCurrentAssemblyFolder(), "x86", "CefSharp.Core.dll"));
+ }
+
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>