From ffd8bbdb55ef8e99379dfb4aae2a48eca72f70ff Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 12 Feb 2020 12:23:22 +0200 Subject: Removed all application information event logging from MS. --- .../Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs') 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 2a00386dc..4d37321dd 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -410,13 +410,11 @@ namespace Tango.MachineStudio.UI.ViewModels String serial = ApplicationManager.ConnectedMachine.SerialNumber; await ApplicationManager.ConnectedMachine.Disconnect(); ApplicationManager.SetConnectedMachine(null); - _eventLogger.Log("Disconnected from machine " + serial); PostMessage(new MachineConnectionChangedMessage() { Machine = null }); } catch (Exception ex) { - _eventLogger.Log(ex, "Error disconnecting from machine."); LogManager.Log(ex, "Could not disconnect from machine."); } finally @@ -497,7 +495,6 @@ namespace Tango.MachineStudio.UI.ViewModels ApplicationManager.SetConnectedMachine(x.SelectedMachine); PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine }); - _eventLogger.Log(String.Format("Successfully connected to machine {0} via USB", x.SelectedMachine.SerialNumber)); _settings.LastVirtualMachineSerialNumber = vm.SelectedMachine.SerialNumber; _settings.Save(); @@ -510,11 +507,6 @@ namespace Tango.MachineStudio.UI.ViewModels { LogManager.Log(ex); - if (x.SelectedMachine != null) - { - _eventLogger.Log(ex, "Error connecting to machine " + x.SelectedMachine.SerialNumber); - } - _notificationProvider.ShowError("Could not connect to the selected machine." + Environment.NewLine + ex.Message); } @@ -615,7 +607,6 @@ namespace Tango.MachineStudio.UI.ViewModels machine.SessionClosed -= Machine_SessionClosed; machine.SessionClosed += Machine_SessionClosed; PostMessage(new MachineConnectionChangedMessage() { Machine = machine }); - _eventLogger.Log(String.Format("Successfully connected to machine {0} via TCP", machine.SerialNumber)); //if (x.UploadHardwareConfiguration) //{ @@ -626,13 +617,11 @@ namespace Tango.MachineStudio.UI.ViewModels catch (ResponseErrorException ex) { LogManager.Log(ex); - _eventLogger.Log(ex, "Error connecting to machine " + machine.SerialNumber); _notificationProvider.ShowError("Could not connect to the selected machine." + Environment.NewLine + ex.Container.ErrorMessage); } catch (Exception ex) { LogManager.Log(ex); - _eventLogger.Log(ex, "Error connecting to machine " + machine.SerialNumber); _notificationProvider.ShowError("Could not connect to the selected machine." + Environment.NewLine + ex.Message); } -- cgit v1.3.1 From 1d2a8fcc28a69b87f8deb3f08323c9a80e3631e2 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 25 Feb 2020 12:15:30 +0200 Subject: Fixed issue with current module image when starting machine studio and multiple modules opened. --- .../Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs') 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 4d37321dd..46491c823 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -737,7 +737,7 @@ namespace Tango.MachineStudio.UI.ViewModels /// Opens the module in a new window. /// /// The module. - private async void OpenModuleInWindow(IStudioModule module, Rect? bounds = null, WindowState? state = null) + private async void OpenModuleInWindow(IStudioModule module, Rect? bounds = null, WindowState? state = null, bool setHomeModule = true) { if (module == null) return; @@ -745,7 +745,10 @@ namespace Tango.MachineStudio.UI.ViewModels { module.InNewWindow = true; - StartModule(null); + if (setHomeModule) + { + StartModule(null); + } await Task.Delay(1000); @@ -943,7 +946,7 @@ namespace Tango.MachineStudio.UI.ViewModels if (module != null && !module.InNewWindow) { - OpenModuleInWindow(module, item.Bounds, item.State); + OpenModuleInWindow(module, item.Bounds, item.State, false); } } -- cgit v1.3.1