mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 23:01:52 +01:00
Added Connect Timeout
This commit is contained in:
parent
6bbf25a63e
commit
8b818d5873
@ -26,6 +26,7 @@
|
|||||||
Android="true"/>
|
Android="true"/>
|
||||||
</Button.IsVisible>
|
</Button.IsVisible>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Label Text="{x:Static resource_text:TextResource.AddServerProcess_SelectServerPage_Info}"></Label>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage.Content>
|
</ContentPage.Content>
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<Button Text="{x:Static resource_text:TextResource.MainPage_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='{x:Static resource_text:TextResource.MainPage_Version}: {0}'}" VerticalOptions="End" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/>
|
<Label Text="{Binding CurrentVersion, StringFormat='Version: {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}"/>
|
<Label Text="{Binding CurrentBuild, StringFormat='Build: {0}'}" VerticalOptions="End" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
63
Borepin/Borepin/Properties/Resources.Designer.cs
generated
63
Borepin/Borepin/Properties/Resources.Designer.cs
generated
@ -1,63 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// Dieser Code wurde von einem Tool generiert.
|
|
||||||
// Laufzeitversion:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
|
||||||
// der Code erneut generiert wird.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace Borepin.Properties {
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
|
||||||
/// </summary>
|
|
||||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
|
||||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
|
||||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
|
||||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
internal class Resources {
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
|
||||||
internal Resources() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
|
||||||
get {
|
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Borepin.Properties.Resources", typeof(Resources).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
|
||||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
|
||||||
get {
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 1.3
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">1.3</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1">this is my long string</data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
[base64 mime encoded serialized .NET Framework object]
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>1.3</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
@ -132,6 +132,15 @@ namespace Borepin.Resources.Text {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to PLACEHOLDER.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AddServerProcess_SelectServerPage_Info {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AddServerProcess_SelectServerPage_Info", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Delete.
|
/// Looks up a localized string similar to Delete.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -142,7 +151,7 @@ namespace Borepin.Resources.Text {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to host.
|
/// Looks up a localized string similar to Host.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string HOST {
|
internal static string HOST {
|
||||||
get {
|
get {
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
@ -141,11 +141,15 @@
|
|||||||
<data name="AddServerProcess_SelectServerPage_Connect" xml:space="preserve">
|
<data name="AddServerProcess_SelectServerPage_Connect" xml:space="preserve">
|
||||||
<value>Connect to Server</value>
|
<value>Connect to Server</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AddServerProcess_SelectServerPage_Info" xml:space="preserve">
|
||||||
|
<value>PLACEHOLDER</value>
|
||||||
|
<comment>Server Struktur erklären, auf QR-Code hinweisen, ansonsten im Space fragen</comment>
|
||||||
|
</data>
|
||||||
<data name="DELETE" xml:space="preserve">
|
<data name="DELETE" xml:space="preserve">
|
||||||
<value>Delete</value>
|
<value>Delete</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="HOST" xml:space="preserve">
|
<data name="HOST" xml:space="preserve">
|
||||||
<value>host</value>
|
<value>Host</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MachinePage_CurrentUser" xml:space="preserve">
|
<data name="MachinePage_CurrentUser" xml:space="preserve">
|
||||||
<value>Current User:</value>
|
<value>Current User:</value>
|
||||||
|
@ -64,6 +64,11 @@
|
|||||||
<Setter Property="HorizontalOptions" Value="CenterAndExpand"/>
|
<Setter Property="HorizontalOptions" Value="CenterAndExpand"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Style_Label_Text" TargetType="Label">
|
||||||
|
<Setter Property="Margin" Value="0, 0, 0, 10"/>
|
||||||
|
<Setter Property="HorizontalOptions" Value="StartAndExpand"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Style_Label_Property_Title" TargetType="Label">
|
<Style x:Key="Style_Label_Property_Title" TargetType="Label">
|
||||||
<Setter Property="FontSize" Value="Default"/>
|
<Setter Property="FontSize" Value="Default"/>
|
||||||
<Setter Property="FontAttributes" Value="Bold"/>
|
<Setter Property="FontAttributes" Value="Bold"/>
|
||||||
|
@ -225,12 +225,18 @@ namespace FabAccessAPI
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
rpcClient.Connect(connectionData.Host.Host, connectionData.Host.Port);
|
Task timeoutTask = Task.Delay(3000);
|
||||||
await rpcClient.WhenConnected.ConfigureAwait(false);
|
rpcClient.Connect(connectionData.Host.Host, connectionData.Host.Port);
|
||||||
|
await await Task.WhenAny(rpcClient.WhenConnected, timeoutTask);
|
||||||
|
|
||||||
|
if(timeoutTask.IsCompleted)
|
||||||
|
{
|
||||||
|
throw new ConnectingFailedException("Connection timeout");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (RpcException exception) when (string.Equals(exception.Message, "TcpRpcClient is unable to connect", StringComparison.Ordinal))
|
catch (RpcException exception) when (string.Equals(exception.Message, "TcpRpcClient is unable to connect", StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
throw new ConnectingFailedException("Connecting failed", exception);
|
throw new ConnectingFailedException("RPC Connecting failed", exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
external/capnproto-dotnetcore
vendored
2
external/capnproto-dotnetcore
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 0176a503c8d0b0be66e0212e04200c8324e11fd9
|
Subproject commit 086bbc2497785d2cc63e9252df6f6d3ee7599579
|
Loading…
x
Reference in New Issue
Block a user