Ejemplo n.º 1
0
 public TcpWatcherForm(MessageInfoHandle msgHandle)
 {
     InitializeComponent();
     FormHelper.InitHabitToForm(this);
     if (msgHandle == null)
     {
         this.msgHandle = new MessageInfoHandle(ParseMessage);
     }
     else
     {
         this.msgHandle = msgHandle;
     }
     LogHandle log = new LogHandle(Log);
     tcpServerHelper = new TcpServerHelper(this.msgHandle, log);
     this.tcpServerHelper.Parent = this;
     this.tcpServerHelper.ClientClose += new TcpEvent(tcpServerHelper_ClientClose);
     this.tcpServerHelper.ClientConn += new TcpEvent(tcpServerHelper_ClientConn);
     /*
     �����Ҫ���ͻ��˷�����Ϣ��ʹ�����
     OrgInfo org = new OrgInfo();
     org.FullName = "XX��֯";
     org.NickName = "xx";
     org.Telephone = "tel";
     org.Url = "url";
     MessageFactory.InitOrg(org);
      */
 }
Ejemplo n.º 2
0
        public TcpWatcherForm(MessageInfoHandle msgHandle)
        {
            InitializeComponent();
            FormHelper.InitHabitToForm(this);
            if (msgHandle == null)
            {
                this.msgHandle = new MessageInfoHandle(ParseMessage);
            }
            else
            {
                this.msgHandle = msgHandle;
            }
            LogHandle log = new LogHandle(Log);

            tcpServerHelper                   = new TcpServerHelper(this.msgHandle, log);
            this.tcpServerHelper.Parent       = this;
            this.tcpServerHelper.ClientClose += new TcpEvent(tcpServerHelper_ClientClose);
            this.tcpServerHelper.ClientConn  += new TcpEvent(tcpServerHelper_ClientConn);

            /*
             * 如果需要给客户端发送消息则使用这个
             * OrgInfo org = new OrgInfo();
             * org.FullName = "XX组织";
             * org.NickName = "xx";
             * org.Telephone = "tel";
             * org.Url = "url";
             * MessageFactory.InitOrg(org);
             */
        }
Ejemplo n.º 3
0
 public static void InitMsgHandle(MessageInfoHandle handle)
 {
     //logHandle = handle;
     if (clientHelper != null)
     {
         clientHelper.MsgHandle = handle;
     }
 }
Ejemplo n.º 4
0
 public static void InitMsgHandle(MessageInfoHandle handle)
 {
     //logHandle = handle;
     if (clientHelper != null)
     {
         clientHelper.MsgHandle = handle;
     }
 }
Ejemplo n.º 5
0
        public TcpIpTestForm()
        {
            InitializeComponent();
            MessageInfoHandle handle = new MessageInfoHandle(ParseMessage);
            LogHandle         log    = new LogHandle(Log);

            tcpClientHelper             = new TcpClientHelper(handle, log);
            tcpServerHelper             = new TcpServerHelper(handle, log);
            this.tcpServerHelper.Parent = this;
            this.tcpClientHelper.Parent = this;
            OrgInfo org = new OrgInfo();

            org.FullName  = "XX×éÖ¯";
            org.NickName  = "Ì©´ï¼ÝУ";
            org.Telephone = "tel";
            org.Url       = "url";
            MessageFactory.InitOrg(org);
        }
Ejemplo n.º 6
0
 public TcpServerHelper(MessageInfoHandle msgHandle, LogHandle logHandle)
     : base(msgHandle, logHandle)
 {
 }
Ejemplo n.º 7
0
 public static void InitMsgHandle(MessageInfoHandle handle)
 {
     msgHandle = handle;
 }
Ejemplo n.º 8
0
 public TcpClientHelper(MessageInfoHandle msgHandle, LogHandle logHandle) : base(msgHandle, logHandle)
 {
 }
Ejemplo n.º 9
0
 public TcpBase(MessageInfoHandle msgHandle, LogHandle logHandle)
 {
     this.msgHandle = msgHandle;
     this.logHandle = logHandle;
 }
Ejemplo n.º 10
0
 public TcpBase(MessageInfoHandle msgHandle)
 {
     this.msgHandle = msgHandle;
 }
Ejemplo n.º 11
0
 public TcpClientHelper(MessageInfoHandle msgHandle, LogHandle logHandle)
     : base(msgHandle,logHandle)
 {
 }
Ejemplo n.º 12
0
 public TcpBase(MessageInfoHandle msgHandle, LogHandle logHandle)
 {
     this.msgHandle = msgHandle;
     this.logHandle = logHandle;
 }
Ejemplo n.º 13
0
 public TcpBase(MessageInfoHandle msgHandle)
 {
     this.msgHandle = msgHandle;
 }
Ejemplo n.º 14
0
 public TcpServerHelper(MessageInfoHandle msgHandle, LogHandle logHandle)
     : base(msgHandle, logHandle)
 {
 }