diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-23 22:25:54 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-23 22:25:54 +0300 |
| commit | ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch) | |
| tree | 293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | |
| parent | 52967e858bd52621208f6360e84f4c47ec435816 (diff) | |
| parent | 636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff) | |
| download | Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip | |
merge alarm handling from remote
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index 986bf483f..3f69ff771 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Input; using System.Windows.Media; using Tango.BL; using Tango.BL.Builders; @@ -467,7 +468,7 @@ namespace Tango.MachineStudio.UI.ViewModels HostName = Environment.MachineName, Password = login.Password, UserGuid = AuthenticationProvider.CurrentUser.Guid, - Intent = PMR.Integration.ExternalBridgeLoginIntent.Override, + Intent = login.Intent, }); ApplicationManager.SetConnectedMachine(x.SelectedMachine); @@ -892,25 +893,28 @@ namespace Tango.MachineStudio.UI.ViewModels { if (!IsApplicationReady) { - var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>(); - - foreach (var item in settings.StudioModulesBounds) + if (!Keyboard.IsKeyDown(Key.LeftCtrl)) { - var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name); + var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>(); - if (module != null && !module.InNewWindow) + foreach (var item in settings.StudioModulesBounds) { - OpenModuleInWindow(module, item.Bounds, item.State); - } - } + var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name); - if (settings.LastMainModuleName != null) - { - var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName); + if (module != null && !module.InNewWindow) + { + OpenModuleInWindow(module, item.Bounds, item.State); + } + } - if (m != null) + if (settings.LastMainModuleName != null) { - StartModule(m); + var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName); + + if (m != null) + { + StartModule(m); + } } } |
