|
@@ -10,10 +10,10 @@ namespace SorterRT.Modules
|
|
class RtInstance : IRtInstance
|
|
class RtInstance : IRtInstance
|
|
{
|
|
{
|
|
string IRtInstance.SystemName => SystemName;
|
|
string IRtInstance.SystemName => SystemName;
|
|
-
|
|
|
|
|
|
+
|
|
public bool EnableNotifyIcon => true;
|
|
public bool EnableNotifyIcon => true;
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
public bool KeepRunningAfterUnknownException => false;
|
|
public bool KeepRunningAfterUnknownException => false;
|
|
|
|
|
|
public ImageSource TrayIcon => _trayIcon;
|
|
public ImageSource TrayIcon => _trayIcon;
|
|
@@ -22,13 +22,12 @@ namespace SorterRT.Modules
|
|
|
|
|
|
public IRtLoader Loader => _loader;
|
|
public IRtLoader Loader => _loader;
|
|
|
|
|
|
- string IRtInstance.DatabaseName => DatabaseName;
|
|
|
|
|
|
+ string IRtInstance.DatabaseName => GetDbName();
|
|
|
|
|
|
public const string SystemName = "Furnace";
|
|
public const string SystemName = "Furnace";
|
|
|
|
|
|
- public const string DatabaseName = "thermaldb";
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
public const string DeviceModelFileName = "DeviceModelFurnace.xml";
|
|
public const string DeviceModelFileName = "DeviceModelFurnace.xml";
|
|
|
|
|
|
private ImageSource _trayIcon;
|
|
private ImageSource _trayIcon;
|
|
@@ -40,5 +39,15 @@ namespace SorterRT.Modules
|
|
_loader = new ToolLoader();
|
|
_loader = new ToolLoader();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ public static string GetDbName()
|
|
|
|
+ {
|
|
|
|
+ var appDbName = System.Configuration.ConfigurationManager.AppSettings["dbName"];
|
|
|
|
+ if (!string.IsNullOrEmpty(appDbName))
|
|
|
|
+ {
|
|
|
|
+ return appDbName.ToLower();
|
|
|
|
+ }
|
|
|
|
+ return "thermaldb";
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|