using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media.Imaging; using Tango.BL.Enumerations; using Tango.PPC.Common; 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 { /// /// Represents a PPC . /// /// [PPCModule(10)] public class BrowserModule : PPCModuleBase { /// /// Initializes a new instance of the class. /// public BrowserModule() { IsVisibleInMenu = false; } /// /// Gets the module name. /// public override string Name { get { return "Browser"; } } /// /// Gets the module description. /// public override string Description { get { return "Browser module"; } } /// /// Gets the module cover image. /// public override BitmapSource Image { get { return ResourceHelper.GetImageFromResources("Images/browser.png"); } } /// /// Gets the module entry point view type. /// public override Type MainViewType { get { return IsCefAvailable() ? typeof(BrowserView) : typeof(ErrorView); } } /// /// Gets the permission required to see and load this module. /// public override Permissions Permission { get { return Permissions.RunPPC; } } private bool IsCefAvailable() { return File.Exists(Path.Combine(AssemblyHelper.GetCurrentAssemblyFolder(), "x86", "CefSharp.Core.dll")); } /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// public override void Dispose() { //Dispose module here... } } }