2021-09-20 00:52:15 +02:00

59 lines
1.5 KiB
C#

using Borepin.Base;
using Prism.Commands;
using Prism.Navigation;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Borepin.PageModel.SetUpProcess
{
public class ScanPageModel : PageModelBase
{
#region Constructors
public ScanPageModel(INavigationService navigationService) : base(navigationService)
{
NextCommand = new DelegateCommand<object>(NextCommandCommandExecuted);
}
#endregion
#region LoadData
public override async Task LoadData()
{
IsBusy = true;
IsBusy = false;
await Task.CompletedTask;
}
#endregion
#region Commands
private ICommand _NextCommand;
public ICommand NextCommand
{
get => _NextCommand;
set => SetProperty(ref _NextCommand, value);
}
private async void NextCommandCommandExecuted(object obj)
{
INavigationResult result = await _NavigationService.NavigateAsync("AddServerProcess_HostSelectPage");
if (!result.Success)
{
System.Diagnostics.Debugger.Break();
}
}
#endregion
#region INavigationAware
public override void OnNavigatedFrom(INavigationParameters parameters)
{
}
public override void OnNavigatedTo(INavigationParameters parameters)
{
IsBusy = true;
Task.Run(LoadData);
}
#endregion
}
}