using System; using System.Windows.Media; using System.Windows.Media.Imaging; using Aitex.Core.RT.SCCore; using FurnaceRT.Instances; using MECF.Framework.RT.Core.Applications; namespace SorterRT.Modules { class RtInstance : IRtInstance { string IRtInstance.SystemName => SystemName; public bool EnableNotifyIcon => true; public bool KeepRunningAfterUnknownException => false; public ImageSource TrayIcon => _trayIcon; public bool DefaultShowBackendWindow => false; public IRtLoader Loader => _loader; string IRtInstance.DatabaseName => GetDbName(); public const string SystemName = "Furnace"; public const string DeviceModelFileName = "DeviceModelFurnace.xml"; private ImageSource _trayIcon; private IRtLoader _loader; public RtInstance() { _trayIcon = new BitmapImage(new Uri("pack://application:,,,/MECF.Framework.Common;component/Resources/Logos/MyLogoTray.ico")); _loader = new ToolLoader(); } public static string GetDbName() { var appDbName = System.Configuration.ConfigurationManager.AppSettings["dbName"]; if (!string.IsNullOrEmpty(appDbName)) { return appDbName.ToLower(); } return "thermaldb"; } } }