예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="hostBacker"></param>
        /// <param name="strPath"></param>
        /// <param name="configPath"></param>
        public static void StartTcpUpdateTime(HostBack.DataSave sqlSave, string strPath, string configPath)
        {
            TcpClientUpdateTimer tcpClinetUpdateTime = new TcpClientUpdateTimer(sqlSave, strPath, configPath, SocketPackets);

            tcpClinetUpdateTime.StartTimer();
            tcpClinetUpdateTime.NetInfoChange += new TcpClientUpdateTimer.NetInfoChangeEventHandler(tcpClinetUpdateTime_NetInfoChange);
        }
예제 #2
0
        /// <summary>
        /// 开始定时更新基站
        /// </summary>
        /// <param name="sqlSave">从数据库中取出的基站数据</param>
        /// <param name="commType">通讯模式</param>
        /// <param name="strPath">station.xml文件路径</param>
        /// <param name="configPath">所设置的间隔时间</param>
        public static void StartStationUpdateTimer(HostBack.DataSave sqlSave, bool commType, string strPath, string configPath)
        {
            StationUpdateTimer stationUpdateTime = new StationUpdateTimer(sqlSave, commType, strPath, configPath, memStation);

            stationUpdateTime.StartTimer();
            stationUpdateTime.StationInfoChange += new StationUpdateTimer.StationInfoChangeEventHandler(stationUpdateTime_StationInfoChange);
        }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="hostBacker"></param>
 /// <param name="strpath"></param>
 /// <param name="configpath"></param>
 /// <param name="memStation"></param>
 public StationUpdateTimer(HostBack.DataSave sqlSave, bool commType, string strpath, string configpath, MemStation[] memStation)
 {
     this.sqlSave               = sqlSave;
     this._commType             = commType;
     this.StationXmlFilePath    = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + strpath;
     this.StationConfigFilePath = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + configpath;
     this.memStation            = memStation;
     stationChangeTime.Interval = 5000;
     stationChangeTime.Tick    += new EventHandler(stationChangeTime_Tick);
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="hostBacker"></param>
 /// <param name="strpath"></param>
 /// <param name="configpath"></param>
 /// <param name="memStation"></param>
 public StationUpdateTimer(HostBack.DataSave sqlSave,bool commType, string strpath, string configpath, MemStation[] memStation)
 {
     this.sqlSave = sqlSave;
     this._commType = commType;
     this.StationXmlFilePath = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + strpath;
     this.StationConfigFilePath = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + configpath;
     this.memStation = memStation;
     stationChangeTime.Interval = 5000;
     stationChangeTime.Tick += new EventHandler(stationChangeTime_Tick);
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="hostBacker"></param>
        /// <param name="strpath"></param>
        /// <param name="configpath"></param>
        /// <param name="memStation"></param>
        public TcpClientUpdateTimer(HostBack.DataSave sqlSave, string strpath, string configpath, SocketPacket[] socketPackets)
        {
            this.sqlSave = sqlSave;
            this.TcpClientXmlFilePath  = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + strpath;
            this.StationConfigFilePath = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + configpath;
            this.socketPackets         = socketPackets;

            timeTcpChange.Interval  = 5000;
            timeTcpChange.AutoReset = true;
            timeTcpChange.Elapsed  += new System.Timers.ElapsedEventHandler(timeTcpChange_Elapsed);
        }
예제 #6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="hostBacker"></param>
        /// <param name="strpath"></param>
        /// <param name="configpath"></param>
        /// <param name="memStation"></param>
        public TcpClientUpdateTimer(HostBack.DataSave sqlSave, string strpath, string configpath, SocketPacket[] socketPackets)
        {
            this.sqlSave = sqlSave;
            this.TcpClientXmlFilePath = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + strpath;
            this.StationConfigFilePath = System.Windows.Forms.Application.StartupPath.ToString() + @"\" + configpath;
            this.socketPackets = socketPackets;

            timeTcpChange.Interval = 5000;
            timeTcpChange.AutoReset = true;
            timeTcpChange.Elapsed += new System.Timers.ElapsedEventHandler(timeTcpChange_Elapsed);
        }