Edit Username, New Chat Dialog
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using PolyChat.Models;
|
||||
using PolyChat.Util;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
||||
|
||||
@@ -17,19 +19,27 @@ namespace PolyChat.Views
|
||||
public NewChatDialog()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
IsPrimaryButtonEnabled = false;
|
||||
}
|
||||
|
||||
public string getText()
|
||||
public string getValue()
|
||||
{
|
||||
return inputIP.Text;
|
||||
return input.Text;
|
||||
}
|
||||
|
||||
public void OnConnect(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnClose(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
private void OnKeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
|
||||
{
|
||||
if (!IP.ValidateIP(IP.GetIPfromCode(input.Text)))
|
||||
{
|
||||
textSuccess.Visibility = Visibility.Collapsed;
|
||||
textError.Visibility = Visibility.Visible;
|
||||
IsPrimaryButtonEnabled = false;
|
||||
} else
|
||||
{
|
||||
textSuccess.Visibility = Visibility.Visible;
|
||||
textError.Visibility = Visibility.Collapsed;
|
||||
IsPrimaryButtonEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user