예제 #1
0
파일: Form1.cs 프로젝트: zmm623/IKendeLib
 public void ClientDisposed(Beetle.NetPackage.NetClient client)
 {
     Invoke(new Action <NetClient>(c =>
     {
         txtStatus.Text = "close!";
     }), client);
 }
예제 #2
0
파일: Form1.cs 프로젝트: zmm623/IKendeLib
 public void Connected(Beetle.NetPackage.NetClient client)
 {
     Invoke(new Action <NetClient>(c =>
     {
         txtStatus.Text = "connected!";
     }), client);
 }
예제 #3
0
파일: Form1.cs 프로젝트: zmm623/IKendeLib
 public void ClientError(Beetle.NetPackage.NetClient client, Exception e)
 {
     Invoke(new Action <Exception>(err =>
     {
         txtError.Text = err.Message;
     }), e);
 }
예제 #4
0
파일: Form1.cs 프로젝트: zmm623/IKendeLib
 public void ClientReceive(Beetle.NetPackage.NetClient client, object message)
 {
     if (message is Register)
     {
         Invoke(new Action <Register>(msg => {
             txtRegTime.Text = msg.RegTime.ToString();
         }), message as Register);
     }
 }
예제 #5
0
        public static void Invoke(Object actionobj, NetClient client, Object message)
        {
            lock (mActions)
            {

                Type key = actionobj.GetType();
                ControllerAction action = null;
                if (!mActions.TryGetValue(key, out action))
                {
                    action = new ControllerAction(key);
                    mActions[key] = action;
                }
                action.Invoke(actionobj, client, message);
            }
        }
예제 #6
0
        public void Invoke(Object action, NetClient client, Object message)
        {
            MethodInfo method = null;
            if (mMethods.TryGetValue(message.GetType(), out method))
            {
                try
                {
                    method.Invoke(action, new object[] {client,message });
                }
                catch (Exception e)
                {

                }
            }

        }
예제 #7
0
파일: Form1.cs 프로젝트: zmm623/IKendeLib
 private void Form1_Load(object sender, EventArgs e)
 {
     mClient = new Beetle.NetPackage.NetClient("127.0.0.1", 9088, new NPPackage(), this);
     mClient.LittleEndian = false;
     mClient.Connect();
 }
예제 #8
0
파일: Form1.cs 프로젝트: hdxhan/IKendeLib
 private void Form1_Load(object sender, EventArgs e)
 {
     mClient = new Beetle.NetPackage.NetClient("127.0.0.1", 9088, new NPPackage(), this);
     mClient.LittleEndian = false;
     mClient.Connect();
 }