mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 14:51:44 +01:00
BackUp
This commit is contained in:
parent
d6ac268516
commit
d9af7a3730
@ -160,6 +160,8 @@ namespace Borepin.PageModel
|
||||
}
|
||||
|
||||
IMachineSystem machineInterface = (await _BFFHService.GetSession().ConfigureAwait(false)).MachineSystem;
|
||||
|
||||
|
||||
MachineSystem.IInfoInterface infoInterface = await machineInterface.Info().ConfigureAwait(false);
|
||||
|
||||
Machine machine = await infoInterface.GetMachineURN(value).ConfigureAwait(false);
|
||||
@ -213,6 +215,15 @@ namespace Borepin.PageModel
|
||||
{
|
||||
string urn = (string)parameters["value"];
|
||||
ScanCode_Result(urn);
|
||||
|
||||
NavigationParameters parameters2 = new NavigationParameters
|
||||
{
|
||||
{ "id", _NextMachine.Id},
|
||||
};
|
||||
|
||||
_NextMachine = null;
|
||||
|
||||
await _NavigationService.NavigateAsync("MachinePage", parameters2).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
using Borepin.Base;
|
||||
using Prism.Commands;
|
||||
using Prism.Navigation;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
using ZXing;
|
||||
|
||||
namespace Borepin.PageModel
|
||||
@ -20,7 +22,7 @@ namespace Borepin.PageModel
|
||||
_NavigationService = navigationService;
|
||||
|
||||
AbortCommand = new DelegateCommand(async () => await AbortCommandExecute().ConfigureAwait(true));
|
||||
ScannedCommand = new DelegateCommand(async () => await ScannedCommandExecute().ConfigureAwait(true));
|
||||
ScannedCommand = new DelegateCommand(ScannedCommandExecute);
|
||||
|
||||
IsVisible = true;
|
||||
IsScanning = true;
|
||||
@ -30,9 +32,7 @@ namespace Borepin.PageModel
|
||||
#region Data
|
||||
public override async Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -67,7 +67,7 @@ namespace Borepin.PageModel
|
||||
get => _ScannedCommand;
|
||||
set => SetProperty(ref _ScannedCommand, value);
|
||||
}
|
||||
public async Task ScannedCommandExecute()
|
||||
public void ScannedCommandExecute()
|
||||
{
|
||||
IsScanning = false;
|
||||
IsVisible = false;
|
||||
@ -79,7 +79,10 @@ namespace Borepin.PageModel
|
||||
{ "instance", _Instance }
|
||||
};
|
||||
|
||||
await _NavigationService.NavigateAsync("..", parameters).ConfigureAwait(false);
|
||||
Device.BeginInvokeOnMainThread(async () =>
|
||||
{
|
||||
INavigationResult result = await _NavigationService.GoBackAsync(parameters).ConfigureAwait(false);
|
||||
});
|
||||
}
|
||||
|
||||
private ICommand _AbortCommand;
|
||||
@ -98,7 +101,7 @@ namespace Borepin.PageModel
|
||||
{ "result", "abort" },
|
||||
{ "instance", _Instance }
|
||||
};
|
||||
await _NavigationService.NavigateAsync("..", parameters).ConfigureAwait(false);
|
||||
await _NavigationService.GoBackAsync(parameters).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -108,10 +111,9 @@ namespace Borepin.PageModel
|
||||
|
||||
}
|
||||
|
||||
public override async void OnNavigatedTo(INavigationParameters parameters)
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
_Instance = parameters.GetValue<object>("instance");
|
||||
await LoadData().ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user