Style: ServerListPage

This commit is contained in:
TheJoKlLa 2021-01-31 15:30:25 +01:00
parent 9c03087fa0
commit 63ad7c0f2d
3 changed files with 20 additions and 11 deletions

View File

@ -66,7 +66,7 @@ namespace Borepin
// Register Service // Register Service
_ConnectionService = new ConnectionService(); _ConnectionService = new ConnectionService();
_CredentialService = new CredentialService(); _CredentialService = new CredentialService();
_BFFHService = new BFFHService(_ConnectionService, _CredentialService); _BFFHService = new BFFHService(_CredentialService);
containerRegistry.RegisterInstance<IConnectionService>(_ConnectionService); containerRegistry.RegisterInstance<IConnectionService>(_ConnectionService);
containerRegistry.RegisterInstance<ICredentialService>(_CredentialService); containerRegistry.RegisterInstance<ICredentialService>(_CredentialService);

View File

@ -1,23 +1,19 @@
using Borepin.Model; using Borepin.Model;
using Borepin.Service.Connections;
using Borepin.Service.Credentials; using Borepin.Service.Credentials;
using System.Threading.Tasks; using System.Threading.Tasks;
using Capnp.Rpc; using Capnp.Rpc;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net.Sockets;
namespace Borepin.Service.BFFH namespace Borepin.Service.BFFH
{ {
public class BFFHService : IBFFHService public class BFFHService : IBFFHService
{ {
private IConnectionService _ConnectionService;
private ICredentialService _CredentialService; private ICredentialService _CredentialService;
private FabAccessAPI.Connection _Connection; private FabAccessAPI.Connection _Connection;
public BFFHService(IConnectionService connectionService, ICredentialService credentialService) public BFFHService(ICredentialService credentialService)
{ {
_ConnectionService = connectionService;
_CredentialService = credentialService; _CredentialService = credentialService;
} }

View File

@ -4,9 +4,22 @@
x:Class="Borepin.View.ServerListItemView" x:Class="Borepin.View.ServerListItemView"
xmlns:pagemodel="clr-namespace:Borepin.PageModel"> xmlns:pagemodel="clr-namespace:Borepin.PageModel">
<ContentView.Content> <ContentView.Content>
<StackLayout Orientation="Horizontal"> <Grid RowSpacing="0">
<Label Text="{Binding Address}" /> <Grid.ColumnDefinitions>
<Button Text="->" Command="{Binding Source={RelativeSource AncestorType={x:Type pagemodel:ServerListPageModel}}, Path=SelectInstanceCommand}" CommandParameter="{Binding .}" /> <ColumnDefinition Width="5" />
</StackLayout> <ColumnDefinition Width="7*" />
</ContentView.Content> <ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="1"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Instance.Address, StringFormat='{0}'}" Style="{StaticResource LabelStyle_Primary}"/>
<Label Grid.Row="0" Grid.Column="2" Text="{Binding Instance.Username}" Style="{StaticResource LabelStyle_Second}" HorizontalTextAlignment="End" />
<Button Grid.Row="0" Grid.Column="3" Margin="0, 3, 0, 3" Text="->" Command="{Binding Source={RelativeSource AncestorType={x:Type pagemodel:ServerListPageModel}}, Path=SelectInstanceCommand}" CommandParameter="{Binding .}" Style="{StaticResource ButtonStyle_Primary}"/>
<BoxView Grid.Row="1" Grid.ColumnSpan="5" BackgroundColor="{StaticResource FifthColor}"/>
</Grid>
</ContentView.Content>
</ContentView> </ContentView>