Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
//             conn = new CJConnect();
//             conn.ReceiveOver += new DelegateConnectHandle(this.receive_Over);
//             string sendstr = textBox1.Text == "" ? "f**k" : textBox1.Text;
//             msg = new CJMsg();
//             msg.setMsgType(MsgType.C_CONNECT,msg_seq++);
//             msg.setMsgFromNode(local_ip.ToString(),local_port,"1001","cjstudio");
//             msg.setMsgToNode(server_ip.ToString(),server_port,"10000","server");
//             msg.addMsgText("hello serverPC");
//             msg.addMsgData_Attr("name", "wangcj");
//             msg.setMsgHash();
//             conn.msg_send = msg;
//             sendstr = conn.msg_send.ToString();
//             //conn.udp_sendMsg();
//             textBox2.Text = sendstr;
//             ub.Location = new Point(20, 200);
//             this.Controls.Add(ub);
            //             ub.Show();
            form.UserListBox ul = new form.UserListBox();
            ub.Location  = new Point(50, 50);
            ub.BackColor = Color.White;
            this.Controls.Add(ul);
            ul.Show();
        }
Exemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Icon icon = new Icon(icoDir + "mine.ico");

            this.Icon = icon;

            notifyIcon1.Icon      = new Icon(icoDir + "mine.ico");
            pictureBox1.BackColor = Color.Transparent;
            pictureBox1.Image     = Image.FromFile(imgDir + "close.png");

            ul           = new form.UserListBox(user_local);
            ul.Location  = new Point(0, 60);
            ul.BackColor = Color.White;
            this.Controls.Add(ul);
            ul.Show();
        }