// ------------------------------------------------------------------------------------------
        private void buttonServer_Click(object sender, EventArgs e)
        {
            Errors error_code = Errors.NO_ERROR;

            if (!DataCheck.CheckLogin(textBoxMenuLogin.Text, out error_code))
            {
                Messages.IncorrectLoginError(error_code);
            }
            if (!DataCheck.CheckIP(textBoxMenuIP.Text, out error_code))
            {
                Messages.IncorrectIPError(error_code);
            }
            if (!DataCheck.CheckPort(textBoxMenuPort.Text, out error_code))
            {
                Messages.IncorrectPortError(error_code);
            }
            int.TryParse(textBoxMenuPort.Text, out int port);

            server                    = new Server(textBoxMenuLogin.Text, textBoxMenuIP.Text, port);
            server.SrvOutput          = textBoxServerConsole;
            server.FuncShutDown       = ServerLogout;
            panelMenu.Visible         = false;
            panelServer.Visible       = true;
            menuServer.Visible        = true;
            textBoxServerConsole.Text = "";
            bgWorkerMenuTime.WorkerSupportsCancellation = true;
            bgWorkerMenuTime.RunWorkerAsync();
            server.Start();
        }
        // ##########################################################################################
        //  xxx     x   x   xxxxx   xxxxx    xxx    x   x    xxxx
        //  x  x    x   x     x       x     x   x   xx  x   x
        //  xxxx    x   x     x       x     x   x   x x x    xxx
        //  x   x   x   x     x       x     x   x   x  xx       x
        //  xxxx     xxx      x       x      xxx    x   x   xxxx
        // ##########################################################################################
        private void buttonClient_Click(object sender, EventArgs e)
        {
            Errors    error_code = Errors.NO_ERROR;
            CryptType ctype      = (CryptType)comboBoxMenuCrypt.SelectedIndex;

            if (!DataCheck.CheckLogin(textBoxMenuLogin.Text, out error_code))
            {
                Messages.IncorrectLoginError(error_code);
            }
            if (!DataCheck.CheckIP(textBoxMenuIP.Text, out error_code))
            {
                Messages.IncorrectIPError(error_code);
            }
            if (!DataCheck.CheckPort(textBoxMenuPort.Text, out error_code))
            {
                Messages.IncorrectPortError(error_code);
            }
            int.TryParse(textBoxMenuPort.Text, out int port);

            client                     = new Client(textBoxMenuLogin.Text, textBoxMenuIP.Text, port, ctype);
            client.CliOutput           = rTextBoxClientMessage;
            client.CliList             = listViewClientUsers;
            client.FuncShowMessage     = ClientShowMessage;
            client.FuncDisconnect      = ClientDisableSend;
            client.FuncShutDown        = ClientLogout;
            panelMenu.Visible          = false;
            panelClient.Visible        = true;
            menuClient.Visible         = true;
            textBoxClient.Enabled      = true;
            buttonClientSend.Enabled   = true;
            rTextBoxClientMessage.Text = "";
            bgWorkerMenuTime.WorkerSupportsCancellation = true;
            bgWorkerMenuTime.RunWorkerAsync();
            client.Start();
        }