示例#1
0
 private void OnPerson(object param)
 {
     if (param is MsgPerson)
     {
         MsgPerson p = param as MsgPerson;
         Debug.LogErrorFormat(">>>> LoginBusiness OnPerson name = {0} email = {1} id = {2} ", p.Name, p.Email, p.Id);
     }
 }
示例#2
0
        private void OnSendButton(object param)
        {
            if (param is string)
            {
                string str = (string)param;
                if (string.IsNullOrEmpty(str))
                {
                    Debug.LogErrorFormat("OnSendButton str IsNullOrEmpty");
                    return;
                }

                MsgPerson p = new MsgPerson();
                p.Name  = "huangqiaoping_hahaha";
                p.Email = "*****@*****.**";
                p.Id    = 222;

                IBaseMessage msg = ReceiverHelper.PopMessage();
                msg.WriteIn(p, DefineProtobuf.MSG_PERSON);
                CoreModules.netMDL.SendMessage(msg);
                Debug.LogErrorFormat("OnSendButton str = {0}", str);
            }
        }