示例#1
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            CodeInputContent cic = new CodeInputContent(this.metroTextBox1.Text, this.username);
            Thread           th1 = new Thread(() => SendCondeInputContent(cic));

            th1.Start();
        }
示例#2
0
        private void SendCondeInputContent(CodeInputContent cic)
        {
            if (ConnectionClass.ClientTCP == null)
            {
                //SetGif(false, true);
                MessageBox.Show("Sunteti momentan offline", "Tiroida");
                return;
            }

            if (ConnectionClass.ClientTCP != null)
            {
                string datatosend = JsonConvert.SerializeObject(cic);
                ConnectionClass.ClientTCP.SendContent(datatosend);
                ConnectionClass.ClientTCP.OnCodeVerifyResponse += ClientTCP_OnCodeVerifyResponse;
            }
        }