コード例 #1
0
        /// <summary>
        /// lgid ip:port ukey
        /// 1 127.0.0.1:9999
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            if (args.Length != 3)
            {
                Console.WriteLine("参数不正确,格式 lgid ip:port ukey"); return;
            }

            ukey = args[2];
            lgid = int.Parse(args[0]);

            new Thread(o =>
            {
                var svr    = args[1].Split(':');
                tc         = new Tc(svr[0], int.Parse(svr[1]));
                tc.Closed += Tc_Closed;
                tc.NewMsg += Tc_NewMsg;
                tc.Run(ukey, lgid);
            }).Start();

            Thread.Sleep(500);

            new Thread(o =>
            {
                wx         = new App.Wx(lgid);
                wx.LoadQr += Wx_LoadQr;
                wx.Scaned += Wx_Scaned;
                wx.Loged  += Wx_Loged;
                wx.Logout += Wx_Logout;
                wx.NewMsg += Wx_NewMsg;
                wx.Run();
            }).Start();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: hongweichang/x.rbt
        private void button1_Click(object sender, EventArgs e)
        {
            int id = int.Parse(listBox1.SelectedItem + "");

            ((Action) delegate()
            {
                wx = new App.Wx(id);
                wx.LoadQr += Wx_LoadQr;
                wx.Scaned += Wx_Scaned;
                wx.Loged += Wx_Loged;
                wx.Logout += Wx_Logout;
                wx.NewMsg += Wx_NewMsg;
                wx.OutLog += Wx_OutLog;
                wx.Run();
            }).BeginInvoke(null, null);
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: hongweichang/x.rbt
 private void Wx_Loged(App.Wx w)
 {
 }