mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 14:51:44 +01:00
Added ForceFree
This commit is contained in:
parent
cb98542072
commit
f41b69cfd8
@ -21,9 +21,17 @@
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
|
||||
<Label Text="{Binding MachineItem.Name}" Style="{StaticResource LabelStyle_Title}"/>
|
||||
|
||||
<Button Text="Use" Command="{Binding UseMachineCommand}" IsVisible="{Binding MachineItem.CanUse}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Text="GiveBack" Command="{Binding GiveBackMachineCommand}" IsVisible="{Binding MachineItem.CanInUse}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Label Text="{Binding MachineItem.Description}" Style="{StaticResource Style_Label_Text}"/>
|
||||
<StackLayout IsVisible="{Binding MachineItem.CanUse}">
|
||||
<Button Text="Use" Command="{Binding UseMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding MachineItem.CanInUse}">
|
||||
<Button Text="GiveBack" Command="{Binding GiveBackMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding MachineItem.CanManage}">
|
||||
<Label Text="Manage Machine:" Style="{StaticResource Style_Label_Property_Title}"/>
|
||||
<Button Text="Force Free" Command="{Binding ForceFreeMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
|
@ -25,6 +25,7 @@ namespace Borepin.PageModel
|
||||
|
||||
UseMachineCommand = new DelegateCommand(UseMachineCommandExecuted);
|
||||
GiveBackMachineCommand = new DelegateCommand(GiveBackMachineCommandExecuted);
|
||||
ForceFreeMachineCommand = new DelegateCommand(ForceFreeMachineCommandExecuted);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -85,12 +86,27 @@ namespace Borepin.PageModel
|
||||
await inUseInterface.GiveBack();
|
||||
await LoadData();
|
||||
}
|
||||
|
||||
private ICommand _ForceFreeMachineCommand;
|
||||
public ICommand ForceFreeMachineCommand
|
||||
{
|
||||
get => _ForceFreeMachineCommand;
|
||||
set => SetProperty(ref _ForceFreeMachineCommand, value);
|
||||
}
|
||||
|
||||
private async void ForceFreeMachineCommandExecuted()
|
||||
{
|
||||
Machine.IManageInterface manageInterface = _Machine.Manage;
|
||||
|
||||
await manageInterface.ForceFree();
|
||||
await LoadData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region INavigationService
|
||||
public override void OnNavigatedFrom(INavigationParameters parameters)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
|
@ -14,9 +14,9 @@
|
||||
<Grid RowSpacing="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="7*" />
|
||||
<ColumnDefinition Width="6*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="7*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="1" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
|
Loading…
x
Reference in New Issue
Block a user