Connect new tab

This commit is contained in:
fabjuuuh
2020-10-07 14:56:04 +02:00
parent aea1b4fce4
commit acbe3e9d55
8 changed files with 59 additions and 29 deletions

View File

@@ -20,6 +20,7 @@ namespace DokterApp
/// </summary>
public partial class MainWindow : Window
{
Del handler;
Client client;
public MainWindow()
{
@@ -27,18 +28,27 @@ namespace DokterApp
}
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
{
}
private void Login_Click_1(object sender, RoutedEventArgs e)
{
WindowTabs windowTabs = new WindowTabs();
handler = windowTabs.NewTab;
this.Label.Content = "Waiting";
this.client = new Client("localhost", 5555, this.Username.Text, this.Password.Text, handler);
while (!client.IsConnected())
{
}
windowTabs.Show();
this.client = new Client("localhost", 5555, this.Username.Text, this.Password.Text);
this.Close();
}
}
public delegate void Del(string message);
}