mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 23:01:52 +01:00
Changed ServerPage Display Host and Port
This commit is contained in:
parent
3212904bd0
commit
67722db0bd
@ -6,7 +6,7 @@
|
|||||||
<FlyoutPage.Flyout>
|
<FlyoutPage.Flyout>
|
||||||
<ContentPage Title="FabAccess" BackgroundColor="{StaticResource SecondColor}">
|
<ContentPage Title="FabAccess" BackgroundColor="{StaticResource SecondColor}">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<StackLayout Margin="0,50,0,0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
|
<StackLayout Margin="0,50,0,0" VerticalOptions="FillAndExpand">
|
||||||
<Button Text="Machines" Command="{Binding NavigateCommand}" CommandParameter="MachineListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
|
<Button Text="Machines" Command="{Binding NavigateCommand}" CommandParameter="MachineListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
|
||||||
<Button Text="Servers" Command="{Binding NavigateCommand}" CommandParameter="ServerListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
|
<Button Text="Servers" Command="{Binding NavigateCommand}" CommandParameter="ServerListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ContentPage.Resources>
|
</ContentPage.Resources>
|
||||||
<ContentPage.Content>
|
<ContentPage.Content>
|
||||||
<StackLayout Padding="20" VerticalOptions="FillAndExpand">
|
<StackLayout Padding="20">
|
||||||
<StackLayout IsVisible="{Binding IsBusy}">
|
<StackLayout IsVisible="{Binding IsBusy}">
|
||||||
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
|
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
@ -14,12 +14,18 @@
|
|||||||
<StackLayout IsVisible="{Binding IsBusy}">
|
<StackLayout IsVisible="{Binding IsBusy}">
|
||||||
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
|
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
|
<Grid IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}" VerticalOptions="FillAndExpand">
|
||||||
<Label Text="{Binding Connection_Item.Address}"/>
|
<Grid.RowDefinitions>
|
||||||
<Button IsVisible="{Binding InstanceIsActiveConnection, Converter={StaticResource InvertBoolConverter}}" Text="Connect" Command="{Binding ConnectCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
<RowDefinition Height="*"/>
|
||||||
<Button IsVisible="{Binding InstanceIsActiveConnection}" Text="Disconnect" Command="{Binding DisconnectCommand}" Style="{StaticResource Style_Button_Admin}"/>
|
<RowDefinition Height="50"/>
|
||||||
<Button Text="Delete" Command="{Binding DeleteCommand}" Style="{StaticResource Style_Button_Admin}"/>
|
</Grid.RowDefinitions>
|
||||||
</StackLayout>
|
<StackLayout Grid.Row="0">
|
||||||
|
<Label Text="{Binding DisplayAddress}" HorizontalTextAlignment="Center" Margin="0,0,0,10" Style="{StaticResource LabelStyle_Title}"/>
|
||||||
|
<Button IsVisible="{Binding InstanceIsActiveConnection, Converter={StaticResource InvertBoolConverter}}" Text="Connect" Command="{Binding ConnectCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||||
|
<Button IsVisible="{Binding InstanceIsActiveConnection}" Text="Disconnect" Command="{Binding DisconnectCommand}" Style="{StaticResource Style_Button_Admin}"/>
|
||||||
|
</StackLayout>
|
||||||
|
<Button Grid.Row="1" Text="Delete" Command="{Binding DeleteCommand}" Style="{StaticResource Style_Button_Admin}" VerticalOptions="End"/>
|
||||||
|
</Grid>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage.Content>
|
</ContentPage.Content>
|
||||||
</ContentPage>
|
</ContentPage>
|
@ -7,6 +7,7 @@ using Prism.Navigation;
|
|||||||
using Prism.Services;
|
using Prism.Services;
|
||||||
using Prism.Services.Dialogs;
|
using Prism.Services.Dialogs;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
@ -46,6 +47,11 @@ namespace Borepin.PageModel
|
|||||||
InstanceIsActiveConnection = false;
|
InstanceIsActiveConnection = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_Connection_Item != null && _Connection_Item.Address != null)
|
||||||
|
{
|
||||||
|
DisplayAddress = string.Format(CultureInfo.InvariantCulture, "{0}:{1}", _Connection_Item.Address.Host, _Connection_Item.Address.Port);
|
||||||
|
}
|
||||||
|
|
||||||
IsBusy = false;
|
IsBusy = false;
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
@ -59,6 +65,13 @@ namespace Borepin.PageModel
|
|||||||
set => SetProperty(ref _Connection_Item, value);
|
set => SetProperty(ref _Connection_Item, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string _DisplayAddress;
|
||||||
|
public string DisplayAddress
|
||||||
|
{
|
||||||
|
get => _DisplayAddress;
|
||||||
|
set => SetProperty(ref _DisplayAddress, value);
|
||||||
|
}
|
||||||
|
|
||||||
private bool _InstanceIsActiveConnection;
|
private bool _InstanceIsActiveConnection;
|
||||||
public bool InstanceIsActiveConnection
|
public bool InstanceIsActiveConnection
|
||||||
{
|
{
|
||||||
@ -164,13 +177,13 @@ namespace Borepin.PageModel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
public override async void OnNavigatedTo(INavigationParameters parameters)
|
||||||
{
|
{
|
||||||
if(Connection_Item == null)
|
if(Connection_Item == null)
|
||||||
{
|
{
|
||||||
Connection_Item = parameters["instance"] as Connection;
|
Connection_Item = parameters["instance"] as Connection;
|
||||||
|
|
||||||
LoadData();
|
await LoadData().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user