diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-13 00:23:55 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-13 00:23:55 +0200 |
| commit | fea4547613d57f8fcc8cb94671c54d82a5b11dbb (patch) | |
| tree | 19db6439b6694884da2414df5d6ae92ba2464bcf /Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication | |
| parent | 85e27ca4c292329a894a49ed950912285465fa2e (diff) | |
| download | Tango-fea4547613d57f8fcc8cb94671c54d82a5b11dbb.tar.gz Tango-fea4547613d57f8fcc8cb94671c54d82a5b11dbb.zip | |
Added browser cef loading error support.
Implemented better module loading error handling in general.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 8bb1c0fe3..206aa112b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -342,10 +342,17 @@ namespace Tango.PPC.UI.PPCApplication { if (!Views.LayoutView.Instance.NavigationControl.Elements.ToList().Exists(m => m.GetType() == module.MainViewType)) { - LogManager.Log("Loading module view " + module.Name + "..."); - FrameworkElement view = Activator.CreateInstance(module.MainViewType) as FrameworkElement; - SharedUI.Controls.NavigationControl.SetNavigationName(view, module.Name); - Views.LayoutView.Instance.NavigationControl.Elements.Add(view); + try + { + LogManager.Log("Loading module view " + module.Name + "..."); + FrameworkElement view = Activator.CreateInstance(module.MainViewType) as FrameworkElement; + SharedUI.Controls.NavigationControl.SetNavigationName(view, module.Name); + Views.LayoutView.Instance.NavigationControl.Elements.Add(view); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error loading module view for module {module.Name}."); + } } } }); |
