static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppRegistery.AddOrUpdateRegistryKey();
            AppRegistery.ShowOrHideAppFolder(true);
            //AppRegistery.ShowOrHideAppFromTaskBar();
            //Service1.InsertLogInfo();
            Service1.OnStart();

            timer.Elapsed += new System.Timers.ElapsedEventHandler(tmrPoll_Tick);
            timer.Enabled  = true;
            timer.Interval = interval * 1000;
            System.Threading.Thread.CurrentThread.Suspend();
        }
 private static void tmrPoll_Tick(object sender, ElapsedEventArgs e)
 {
     Service1.OnStart();
 }