Can now somewhat reliably join a party
This commit is contained in:
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user