Added Strings to TextResource

This commit is contained in:
TheJoKlLa 2022-06-02 01:38:14 +02:00
parent 5034ca12c1
commit 6bbf25a63e
18 changed files with 502 additions and 57 deletions

View File

@ -3,3 +3,6 @@
# MA0003: Add argument name to improve readability # MA0003: Add argument name to improve readability
dotnet_diagnostic.MA0003.severity = none dotnet_diagnostic.MA0003.severity = none
csharp_style_prefer_switch_expression=false:suggestion csharp_style_prefer_switch_expression=false:suggestion
# MA0051: Method is too long
dotnet_diagnostic.MA0051.severity = silent

View File

@ -12,6 +12,7 @@ using Borepin.PageModel.AddServerProcess;
using System; using System;
using Borepin.Service.Storage; using Borepin.Service.Storage;
using NLog; using NLog;
using System.Resources;
namespace Borepin namespace Borepin
{ {

View File

@ -19,9 +19,8 @@ namespace Borepin.Model
#endregion #endregion
#region Methods #region Methods
public async void LoadData() public void LoadData()
{ {
Host = _ConnectionData.Host.Host; Host = _ConnectionData.Host.Host;
Port = _ConnectionData.Host.Port; Port = _ConnectionData.Host.Port;
Username = _ConnectionData.Username; Username = _ConnectionData.Username;

View File

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.AddServerProcess.AuthPlainPage" x:Class="Borepin.Page.AddServerProcess.AuthPlainPage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Connect to Server"> Title="Connect to Server">
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -15,13 +16,13 @@
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator> <ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}"> <StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
<Label Text="Username" Style="{StaticResource Style_Label_Property_Title}"></Label> <Label Text="{x:Static resource_text:TextResource.USERNAME}" Style="{StaticResource Style_Label_Property_Title}"></Label>
<Entry Text="{Binding Username}" IsSpellCheckEnabled="false"/> <Entry Text="{Binding Username}" IsSpellCheckEnabled="false"/>
<Label Text="Password" Style="{StaticResource Style_Label_Property_Title}"></Label> <Label Text="{x:Static resource_text:TextResource.PASSWORD}" Style="{StaticResource Style_Label_Property_Title}"></Label>
<Entry Text="{Binding Password}" IsPassword="True"/> <Entry Text="{Binding Password}" IsPassword="True"/>
<Button Text="Login" Command="{Binding AuthenticateCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.AddServerProcess_AuthPlainPage_Login}" Command="{Binding AuthenticateCommand}" Style="{StaticResource Style_Button_Primary}"/>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>

View File

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.AddServerProcess.ChooseAuthTypePage" x:Class="Borepin.Page.AddServerProcess.ChooseAuthTypePage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Connect to Server"> Title="Connect to Server">
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -15,13 +16,13 @@
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator> <ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}"> <StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
<Label Text="Sign In:" Style="{StaticResource Style_Label_Property_Title}"></Label> <Label Text="{x:Static resource_text:TextResource.AddServerProcess_ChooseAuthTypePage_SignIn}" Style="{StaticResource Style_Label_Property_Title}"></Label>
<Button Text="Login with Password" Command="{Binding AuthPlainCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.AddServerProcess_ChooseAuthTypePage_LoginPassword}" Command="{Binding AuthPlainCommand}" Style="{StaticResource Style_Button_Primary}"/>
<Label Text="or" Style="{StaticResource Style_Label_Property_Title}"></Label> <Label Text="{x:Static resource_text:TextResource.OR}" Style="{StaticResource Style_Label_Property_Title}"></Label>
<Button Text="Login with Card" Style="{StaticResource Style_Button_Primary}" IsEnabled="False"/> <Button Text="{x:Static resource_text:TextResource.AddServerProcess_ChooseAuthTypePage_LoginCard}" Style="{StaticResource Style_Button_Primary}" IsEnabled="False"/>
<Label Text="Sign Up:" Style="{StaticResource Style_Label_Property_Title}"></Label> <Label Text="{x:Static resource_text:TextResource.AddServerProcess_ChooseAuthTypePage_SignUp}" Style="{StaticResource Style_Label_Property_Title}"></Label>
<Button Text="Register" Style="{StaticResource Style_Button_Primary}" IsEnabled="False"/> <Button Text="{x:Static resource_text:TextResource.AddServerProcess_ChooseAuthTypePage_Register}" Style="{StaticResource Style_Button_Primary}" IsEnabled="False"/>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>

View File

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.AddServerProcess.SelectServerPage" x:Class="Borepin.Page.AddServerProcess.SelectServerPage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Connect to Server"> Title="Connect to Server">
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -15,10 +16,10 @@
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator> <ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}"> <StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
<Label Text="Host" Style="{StaticResource Style_Label_Property_Title}"></Label> <Label Text="{x:Static resource_text:TextResource.HOST}" Style="{StaticResource Style_Label_Property_Title}"></Label>
<Entry Text="{Binding Host}" Keyboard="Url" IsSpellCheckEnabled="false"/> <Entry Text="{Binding Host}" Keyboard="Url" IsSpellCheckEnabled="false"/>
<Button Text="Connect to Server" Command="{Binding ConnectToServerCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.AddServerProcess_SelectServerPage_Connect}" Command="{Binding ConnectToServerCommand}" Style="{StaticResource Style_Button_Primary}"/>
<Button Text="Scan QR-Code" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}"> <Button Text="{x:Static resource_text:TextResource.SCANQR}" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}">
<Button.IsVisible> <Button.IsVisible>
<OnPlatform x:TypeArguments="x:Boolean" <OnPlatform x:TypeArguments="x:Boolean"
iOS="false" iOS="false"

View File

@ -4,6 +4,7 @@
xmlns:views="clr-namespace:Borepin.View" xmlns:views="clr-namespace:Borepin.View"
x:Class="Borepin.Page.MachineListPage" x:Class="Borepin.Page.MachineListPage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Machines"> Title="Machines">
<NavigationPage.TitleView> <NavigationPage.TitleView>
<Button Text="Refresh" HorizontalOptions="End" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}" Command="{Binding RefreshCommand}"/> <Button Text="Refresh" HorizontalOptions="End" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}" Command="{Binding RefreshCommand}"/>
@ -21,7 +22,7 @@
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}"> <StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
<StackLayout IsVisible="{Binding IsConnected}"> <StackLayout IsVisible="{Binding IsConnected}">
<Button Text="Scan QR-Code" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}"> <Button Text="{x:Static resource_text:TextResource.SCANQR}" Command="{Binding ScanCodeCommand}" Style="{StaticResource Style_Button_Primary}">
<Button.IsVisible> <Button.IsVisible>
<OnPlatform x:TypeArguments="x:Boolean" <OnPlatform x:TypeArguments="x:Boolean"
iOS="True" iOS="True"
@ -39,7 +40,7 @@
</ListView> </ListView>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding IsConnected, Converter={StaticResource InvertBoolConverter}}"> <StackLayout IsVisible="{Binding IsConnected, Converter={StaticResource InvertBoolConverter}}">
<Label Text="Please connect to Server" ></Label> <Label Text="{x:Static resource_text:TextResource.PLEASECONNECTTOSERVER}" ></Label>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>

View File

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.MachinePage" x:Class="Borepin.Page.MachinePage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Machine"> Title="Machine">
<NavigationPage.TitleView> <NavigationPage.TitleView>
<Label Text="{Binding MachineItem.State, Converter={StaticResource MachineStateStringConverter}}" FontAttributes="Bold" HorizontalOptions="End" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" WidthRequest="150" Margin="7.5" VerticalOptions="FillAndExpand" FontSize="Small" BackgroundColor="{Binding MachineItem.State, Converter={StaticResource MachineStateColorConverter}}"/> <Label Text="{Binding MachineItem.State, Converter={StaticResource MachineStateStringConverter}}" FontAttributes="Bold" HorizontalOptions="End" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" WidthRequest="150" Margin="7.5" VerticalOptions="FillAndExpand" FontSize="Small" BackgroundColor="{Binding MachineItem.State, Converter={StaticResource MachineStateColorConverter}}"/>
@ -25,25 +26,25 @@
<Label Text="{Binding MachineItem.Name}" Style="{StaticResource LabelStyle_Title}"/> <Label Text="{Binding MachineItem.Name}" Style="{StaticResource LabelStyle_Title}"/>
<Label Text="{Binding MachineItem.Description}" Style="{StaticResource Style_Label_Text_Center}"/> <Label Text="{Binding MachineItem.Description}" Style="{StaticResource Style_Label_Text_Center}"/>
<StackLayout IsVisible="{Binding MachineItem.CanUse}"> <StackLayout IsVisible="{Binding MachineItem.CanUse}">
<Button Text="Use" Command="{Binding UseMachineCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.MachinePage_Use}" Command="{Binding UseMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding MachineItem.CanInUse}"> <StackLayout IsVisible="{Binding MachineItem.CanInUse}">
<Button Text="GiveBack" Command="{Binding GiveBackMachineCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.MachinePage_GiveBack}" Command="{Binding GiveBackMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding MachineItem.CurrentUser, Converter={StaticResource IsNotNullBoolConverter}}"> <StackLayout IsVisible="{Binding MachineItem.CurrentUser, Converter={StaticResource IsNotNullBoolConverter}}">
<Label Text="Current User:" Style="{StaticResource Style_Label_Property_Title}"/> <Label Text="{x:Static resource_text:TextResource.MachinePage_CurrentUser}" Style="{StaticResource Style_Label_Property_Title}"/>
<Label Text="{Binding MachineItem.CurrentUser.Username}" Style="{StaticResource Style_Label_Property_Text}"/> <Label Text="{Binding MachineItem.CurrentUser.Username}" Style="{StaticResource Style_Label_Property_Text}"/>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding MachineItem.LastUser, Converter={StaticResource IsNotNullBoolConverter}}"> <StackLayout IsVisible="{Binding MachineItem.LastUser, Converter={StaticResource IsNotNullBoolConverter}}">
<Label Text="Last User:" Style="{StaticResource Style_Label_Property_Title}"/> <Label Text="{x:Static resource_text:TextResource.MachinePage_LastUser}" Style="{StaticResource Style_Label_Property_Title}"/>
<Label Text="{Binding MachineItem.LastUser.Username}" Style="{StaticResource Style_Label_Property_Text}"/> <Label Text="{Binding MachineItem.LastUser.Username}" Style="{StaticResource Style_Label_Property_Text}"/>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding MachineItem.CanManage}"> <StackLayout IsVisible="{Binding MachineItem.CanManage}">
<Label Text="Manage Machine:" Style="{StaticResource Style_Label_Property_Title}"/> <Label Text="{x:Static resource_text:TextResource.MachinePage_ManageMachine}" Style="{StaticResource Style_Label_Property_Title}"/>
<Button Text="Force Free" Command="{Binding ForceFreeMachineCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.MachinePage_ForceFree}" Command="{Binding ForceFreeMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
<Label Text="Please connect to Server" IsVisible="{Binding IsConnected, Converter={StaticResource InvertBoolConverter}}"></Label> <Label Text="{x:Static resource_text:TextResource.PLEASECONNECTTOSERVER}" IsVisible="{Binding IsConnected, Converter={StaticResource InvertBoolConverter}}"></Label>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>

View File

@ -2,18 +2,19 @@
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms" <FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.MainPage" x:Class="Borepin.Page.MainPage"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="MainPage"> Title="MainPage">
<FlyoutPage.Flyout> <FlyoutPage.Flyout>
<ContentPage Title="FabAccess" BackgroundColor="{StaticResource SecondColor}"> <ContentPage Title="FabAccess" BackgroundColor="{StaticResource SecondColor}">
<StackLayout> <StackLayout>
<StackLayout Margin="0,50,0,0" 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="{x:Static resource_text:TextResource.MainPage_Machines}" Command="{Binding NavigateCommand}" CommandParameter="MachineListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
<Button Text="Users" IsVisible="{Binding CanManageUsers}" Command="{Binding NavigateCommand}" CommandParameter="UserListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/> <Button Text="{x:Static resource_text:TextResource.MainPage_Users}" IsVisible="{Binding CanManageUsers}" Command="{Binding NavigateCommand}" CommandParameter="UserListPage" 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="{x:Static resource_text:TextResource.MainPage_Servers}" Command="{Binding NavigateCommand}" CommandParameter="ServerListPage" VerticalOptions="Start" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
</StackLayout> </StackLayout>
<StackLayout Margin="0,0,0,10"> <StackLayout Margin="0,0,0,10">
<Label Text="{Binding CurrentVersion, StringFormat='Version: {0}'}" VerticalOptions="End" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/> <Label Text="{Binding CurrentVersion, StringFormat='{x:Static resource_text:TextResource.MainPage_Version}: {0}'}" VerticalOptions="End" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/>
<Label Text="{Binding CurrentBuild, StringFormat='Build: {0}'}" VerticalOptions="End" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/> <Label Text="{Binding CurrentBuild, StringFormat='{x:Static resource_text:TextResource.MainPage_Build}: {0}'}" VerticalOptions="End" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ContentPage> </ContentPage>

View File

@ -2,11 +2,12 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms" xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
x:Class="Borepin.Page.ScanPage"> x:Class="Borepin.Page.ScanPage">
<ContentPage.Content> <ContentPage.Content>
<StackLayout IsVisible="{Binding IsVisible}"> <StackLayout IsVisible="{Binding IsVisible}">
<zxing:ZXingScannerView Result="{Binding ScanResult, Mode=TwoWay}" ScanResultCommand="{Binding ScannedCommand}" IsScanning="{Binding IsScanning}" WidthRequest="300" HeightRequest="500" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" Options="{Binding ScanOptions}"/> <zxing:ZXingScannerView Result="{Binding ScanResult, Mode=TwoWay}" ScanResultCommand="{Binding ScannedCommand}" IsScanning="{Binding IsScanning}" WidthRequest="300" HeightRequest="500" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" Options="{Binding ScanOptions}"/>
<Button Text="Abort" Command="{Binding AbortCommand}"/> <Button Text="{x:Static resource_text:TextResource.ABORT}" Command="{Binding AbortCommand}"/>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>
</ContentPage> </ContentPage>

View File

@ -4,6 +4,7 @@
xmlns:views="clr-namespace:Borepin.View" xmlns:views="clr-namespace:Borepin.View"
x:Class="Borepin.Page.ServerListPage" x:Class="Borepin.Page.ServerListPage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Servers"> Title="Servers">
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -17,11 +18,11 @@
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator> <ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
</StackLayout> </StackLayout>
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}" VerticalOptions="FillAndExpand"> <StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}" VerticalOptions="FillAndExpand">
<Label Text="Active Connection" IsVisible="{Binding HasActiveConnection}"/> <Label Text="{x:Static resource_text:TextResource.ServerListPage_ActiveConnection}" IsVisible="{Binding HasActiveConnection}"/>
<StackLayout IsVisible="{Binding HasActiveConnection}"> <StackLayout IsVisible="{Binding HasActiveConnection}">
<views:ServerListItemView BindingContext="{Binding ActiveConnection}" MinimumHeightRequest="50"/> <views:ServerListItemView BindingContext="{Binding ActiveConnection}" MinimumHeightRequest="50"/>
</StackLayout> </StackLayout>
<Label Text="Last Connections" IsVisible="{Binding ServerListItemViewModel_List, Converter={StaticResource ListNotEmptyConverter}}"/> <Label Text="{x:Static resource_text:TextResource.ServerListPage_LastConnection}" IsVisible="{Binding ServerListItemViewModel_List, Converter={StaticResource ListNotEmptyConverter}}"/>
<ListView ItemsSource="{Binding ServerListItemViewModel_List}" SelectionMode="None" SeparatorColor="Transparent" VerticalOptions="StartAndExpand"> <ListView ItemsSource="{Binding ServerListItemViewModel_List}" SelectionMode="None" SeparatorColor="Transparent" VerticalOptions="StartAndExpand">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate> <DataTemplate>
@ -31,7 +32,7 @@
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>
</ListView> </ListView>
<Button Text="Connect to new Server" Command="{Binding AddInstancesCommand}" Style="{StaticResource Style_Button_Primary}" VerticalOptions="End"/> <Button Text="{x:Static resource_text:TextResource.ServerListPage_ConnectToNewServer}" Command="{Binding AddInstancesCommand}" Style="{StaticResource Style_Button_Primary}" VerticalOptions="End"/>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>

View File

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.ServerPage" x:Class="Borepin.Page.ServerPage"
xmlns:converters="clr-namespace:Borepin.Converter" xmlns:converters="clr-namespace:Borepin.Converter"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Server"> Title="Server">
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -22,12 +23,12 @@
<StackLayout Grid.Row="0"> <StackLayout Grid.Row="0">
<Label Text="{Binding DisplayAddress}" Style="{StaticResource LabelStyle_Title}"/> <Label Text="{Binding DisplayAddress}" Style="{StaticResource LabelStyle_Title}"/>
<Label Text="{Binding Connection_Item.Username}" Style="{StaticResource Style_Label_Text_Center}"/> <Label Text="{Binding Connection_Item.Username}" Style="{StaticResource Style_Label_Text_Center}"/>
<Button IsVisible="{Binding InstanceIsDefaultConnection, Converter={StaticResource InvertBoolConverter}}" Text="Set as Default Connection" Margin="0,10,0,0" Command="{Binding SetDefaultCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button IsVisible="{Binding InstanceIsDefaultConnection, Converter={StaticResource InvertBoolConverter}}" Text="{x:Static resource_text:TextResource.ServerPage_SetDefault}" Margin="0,10,0,0" Command="{Binding SetDefaultCommand}" Style="{StaticResource Style_Button_Primary}"/>
<Label IsVisible="{Binding InstanceIsDefaultConnection}" Text="Is Default Connection" Style="{StaticResource Style_Label_Text_Center}"/> <Label IsVisible="{Binding InstanceIsDefaultConnection}" Text="{x:Static resource_text:TextResource.ServerPage_IsDefault}" Style="{StaticResource Style_Label_Text_Center}"/>
<Button IsVisible="{Binding InstanceIsActiveConnection, Converter={StaticResource InvertBoolConverter}}" Text="Connect" Margin="0,10,0,0" Command="{Binding ConnectCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button IsVisible="{Binding InstanceIsActiveConnection, Converter={StaticResource InvertBoolConverter}}" Text="{x:Static resource_text:TextResource.ServerPage_Connect}" Margin="0,10,0,0" Command="{Binding ConnectCommand}" Style="{StaticResource Style_Button_Primary}"/>
<Button IsVisible="{Binding InstanceIsActiveConnection}" Text="Disconnect" Margin="0,10,0,0" Command="{Binding DisconnectCommand}" Style="{StaticResource Style_Button_Admin}"/> <Button IsVisible="{Binding InstanceIsActiveConnection}" Text="{x:Static resource_text:TextResource.ServerPage_Disconnect}" Margin="0,10,0,0" Command="{Binding DisconnectCommand}" Style="{StaticResource Style_Button_Admin}"/>
</StackLayout> </StackLayout>
<Button Grid.Row="1" Text="Delete" Command="{Binding DeleteCommand}" Style="{StaticResource Style_Button_Admin}" VerticalOptions="End"/> <Button Grid.Row="1" Text="{x:Static resource_text:TextResource.DELETE}" Command="{Binding DeleteCommand}" Style="{StaticResource Style_Button_Admin}" VerticalOptions="End"/>
</Grid> </Grid>
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>

View File

@ -2,14 +2,14 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.SetUpProcess.WelcomePage" x:Class="Borepin.Page.SetUpProcess.WelcomePage"
xmlns:resource="clr-namespace:Borepin.Resources.Text" xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="FabAccess"> Title="FabAccess">
<ContentPage.Content> <ContentPage.Content>
<ScrollView> <ScrollView>
<StackLayout Style="{StaticResource Style_StackLayout_Content}"> <StackLayout Style="{StaticResource Style_StackLayout_Content}">
<Label Text="{x:Static resource:TextResource.SetUp_WelcomePage_Title}" Style="{StaticResource Style_Label_Title_Center}"/> <Label Text="{x:Static resource_text:TextResource.SetUpProcess_WelcomePage_Title}" Style="{StaticResource Style_Label_Title_Center}"/>
<Label Text="{x:Static resource:TextResource.SetUp_WelcomePage_Text}" Style="{StaticResource Style_Label_Text_Center}"/> <Label Text="{x:Static resource_text:TextResource.SetUpProcess_WelcomePage_Text}" Style="{StaticResource Style_Label_Text_Center}"/>
<Button Text="{x:Static resource:TextResource.SetUp_WelcomePage_Button}" Command="{Binding NextCommand}" Style="{StaticResource Style_Button_Primary}"/> <Button Text="{x:Static resource_text:TextResource.SetUpProcess_WelcomePage_Button}" Command="{Binding NextCommand}" Style="{StaticResource Style_Button_Primary}"/>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
</ContentPage.Content> </ContentPage.Content>

View File

@ -2,16 +2,17 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.StartPage" x:Class="Borepin.Page.StartPage"
xmlns:resource_text="clr-namespace:Borepin.Resources.Text"
Title="Start"> Title="Start">
<ContentPage.Content> <ContentPage.Content>
<StackLayout Padding="20"> <StackLayout Padding="20">
<StackLayout IsVisible="{Binding IsBusy}" VerticalOptions="CenterAndExpand"> <StackLayout IsVisible="{Binding IsBusy}" VerticalOptions="CenterAndExpand">
<Label Text="Starting App" Style="{StaticResource Style_Label_Text_Center}"/> <Label Text="{x:Static resource_text:TextResource.StartPage_Starting}" Style="{StaticResource Style_Label_Text_Center}"/>
<ActivityIndicator IsRunning="{Binding IsBusy}"/> <ActivityIndicator IsRunning="{Binding IsBusy}"/>
</StackLayout> </StackLayout>
<ActivityIndicator IsRunning="{Binding IsBusy}"/> <ActivityIndicator IsRunning="{Binding IsBusy}"/>
<StackLayout IsVisible="{Binding IsConnecting}" VerticalOptions="CenterAndExpand"> <StackLayout IsVisible="{Binding IsConnecting}" VerticalOptions="CenterAndExpand">
<Label Text="Connecting to Server" Style="{StaticResource Style_Label_Text_Center}"/> <Label Text="{x:Static resource_text:TextResource.StartPage_Connecting}" Style="{StaticResource Style_Label_Text_Center}"/>
<ActivityIndicator IsRunning="{Binding IsConnecting}"/> <ActivityIndicator IsRunning="{Binding IsConnecting}"/>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>

View File

@ -2,7 +2,6 @@
using Prism.Commands; using Prism.Commands;
using Prism.Navigation; using Prism.Navigation;
using Prism.Services; using Prism.Services;
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
using Xamarin.Forms; using Xamarin.Forms;

View File

@ -10,6 +10,7 @@ using Prism.Services;
using Prism.Services.Dialogs; using Prism.Services.Dialogs;
using System; using System;
using System.Globalization; using System.Globalization;
using System.Resources;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
using Xamarin.Forms; using Xamarin.Forms;
@ -185,7 +186,7 @@ namespace Borepin.PageModel
{ {
_API.UnbindAllEvents(); _API.UnbindAllEvents();
await _API.Disconnect().ConfigureAwait(false); await _API.Disconnect().ConfigureAwait(false);
await LoadInstance(Connection_Item).ConfigureAwait(false); await LoadInstance(Connection_Item).ConfigureAwait(false);
} }

View File

@ -60,39 +60,363 @@ namespace Borepin.Resources.Text {
} }
} }
/// <summary>
/// Looks up a localized string similar to Abort.
/// </summary>
internal static string ABORT {
get {
return ResourceManager.GetString("ABORT", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Login.
/// </summary>
internal static string AddServerProcess_AuthPlainPage_Login {
get {
return ResourceManager.GetString("AddServerProcess_AuthPlainPage_Login", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Login with Card.
/// </summary>
internal static string AddServerProcess_ChooseAuthTypePage_LoginCard {
get {
return ResourceManager.GetString("AddServerProcess_ChooseAuthTypePage_LoginCard", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Login with Password.
/// </summary>
internal static string AddServerProcess_ChooseAuthTypePage_LoginPassword {
get {
return ResourceManager.GetString("AddServerProcess_ChooseAuthTypePage_LoginPassword", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Register.
/// </summary>
internal static string AddServerProcess_ChooseAuthTypePage_Register {
get {
return ResourceManager.GetString("AddServerProcess_ChooseAuthTypePage_Register", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Sign In:.
/// </summary>
internal static string AddServerProcess_ChooseAuthTypePage_SignIn {
get {
return ResourceManager.GetString("AddServerProcess_ChooseAuthTypePage_SignIn", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Sign Up:.
/// </summary>
internal static string AddServerProcess_ChooseAuthTypePage_SignUp {
get {
return ResourceManager.GetString("AddServerProcess_ChooseAuthTypePage_SignUp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connect to Server.
/// </summary>
internal static string AddServerProcess_SelectServerPage_Connect {
get {
return ResourceManager.GetString("AddServerProcess_SelectServerPage_Connect", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Delete.
/// </summary>
internal static string DELETE {
get {
return ResourceManager.GetString("DELETE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to host.
/// </summary>
internal static string HOST {
get {
return ResourceManager.GetString("HOST", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Current User:.
/// </summary>
internal static string MachinePage_CurrentUser {
get {
return ResourceManager.GetString("MachinePage_CurrentUser", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Force Free.
/// </summary>
internal static string MachinePage_ForceFree {
get {
return ResourceManager.GetString("MachinePage_ForceFree", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to GiveBack.
/// </summary>
internal static string MachinePage_GiveBack {
get {
return ResourceManager.GetString("MachinePage_GiveBack", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Last User:.
/// </summary>
internal static string MachinePage_LastUser {
get {
return ResourceManager.GetString("MachinePage_LastUser", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Manage Machine:.
/// </summary>
internal static string MachinePage_ManageMachine {
get {
return ResourceManager.GetString("MachinePage_ManageMachine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use.
/// </summary>
internal static string MachinePage_Use {
get {
return ResourceManager.GetString("MachinePage_Use", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Build.
/// </summary>
internal static string MainPage_Build {
get {
return ResourceManager.GetString("MainPage_Build", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Machines.
/// </summary>
internal static string MainPage_Machines {
get {
return ResourceManager.GetString("MainPage_Machines", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Servers.
/// </summary>
internal static string MainPage_Servers {
get {
return ResourceManager.GetString("MainPage_Servers", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Users.
/// </summary>
internal static string MainPage_Users {
get {
return ResourceManager.GetString("MainPage_Users", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Version.
/// </summary>
internal static string MainPage_Version {
get {
return ResourceManager.GetString("MainPage_Version", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to or.
/// </summary>
internal static string OR {
get {
return ResourceManager.GetString("OR", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Password.
/// </summary>
internal static string PASSWORD {
get {
return ResourceManager.GetString("PASSWORD", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please connect to Server.
/// </summary>
internal static string PLEASECONNECTTOSERVER {
get {
return ResourceManager.GetString("PLEASECONNECTTOSERVER", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Scan QR-Code.
/// </summary>
internal static string SCANQR {
get {
return ResourceManager.GetString("SCANQR", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Active Connection.
/// </summary>
internal static string ServerListPage_ActiveConnection {
get {
return ResourceManager.GetString("ServerListPage_ActiveConnection", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connect to new Server.
/// </summary>
internal static string ServerListPage_ConnectToNewServer {
get {
return ResourceManager.GetString("ServerListPage_ConnectToNewServer", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Last Connections.
/// </summary>
internal static string ServerListPage_LastConnection {
get {
return ResourceManager.GetString("ServerListPage_LastConnection", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connect.
/// </summary>
internal static string ServerPage_Connect {
get {
return ResourceManager.GetString("ServerPage_Connect", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disconnect.
/// </summary>
internal static string ServerPage_Disconnect {
get {
return ResourceManager.GetString("ServerPage_Disconnect", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Is Default Connection.
/// </summary>
internal static string ServerPage_IsDefault {
get {
return ResourceManager.GetString("ServerPage_IsDefault", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Set as Default Connection.
/// </summary>
internal static string ServerPage_SetDefault {
get {
return ResourceManager.GetString("ServerPage_SetDefault", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connection failed.
/// </summary>
internal static string ServerPageModel_ConnectionFailed {
get {
return ResourceManager.GetString("ServerPageModel_ConnectionFailed", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Login to your Space. /// Looks up a localized string similar to Login to your Space.
/// </summary> /// </summary>
internal static string SetUp_ScanPage_Button { internal static string SetUpProcess_ScanPage_Button {
get { get {
return ResourceManager.GetString("SetUp_ScanPage_Button", resourceCulture); return ResourceManager.GetString("SetUpProcess_ScanPage_Button", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Begin working. /// Looks up a localized string similar to Begin working.
/// </summary> /// </summary>
internal static string SetUp_WelcomePage_Button { internal static string SetUpProcess_WelcomePage_Button {
get { get {
return ResourceManager.GetString("SetUp_WelcomePage_Button", resourceCulture); return ResourceManager.GetString("SetUpProcess_WelcomePage_Button", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Automate your Space with FabAccess. /// Looks up a localized string similar to Automate your Space with FabAccess.
/// </summary> /// </summary>
internal static string SetUp_WelcomePage_Text { internal static string SetUpProcess_WelcomePage_Text {
get { get {
return ResourceManager.GetString("SetUp_WelcomePage_Text", resourceCulture); return ResourceManager.GetString("SetUpProcess_WelcomePage_Text", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Welcome. /// Looks up a localized string similar to Welcome.
/// </summary> /// </summary>
internal static string SetUp_WelcomePage_Title { internal static string SetUpProcess_WelcomePage_Title {
get { get {
return ResourceManager.GetString("SetUp_WelcomePage_Title", resourceCulture); return ResourceManager.GetString("SetUpProcess_WelcomePage_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connecting to Server.
/// </summary>
internal static string StartPage_Connecting {
get {
return ResourceManager.GetString("StartPage_Connecting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Starting App.
/// </summary>
internal static string StartPage_Starting {
get {
return ResourceManager.GetString("StartPage_Starting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Username.
/// </summary>
internal static string USERNAME {
get {
return ResourceManager.GetString("USERNAME", resourceCulture);
} }
} }
} }

View File

@ -117,16 +117,124 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="SetUp_ScanPage_Button" xml:space="preserve"> <data name="ABORT" xml:space="preserve">
<value>Abort</value>
</data>
<data name="AddServerProcess_AuthPlainPage_Login" xml:space="preserve">
<value>Login</value>
</data>
<data name="AddServerProcess_ChooseAuthTypePage_LoginCard" xml:space="preserve">
<value>Login with Card</value>
</data>
<data name="AddServerProcess_ChooseAuthTypePage_LoginPassword" xml:space="preserve">
<value>Login with Password</value>
</data>
<data name="AddServerProcess_ChooseAuthTypePage_Register" xml:space="preserve">
<value>Register</value>
</data>
<data name="AddServerProcess_ChooseAuthTypePage_SignIn" xml:space="preserve">
<value>Sign In:</value>
</data>
<data name="AddServerProcess_ChooseAuthTypePage_SignUp" xml:space="preserve">
<value>Sign Up:</value>
</data>
<data name="AddServerProcess_SelectServerPage_Connect" xml:space="preserve">
<value>Connect to Server</value>
</data>
<data name="DELETE" xml:space="preserve">
<value>Delete</value>
</data>
<data name="HOST" xml:space="preserve">
<value>host</value>
</data>
<data name="MachinePage_CurrentUser" xml:space="preserve">
<value>Current User:</value>
</data>
<data name="MachinePage_ForceFree" xml:space="preserve">
<value>Force Free</value>
</data>
<data name="MachinePage_GiveBack" xml:space="preserve">
<value>GiveBack</value>
</data>
<data name="MachinePage_LastUser" xml:space="preserve">
<value>Last User:</value>
</data>
<data name="MachinePage_ManageMachine" xml:space="preserve">
<value>Manage Machine:</value>
</data>
<data name="MachinePage_Use" xml:space="preserve">
<value>Use</value>
</data>
<data name="MainPage_Build" xml:space="preserve">
<value>Build</value>
</data>
<data name="MainPage_Machines" xml:space="preserve">
<value>Machines</value>
</data>
<data name="MainPage_Servers" xml:space="preserve">
<value>Servers</value>
</data>
<data name="MainPage_Users" xml:space="preserve">
<value>Users</value>
</data>
<data name="MainPage_Version" xml:space="preserve">
<value>Version</value>
</data>
<data name="OR" xml:space="preserve">
<value>or</value>
</data>
<data name="PASSWORD" xml:space="preserve">
<value>Password</value>
</data>
<data name="PLEASECONNECTTOSERVER" xml:space="preserve">
<value>Please connect to Server</value>
</data>
<data name="SCANQR" xml:space="preserve">
<value>Scan QR-Code</value>
</data>
<data name="ServerListPage_ActiveConnection" xml:space="preserve">
<value>Active Connection</value>
</data>
<data name="ServerListPage_ConnectToNewServer" xml:space="preserve">
<value>Connect to new Server</value>
</data>
<data name="ServerListPage_LastConnection" xml:space="preserve">
<value>Last Connections</value>
</data>
<data name="ServerPageModel_ConnectionFailed" xml:space="preserve">
<value>Connection failed</value>
</data>
<data name="ServerPage_Connect" xml:space="preserve">
<value>Connect</value>
</data>
<data name="ServerPage_Disconnect" xml:space="preserve">
<value>Disconnect</value>
</data>
<data name="ServerPage_IsDefault" xml:space="preserve">
<value>Is Default Connection</value>
</data>
<data name="ServerPage_SetDefault" xml:space="preserve">
<value>Set as Default Connection</value>
</data>
<data name="SetUpProcess_ScanPage_Button" xml:space="preserve">
<value>Login to your Space</value> <value>Login to your Space</value>
</data> </data>
<data name="SetUp_WelcomePage_Button" xml:space="preserve"> <data name="SetUpProcess_WelcomePage_Button" xml:space="preserve">
<value>Begin working</value> <value>Begin working</value>
</data> </data>
<data name="SetUp_WelcomePage_Text" xml:space="preserve"> <data name="SetUpProcess_WelcomePage_Text" xml:space="preserve">
<value>Automate your Space with FabAccess</value> <value>Automate your Space with FabAccess</value>
</data> </data>
<data name="SetUp_WelcomePage_Title" xml:space="preserve"> <data name="SetUpProcess_WelcomePage_Title" xml:space="preserve">
<value>Welcome</value> <value>Welcome</value>
</data> </data>
<data name="StartPage_Connecting" xml:space="preserve">
<value>Connecting to Server</value>
</data>
<data name="StartPage_Starting" xml:space="preserve">
<value>Starting App</value>
</data>
<data name="USERNAME" xml:space="preserve">
<value>Username</value>
</data>
</root> </root>