mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 23:01:52 +01:00
Fixed MachineList Crash if not connected to server
This commit is contained in:
parent
e089d8ab39
commit
b69b206c6e
@ -51,6 +51,10 @@ namespace Borepin.Base
|
||||
{
|
||||
await _BFFHService.Reconnect().ConfigureAwait(false);
|
||||
}
|
||||
else if(_BFFHService.CurrentConnection == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -16,26 +16,30 @@
|
||||
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
|
||||
<Button Text="Scan QR-Code" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}">
|
||||
<Button.IsVisible>
|
||||
<OnPlatform x:TypeArguments="x:Boolean"
|
||||
iOS="false"
|
||||
Android="true"/>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
<RefreshView Command="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
|
||||
<ListView ItemsSource="{Binding MachineListItemViewModel_List}" IsVisible="{Binding IsConnected}" SelectionMode="None">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<views:MachineListItemView />
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</RefreshView>
|
||||
<StackLayout IsVisible="{Binding IsConnected}">
|
||||
<Button Text="Scan QR-Code" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}">
|
||||
<Button.IsVisible>
|
||||
<OnPlatform x:TypeArguments="x:Boolean"
|
||||
iOS="false"
|
||||
Android="true"/>
|
||||
</Button.IsVisible>
|
||||
</Button>
|
||||
<RefreshView Command="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
|
||||
<ListView ItemsSource="{Binding MachineListItemViewModel_List}" IsVisible="{Binding IsConnected}" SelectionMode="None">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<views:MachineListItemView />
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</RefreshView>
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding IsConnected, Converter={StaticResource InvertBoolConverter}}">
|
||||
<Label Text="Please connect to Server" ></Label>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
<Label Text="Please connect to Server" IsVisible="{Binding IsConnected, Converter={StaticResource InvertBoolConverter}}"></Label>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
|
Loading…
x
Reference in New Issue
Block a user