Esempio n. 1
0
 void btn_disconnect_Click(object sender, EventArgs e)
 {
     if (client == null)
     {
         return;
     }
     client.Disconnect();
     client = null;
 }
Esempio n. 2
0
        void btn_connect_Click(object sender, EventArgs e)
        {
            client = new my_client("android");
            statics.loadXML_config();
            client.ip           = statics.main_config.remote_ip;
            client.port         = statics.main_config.remote_port;
            client.get_message += client_get_message;
            //client.get_event += client_get_event;
            bool resut = client.Connect();

            if (resut)
            {
                statics.show_success("Well done :)", this);
            }
            else
            {
                statics.show_error("Something went wrong :(", this);
            }
        }