コード例 #1
0
        private void Timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Log.WriteEntry("Integração Air Support: Verificando se é hora de realizar integração. A hora é configurada no App.Config do projeto.", EventLogEntryType.Information);
            if (e.SignalTime.Hour != Settings.Instance.HoraExecucao)
            {
                return;
            }

            IntegracaoHelper helper = new IntegracaoHelper();

            helper.Execute();
        }
コード例 #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            IntegracaoHelper helper = new IntegracaoHelper();

            helper.Execute();

            //ServiceBase[] ServicesToRun;
            //ServicesToRun = new ServiceBase[]
            //{
            //    new IntegracaoService()
            //};
            //ServiceBase.Run(ServicesToRun);
        }