public void CreateNewTest(char geslacht, int leeftijd, int gewicht, int lengte)
 {
     panelTopBar.Visible = true;
     panelClientContainer.BringToFront();
     chat = panelClientChat;
     MainClient.SendNetCommand(new NetCommand(gewicht, lengte, leeftijd, geslacht, MainClient.Session));
     MainClient.ComPort.Write("RS");
     MainClient.ComPort.Read();
     Thread.Sleep(200);
     MainClient.ComPort.Write("CM");
     MainClient.ComPort.Read();
     ergotest = new ErgometerTest(gewicht, lengte, leeftijd, geslacht, this);
     updateTimer.Start();
     beeptimer.Start();
 }
        private void logout(string message, System.Drawing.Color cl)
        {
            MainClient.Disconnect();
            updateTimer.Stop();
            beeptimer.Stop();

            ergotest = null;

            panelTopBar.Visible                  = false;
            panelLogin.lblVerification.Text      = message;
            panelLogin.lblVerification.ForeColor = cl;
            panelLogin.lblVerification.Visible   = true;
            panelLogin.textBoxUsername.Text      = "";
            panelLogin.textBoxPassword.Text      = "";

            panelLogin.BringToFront();
        }