diff options
| author | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-10-19 16:20:01 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-10-19 16:20:01 +0300 |
| commit | 72fc39f873de467c1431d928bce4d39442205691 (patch) | |
| tree | fc92559db7b57bb44606e040cd8ed4bd34494256 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | |
| parent | 22ddd9e0b6efe5aef685c7fc9886e3d93cb350c0 (diff) | |
| download | Tango-72fc39f873de467c1431d928bce4d39442205691.tar.gz Tango-72fc39f873de467c1431d928bce4d39442205691.zip | |
MS LITE
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 | 41 |
1 files changed, 33 insertions, 8 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 5ba726700..c4ee5a4b1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -21,6 +21,7 @@ using Tango.Integration.ExternalBridge; using Tango.Logging; using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Authentication; +using Tango.MachineStudio.Common.Buid; using Tango.MachineStudio.Common.Diagnostics; using Tango.MachineStudio.Common.EventLogging; using Tango.MachineStudio.Common.Messages; @@ -61,6 +62,7 @@ namespace Tango.MachineStudio.UI.ViewModels private IExternalBridgeClient _reconnectionMachine; private MachineLoginViewVM _reconnectionMachineConfig; private bool _lastUploadHardwareConfigLocal; + private IBuildProvider _buildProvider; /// <summary> /// Gets or sets the current loaded module. @@ -293,7 +295,8 @@ namespace Tango.MachineStudio.UI.ViewModels IDiagnosticsFrameProvider frameProvider, ISpeechProvider speechProvider, TeamFoundationServiceExtendedClient tfs, - MachineStudioWebClient machineStudioWebClient) : base() + MachineStudioWebClient machineStudioWebClient, + IBuildProvider buildProvider) : base() { _machineStudioWebClient = machineStudioWebClient; TFSClient = tfs; @@ -305,6 +308,7 @@ namespace Tango.MachineStudio.UI.ViewModels ApplicationManager = applicationManager; DiagnosticsFrameProvider = frameProvider; SpeechProvider = speechProvider; + _buildProvider = buildProvider; _settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>(); @@ -378,6 +382,8 @@ namespace Tango.MachineStudio.UI.ViewModels private void UpdateCheckThreadMethod() { + if (_buildProvider.BuildType == MSBuildType.Lite) return; //Manual Update: TODO: Implement update through machine service + while (!DisableCheckForUpdates) { Thread.Sleep(TimeSpan.FromMinutes(0.2)); @@ -495,13 +501,20 @@ namespace Tango.MachineStudio.UI.ViewModels } else { - _notificationProvider.ShowModalDialog<MachineSerialViewVM>(async (vm) => + if (_buildProvider.BuildType == MSBuildType.Lite) + { + await ConnectToMachineLocal(x.SelectedMachine, AuthenticationProvider.Machine, x.UploadHardwareConfiguration); + } + else { - if (vm.SelectedMachine != null) + _notificationProvider.ShowModalDialog<MachineSerialViewVM>(async (vm) => { - await ConnectToMachineLocal(x.SelectedMachine, vm.SelectedMachine, x.UploadHardwareConfiguration); - } - }); + if (vm.SelectedMachine != null) + { + await ConnectToMachineLocal(x.SelectedMachine, vm.SelectedMachine, x.UploadHardwareConfiguration); + } + }); + } } base.InvalidateRelayCommands(); @@ -979,9 +992,21 @@ namespace Tango.MachineStudio.UI.ViewModels } } - if (settings.LastMainModuleName != null) + if (_buildProvider.BuildType == MSBuildType.Default) + { + if (settings.LastMainModuleName != null) + { + var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName); + + if (m != null) + { + StartModule(m); + } + } + } + else { - var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName); + var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == "Research"); if (m != null) { |
