diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-26 14:19:06 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-26 14:19:06 +0200 |
| commit | 6fb22273d15ed476ccbd3820de6af9bc0deee793 (patch) | |
| tree | 35c40b14471bbc191d12a1dafcd807ec16aacb87 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingErrorViewVM.cs | |
| parent | 10a9435c7fece43c588addb744952d92596a8f5b (diff) | |
| download | Tango-6fb22273d15ed476ccbd3820de6af9bc0deee793.tar.gz Tango-6fb22273d15ed476ccbd3820de6af9bc0deee793.zip | |
Implemented Application Initialization Error and Handling.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingErrorViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingErrorViewVM.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingErrorViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingErrorViewVM.cs new file mode 100644 index 000000000..3c05e3690 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingErrorViewVM.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.PPC.Common; +using Tango.PPC.Common.Navigation; + +namespace Tango.PPC.UI.ViewModels +{ + public class LoadingErrorViewVM : PPCViewModel, INavigationObjectReceiver<Exception> + { + private String _error; + public String Error + { + get { return _error; } + set { _error = value; RaisePropertyChangedAuto(); } + } + + public RelayCommand RestartCommand { get; set; } + + public LoadingErrorViewVM() + { + RestartCommand = new RelayCommand(Restart); + } + + public override void OnApplicationStarted() + { + + } + + public void OnNavigatedToWithObject(Exception ex) + { + Error = ex.Message; + } + + private void Restart() + { + ApplicationManager.Restart(); + } + } +} |
