示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void _socketListenerManager_NewCommuniPortEvent(object sender, EventArgs e)
        {
            SocketListenerManager slMan = sender as SocketListenerManager;
            ICommuniPort          cp    = slMan.NewCommuniPort;

            Debug.Assert(cp != null);

            this.CommuniPortManager.Add(cp);
        }
示例#2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="soft"></param>
 public void Build(SocketListenerManager socketListenerManager)
 {
     XmlDocument doc = new XmlDocument();
     doc.Load(_filename);
     XmlNode node = doc.SelectSingleNode(XmlListenNodeNames.ListenPortCollection);
     if (node != null)
     {
         foreach (XmlNode n in node.ChildNodes)
         {
             if (n.Name == XmlListenNodeNames.ListenPort)
             {
                 int port = int.Parse(n.InnerText);
                 SocketListener sckListener = new SocketListener(port);
                 sckListener.Start();
                 socketListenerManager.Add(sckListener);
             }
         }
     }
 }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="soft"></param>
        public void Build(SocketListenerManager socketListenerManager)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(_filename);
            XmlNode node = doc.SelectSingleNode(XmlListenNodeNames.ListenPortCollection);

            if (node != null)
            {
                foreach (XmlNode n in node.ChildNodes)
                {
                    if (n.Name == XmlListenNodeNames.ListenPort)
                    {
                        int            port        = int.Parse(n.InnerText);
                        SocketListener sckListener = new SocketListener(port);
                        sckListener.Start();
                        socketListenerManager.Add(sckListener);
                    }
                }
            }
        }