aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs7
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs5
4 files changed, 17 insertions, 7 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
index 76c7b3e58..1334a349d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
@@ -28,6 +28,9 @@ namespace Tango.MachineStudio.UI
protected override void OnStartup(StartupEventArgs e)
{
+ LogManager.RegisterLogger(new VSOutputLogger());
+ LogManager.RegisterLogger(new FileLogger());
+
LogManager.Log("Application Started...");
base.OnStartup(e);
@@ -44,9 +47,6 @@ namespace Tango.MachineStudio.UI
LogManager.Categories.AddRange(SettingsManager.Default.MachineStudio.LoggingCategories);
- LogManager.RegisterLogger(new VSOutputLogger());
- LogManager.RegisterLogger(new FileLogger());
-
exceptionTrapper = new WpfGlobalExceptionTrapper();
exceptionTrapper.Initialize(this);
exceptionTrapper.ApplicationCrashed += ExceptionTrapper_ApplicationCrashed;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
index 121d429ec..07834393b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
@@ -80,8 +80,12 @@ namespace Tango.MachineStudio.UI.Modules
if (!_loaded)
{
//Preloaded
+
+ LogManager.Log(String.Format("Loading module '{0}'...", nameof(StubsModule)));
AllModules.Add(new StubsModule());
+ LogManager.Log(String.Format("Loading module '{0}'...", nameof(DBModule)));
AllModules.Add(new DBModule());
+ LogManager.Log(String.Format("Loading module '{0}'...", nameof(MachineDesignerModule)));
AllModules.Add(new MachineDesignerModule());
//Preloaded
@@ -103,6 +107,7 @@ namespace Tango.MachineStudio.UI.Modules
{
try
{
+ LogManager.Log(String.Format("Loading module '{0}'...", moduleType.Name));
var module = Activator.CreateInstance(moduleType) as IStudioModule;
AllModules.Add(module);
}
@@ -117,7 +122,7 @@ namespace Tango.MachineStudio.UI.Modules
catch { }
}
- _loaded = true;
+ _loaded = true;
}
UserModules.Clear();
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 f78cc15be..8e451cdce 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -425,7 +425,7 @@ namespace Tango.MachineStudio.UI.ViewModels
{
LogManager.Log(ex);
_eventLogger.Log(ex, "Error connecting to machine " + x.SelectedMachine.SerialNumber);
- _notificationProvider.ShowError(ex.Message);
+ _notificationProvider.ShowError("Could not connect to the selected machine." + Environment.NewLine + ex.Message);
}
InvalidateRelayCommands();
@@ -455,7 +455,7 @@ namespace Tango.MachineStudio.UI.ViewModels
{
LogManager.Log(ex);
_eventLogger.Log(ex, "Error connecting to machine " + x.SelectedMachine.SerialNumber);
- _notificationProvider.ShowError(ex.Message);
+ _notificationProvider.ShowError("Could not connect to the selected machine." + Environment.NewLine + ex.Message);
}
InvalidateRelayCommands();
@@ -472,7 +472,7 @@ namespace Tango.MachineStudio.UI.ViewModels
}
else
{
- _notificationProvider.ShowModalDialog<ConnectedMachineViewVM>((x) =>
+ _notificationProvider.ShowModalDialog<ConnectedMachineViewVM>((x) =>
{
DisconnectFromMachine();
});
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
index e0ae60b87..442d11cdd 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
@@ -25,6 +25,7 @@ using Tango.MachineStudio.Common;
using System.Threading;
using Tango.Core.Helpers;
using Tango.SharedUI.Helpers;
+using Tango.Logging;
namespace Tango.MachineStudio.UI.Views
{
@@ -54,6 +55,8 @@ namespace Tango.MachineStudio.UI.Views
Task.Factory.StartNew(() =>
{
+ LogManager.Default.Log("Loading modules views...");
+
var item = ServiceLocator.Current.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
var modules = _loader.UserModules.ToList();
@@ -67,6 +70,8 @@ namespace Tango.MachineStudio.UI.Views
foreach (var module in modules)
{
+ LogManager.Default.Log("Loading module view '" + module.Name + "'...");
+
ThreadsHelper.InvokeUI(() =>
{
Grid grid = new Grid();