Forráskód Böngészése

New loginscreen, fixed some display bugs

jancoow 10 éve
szülő
commit
594039f02c

+ 5 - 2
Proftaak Remote Healthcare/FietsClientV2/DataHandler.cs

@@ -96,8 +96,11 @@ namespace FietsClient
 
         public void sendData(string data)
         {
-            bufferOut = data;
-            ComPort.WriteLine(data);
+            if (ComPort != null || ComPort.IsOpen)
+            {
+                bufferOut = data;
+                ComPort.WriteLine(data);
+            }
         }
 
         private void ComPort_DataReceived(object sender, SerialDataReceivedEventArgs e)

+ 3 - 1
Proftaak Remote Healthcare/FietsClientV2/Forms/Login.Designer.cs

@@ -60,7 +60,7 @@
             this.label2.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.label2.Location = new System.Drawing.Point(64, 179);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(104, 30);
+            this.label2.Size = new System.Drawing.Size(105, 30);
             this.label2.TabIndex = 1;
             this.label2.Text = "Password:";
             // 
@@ -79,8 +79,10 @@
             this.PasswordBox.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.PasswordBox.Location = new System.Drawing.Point(222, 186);
             this.PasswordBox.Name = "PasswordBox";
+            this.PasswordBox.PasswordChar = '♥';
             this.PasswordBox.Size = new System.Drawing.Size(223, 20);
             this.PasswordBox.TabIndex = 3;
+            this.PasswordBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PasswordBox_KeyDown);
             // 
             // SubmitButton
             // 

+ 8 - 1
Proftaak Remote Healthcare/FietsClientV2/Forms/Login.cs

@@ -92,6 +92,13 @@ namespace FietsClient
             }
 
         }
-    }
 
+        private void PasswordBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                SubmitButton_Click(this, new EventArgs());
+            }
+        }
+    }
 }

+ 1 - 1
Proftaak Remote Healthcare/FietsClientV2/TCPConnection.cs → Proftaak Remote Healthcare/FietsClientV2/TcpConnection.cs

@@ -52,7 +52,7 @@ namespace FietsClient
         {
             try
             {
-                client.Connect("brdk.nl", 1288);
+                client.Connect("localhost", 1288);
 
 
                 // create streams