mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 14:51:44 +01:00
Added: Create Card on UWP
This commit is contained in:
parent
f42bcfd3a1
commit
75da7b6534
@ -20,6 +20,11 @@ namespace Borepin.Model
|
||||
#region LoadData
|
||||
public Task LoadData()
|
||||
{
|
||||
if(_User == null)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
//ID = _User.Id;
|
||||
Username = _User.Username;
|
||||
//Space = new SpaceVisualize(_User.Space);
|
||||
|
@ -22,9 +22,11 @@
|
||||
<Button Text="{x:Static resource_text:TextResource.AddServerProcess_SelectServerPage_Connect}" Command="{Binding ConnectToServerCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Text="{x:Static resource_text:TextResource.SCANQR}" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}">
|
||||
<Button.IsVisible>
|
||||
<OnPlatform x:TypeArguments="x:Boolean"
|
||||
iOS="true"
|
||||
Android="true"/>
|
||||
<OnPlatform x:TypeArguments="x:Boolean">
|
||||
<On Platform="iOS" Value="True" />
|
||||
<On Platform="Android" Value="True" />
|
||||
<On Platform="UWP" Value="False" />
|
||||
</OnPlatform>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
<Label Text="{x:Static resource_text:TextResource.AddServerProcess_SelectServerPage_Info}" Margin="0, 20, 0, 0"></Label>
|
||||
|
@ -37,7 +37,7 @@
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Entry Grid.Column="0" Text="{Binding PICCKey}" IsSpellCheckEnabled="false"/>
|
||||
<Button Grid.Column="2" Text="Scan QR-Code" Command="{Binding ScanPICCKeyCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Grid.Column="2" Text="Scan QR-Code" Command="{Binding ScanPICCKeyCommand}" Style="{StaticResource Style_Button_Primary}" IsVisible="False"/>
|
||||
</Grid>
|
||||
|
||||
<Label Text="Application Key" Style="{StaticResource Style_Label_Property_Title}"></Label>
|
||||
@ -49,7 +49,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Entry Grid.Column="0" Text="{Binding APPKey}" IsSpellCheckEnabled="false"/>
|
||||
<Button Grid.Column="1" Text="Random" Command="{Binding RandomAPPKeyCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Grid.Column="2" Text="Scan QR-Code" Command="{Binding ScanAPPKeyCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Grid.Column="2" Text="Scan QR-Code" Command="{Binding ScanAPPKeyCommand}" Style="{StaticResource Style_Button_Primary}" IsVisible="False"/>
|
||||
</Grid>
|
||||
|
||||
<StackLayout Orientation="Horizontal">
|
||||
|
@ -30,9 +30,11 @@
|
||||
</StackLayout.IsVisible>
|
||||
<Button Text="{x:Static resource_text:TextResource.SCANQR}" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}">
|
||||
<Button.IsVisible>
|
||||
<OnPlatform x:TypeArguments="x:Boolean"
|
||||
iOS="True"
|
||||
Android="True"/>
|
||||
<OnPlatform x:TypeArguments="x:Boolean">
|
||||
<On Platform="iOS" Value="True" />
|
||||
<On Platform="Android" Value="True" />
|
||||
<On Platform="UWP" Value="False" />
|
||||
</OnPlatform>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
<ListView ItemsSource="{Binding MachineListItemViewModel_List}" SelectionMode="None" SeparatorColor="Transparent" IsGroupingEnabled="True" GroupDisplayBinding="{Binding Category}">
|
||||
|
@ -43,29 +43,18 @@
|
||||
<Label Text="{Binding MachineItem.CurrentUser.Username}" Style="{StaticResource Style_Label_Property_Text}"/>
|
||||
</StackLayout>
|
||||
|
||||
<StackLayout>
|
||||
<Button Text="{x:Static resource_text:TextResource.MachinePage_Use}" IsVisible="{Binding MachineItem.CanUse}" Command="{Binding UseMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Label Text="{x:Static resource_text:TextResource.MachinePage_CanNotUseByPermission}" IsVisible="{Binding MachineItem.CanNotUseByPermission}" Style="{StaticResource Style_Label_Text_Center}" TextColor="{StaticResource FourthColor}"/>
|
||||
<Button Text="{x:Static resource_text:TextResource.MachinePage_GiveBack}" IsVisible="{Binding MachineItem.CanInUse}" Command="{Binding GiveBackMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
|
||||
<Button Text="{x:Static resource_text:TextResource.MachinePage_Unlock}" Command="{Binding UnlockLockCommand}" Style="{StaticResource Style_Button_Primary}">
|
||||
<Button.IsVisible>
|
||||
<MultiBinding Converter="{StaticResource AllTrueBoolConverter}">
|
||||
<Binding Path="MachineItem.CanInUse" Converter="{StaticResource InvertBoolConverter}"/>
|
||||
<Binding Path="MachineItem.IsLock" />
|
||||
</MultiBinding>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
<Button Text="{x:Static resource_text:TextResource.MachinePage_Identify}" Command="{Binding IdentifyLockCommand}" Style="{StaticResource Style_Button_Primary}">
|
||||
<Button.IsVisible>
|
||||
<MultiBinding Converter="{StaticResource AllTrueBoolConverter}">
|
||||
<Binding Path="MachineItem.CanInUse" Converter="{StaticResource InvertBoolConverter}"/>
|
||||
<Binding Path="MachineItem.IsLock" />
|
||||
</MultiBinding>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
<StackLayout Margin="0,10,0,0" IsVisible="{Binding MachineItem.IsLock}">
|
||||
<Button Text="{x:Static resource_text:TextResource.MachinePage_Unlock}" Command="{Binding UnlockLockCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Text="{x:Static resource_text:TextResource.MachinePage_Identify}" Command="{Binding IdentifyLockCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
|
||||
|
||||
<Button VerticalOptions="End" Text="{x:Static resource_text:TextResource.MachinePage_OpenWiki}" IsVisible="{Binding MachineItem.Wiki, Converter={StaticResource IsNotNullBoolConverter}}" Command="{Binding OpenWikiCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button VerticalOptions="End" Text="{x:Static resource_text:TextResource.MachinePage_OpenWiki}" IsVisible="{Binding MachineItem.Wiki, Converter={StaticResource IsNotNullBoolConverter}}" Command="{Binding OpenWikiCommand}" Margin="0,10,0,0" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<StackLayout Grid.Row="2" VerticalOptions="End" IsVisible="{Binding MachineItem.CanManage}" Margin="0,50,0,0">
|
||||
<Label Text="{x:Static resource_text:TextResource.MachinePage_ManageMachine}" Style="{StaticResource Style_Label_Property_Title}"/>
|
||||
<StackLayout Orientation="Horizontal" IsVisible="{Binding MachineItem.LastUser, Converter={StaticResource IsNotNullBoolConverter}}">
|
||||
|
@ -41,9 +41,19 @@
|
||||
<Button Text="{x:Static resource_text:TextResource.UserPage_UpdatePassword}" Command="{Binding UpdatePasswordCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding CanCreateCard}">
|
||||
<StackLayout >
|
||||
<StackLayout.IsVisible>
|
||||
<OnPlatform x:TypeArguments="x:Boolean">
|
||||
<On Platform="iOS" Value="False" />
|
||||
<On Platform="Android" Value="False" />
|
||||
<On Platform="UWP" Value="True" />
|
||||
</OnPlatform>
|
||||
</StackLayout.IsVisible>
|
||||
<Button Text="{x:Static resource_text:TextResource.UserPage_CreateCard}" Command="{Binding CreateCardCommand}" IsVisible="{Binding HasCardBinded, Converter={StaticResource InvertBoolConverter}}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
<Button Text="{x:Static resource_text:TextResource.UserPage_UnbindCard}" Command="{Binding UnbindCardCommand}" IsVisible="{Binding HasCardBinded}" Style="{StaticResource Style_Button_Admin}"/>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
|
||||
<Button Text="{x:Static resource_text:TextResource.DELETE}" Command="{Binding DeleteCommand}" Style="{StaticResource Style_Button_Admin}"/>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
|
@ -71,6 +71,11 @@ namespace Borepin.PageModel
|
||||
}
|
||||
|
||||
_User = (await _API.Session.UserSystem.Search.GetUserByName(_ID).ConfigureAwait(false)).Just;
|
||||
if(_User == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UserItem = new UserVisualize(_User);
|
||||
await UserItem.LoadData().ConfigureAwait(false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user