diff options
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(); + } + } +} |
