public partial class FilePooling : ServiceBase { #region Declarations private System.ComponentModel.Container components = null; private System.ServiceProcess.ServiceController serviceController1; private System.Timers.Timer timer1; DataTable dtHub = new DataTable(); DataTable dtImage = new DataTable(); #endregion public FilePooling() { InitializeComponent(); this.ServiceName = "FilePooling"; } static void Main() { System.ServiceProcess.ServiceBase[] ServicesToRun; ServicesToRun = new System.ServiceProcess.ServiceBase[] { new FilePooling() }; System.ServiceProcess.ServiceBase.Run(ServicesToRun); } private void InitializeComponent() { this.serviceController1 = new System.ServiceProcess.ServiceController(); this.timer1 = new System.Timers.Timer(); ((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit(); this.timer1.AutoReset = false; this.timer1.Enabled = true; this.timer1.Interval = Convert.ToDouble(ConfigurationSettings.AppSettings["TimerInterval"].ToString()); this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed); ((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit(); } # region timer1_Elapsed private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { timer1.Enabled = false; FileFTPCopy(); timer1.Enabled = true; } # endregion
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)