diff --git a/Client/Client.cs b/Client/Client.cs index e9715b9..7e36c2f 100644 --- a/Client/Client.cs +++ b/Client/Client.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Net.Sockets; using System.Text; @@ -55,7 +55,7 @@ namespace Client this.stream = this.client.GetStream(); - tryLoginDoctor("hi","hi"); + tryLogin(); this.stream.BeginRead(this.buffer, 0, this.buffer.Length, new AsyncCallback(OnRead), null); } @@ -94,7 +94,7 @@ namespace Client if (responseStatus == "OK") { this.connected = true; - initEngine(); + //initEngine(); } else { diff --git a/Client/Program.cs b/Client/Program.cs index 89ed605..aa63eab 100644 --- a/Client/Program.cs +++ b/Client/Program.cs @@ -4,6 +4,7 @@ using Hardware.Simulators; using RH_Engine; using System.Security.Cryptography; using System.Text; +using System.Threading; namespace Client { @@ -14,6 +15,7 @@ namespace Client Console.WriteLine("Hello World!"); //connect fiets? + Thread.Sleep(20000); Client client = new Client(); diff --git a/DokterApp/Client.cs b/DokterApp/Client.cs index 98f6224..c9f0f73 100644 --- a/DokterApp/Client.cs +++ b/DokterApp/Client.cs @@ -18,10 +18,12 @@ namespace DokterApp private IHandler handler = null; private string username; private string password; + private Del callback; - public Client(string adress, int port, string username, string password) + public Client(string adress, int port, string username, string password, Del callback) { + this.callback = callback; this.username = username; this.password = password; this.client = new TcpClient(); @@ -82,8 +84,9 @@ namespace DokterApp } else { + callback("yeet"); Console.WriteLine($"login failed \"{responseStatus}\""); - tryLogin(); + //tryLogin(); } break; case DataParser.START_SESSION: @@ -173,14 +176,6 @@ namespace DokterApp private void tryLogin() { //TODO File in lezen - /*Console.WriteLine("enter username"); - string username = Console.ReadLine(); - Console.WriteLine("enter password"); - string password = Console.ReadLine();*/ - - - - string hashUser = Hashing.Hasher.HashString(username); string hashPassword = Hashing.Hasher.HashString(password); diff --git a/DokterApp/MainWindow.xaml b/DokterApp/MainWindow.xaml index 092c8e5..59aedc4 100644 --- a/DokterApp/MainWindow.xaml +++ b/DokterApp/MainWindow.xaml @@ -17,7 +17,7 @@ -