aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/WelcomeViewVM.cs
blob: 4fbac321e6ac3560ca939d1ac9aa15eab7f67cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.PPC.BackupRestore.Views;
using Tango.PPC.Common;

namespace Tango.PPC.BackupRestore.ViewModels
{
    public class WelcomeViewVM : PPCViewModel
    {
        public RelayCommand NavigateToBackupCommand { get; set; }

        public RelayCommand NavigateToRestoreCommand { get; set; }

        public WelcomeViewVM()
        {
            NavigateToBackupCommand = new RelayCommand(() => 
            {
                NavigationManager.NavigateTo<BackupRestoreModule>(nameof(BackupView));
            });

            NavigateToRestoreCommand = new RelayCommand(() =>
            {
                NavigationManager.NavigateTo<BackupRestoreModule>(nameof(RestoreView));
            });
        }

        public override void OnApplicationStarted()
        {
            
        }

        public override void OnNavigatedTo()
        {
            base.OnNavigatedTo();
            NotificationProvider.NotificationsVisible = false;
        }

        public override Task<bool> OnNavigateBackRequest()
        {
            NotificationProvider.NotificationsVisible = true;
            return base.OnNavigateBackRequest();
        }
    }
}