Can now somewhat reliably join a party

This commit is contained in:
watsonb8
2019-07-06 15:52:28 -04:00
parent 0d64c0732e
commit 2a3290defc
15 changed files with 140 additions and 125 deletions

View File

@ -20,11 +20,6 @@
VerticalOptions="Center"/>
<Entry
x:Name="HostnameEntry"/>
<Label
Text="Port"
VerticalOptions="Center"/>
<Entry
x:Name="PortEntry"/>
<Button
HorizontalOptions="Center"
x:Name="buttonHost"

View File

@ -31,10 +31,6 @@ namespace Aurora.Design.Components.HostSelector
{
Hostname = e.NewTextValue;
};
PortEntry.TextChanged += (sender, e) =>
{
Port = e.NewTextValue;
};
}
@ -119,33 +115,6 @@ namespace Aurora.Design.Components.HostSelector
#endregion Hostname property
#region Port property
public static readonly BindableProperty PortProperty =
BindableProperty.Create(propertyName: "Port",
returnType: typeof(string),
declaringType: typeof(HostSelector),
defaultBindingMode: BindingMode.TwoWay,
propertyChanged: OnPortChanged);
public string Port
{
get { return (string)GetValue(PortProperty); }
set { SetValue(PortProperty, value); }
}
private static void OnPortChanged(BindableObject bindable, object oldValue, object newValue)
{
string newVal = newValue as string;
HostSelector instance = bindable as HostSelector;
if (instance.PortEntry.Text != newVal)
{
instance.PortEntry.Text = newVal;
}
}
#endregion Port property
}