aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-02-18 09:23:15 +0200
committerRoy <roy.mail.net@gmail.com>2018-02-18 09:23:15 +0200
commit858a2b114f78c87883510e3627874c7632f81177 (patch)
tree3999c39b7ac85ec7b07cddd3b72e370e1b6e0487 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB
parente332170566c295fb4ff375498867f984f1570707 (diff)
downloadTango-858a2b114f78c87883510e3627874c7632f81177.tar.gz
Tango-858a2b114f78c87883510e3627874c7632f81177.zip
Developer redesign..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
index 2835ef102..27c4bc7a0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs
@@ -25,9 +25,15 @@ namespace Tango.MachineStudio.DB.ViewModels
if (module is DBModule && args != null && args is IObservableEntity)
{
String vmName = args.GetType().Name + "sViewVM";
-
+
Type vmType = Assembly.GetAssembly(typeof(MainViewVM)).GetTypes().SingleOrDefault(x => x.Name == vmName);
+ if (vmType == null)
+ {
+ vmName = args.GetType().BaseType.Name + "sViewVM";
+ vmType = Assembly.GetAssembly(typeof(MainViewVM)).GetTypes().SingleOrDefault(x => x.Name == vmName);
+ }
+
if (vmType != null)
{
var vm = ServiceLocator.Current.GetInstance(vmType);