private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            ILogger theLogger = new LoggerNLog();
            theLogger.Log("timer1_Tick: Start");

            Settings theSettings = Settings.Get();
            IGroza theGroza = new GrozaFTP(theSettings.Groza_FTP_host,
                theSettings.Groza_FTP_user,
                theSettings.Groza_FTP_pass,
                theLogger);

            try
            {
                theLogger.Log("Groza: Access");
                theGroza.Access();
            }
            catch (Exception ex)
            {
                theLogger.Error(ex.Message);
                theLogger.Error(ex.StackTrace);
            }
            finally
            {
                timer1.Enabled = true;
            }
            


        }
Example #2
0
        public static void main()
        {
            ILogger theLogger = new LoggerNLog();

            theLogger.Log("timer1_Tick: Start");

            Settings theSettings = Settings.Get();

            try
            {
                theLogger.Log("Forecast: Access");
                theLogger.Log(theSettings.Forecast_Folder);

                DateTime currDate = DateTime.Now;

                string fileName = theSettings.Forecast_Folder + "\\" + currDate.ToString("yyyy_MM_dd") + "\\wrf-arw\\khv\\1AmurOs_HBRK15.txt";

                theLogger.Log(fileName);
                theLogger.Log(Helper.readFileAsUtf8(fileName));
            }
            catch (Exception ex)
            {
                theLogger.Error(ex.Message);
                theLogger.Error(ex.StackTrace);
            }
            finally
            {
                //timer1.Enabled = true;
            }
        }
Example #3
0
        private void timer1_Tick_1(object sender, EventArgs e)
        {
            ILogger theLogger = new LoggerNLog();

            try
            {
                theLogger.Log("NewsServiceGrabber: TimerTick");
                IGrabber theGrabberPrimpogodaLenta = new GrabberPrimpogodaLenta(theLogger);
                theGrabberPrimpogodaLenta.Run();
                IGrabber theGrabberDvrcpod = new GrabberDvrcpodNews(theLogger);
                theGrabberDvrcpod.Run();
                IGrabber theGrabberKhabmeteoHydrology = new GrabberKhabmeteoHydrology(theLogger);
                theGrabberKhabmeteoHydrology.Run();
                IGrabber theGrabberKhabkrai = new GrabberKhabkrai(theLogger);
                theGrabberKhabkrai.Run();
                IGrabber theGrabberGeoStorm = new GrabberGeoStorm(theLogger);
                theGrabberGeoStorm.Run();
            }
            catch (Exception ex)
            {
                theLogger.Log(ex.Message);
                theLogger.Log(ex.StackTrace);
            }
        }
        private void timer1_Tick_1(object sender, EventArgs e)
        {
            ILogger theLogger = null;
            IBot    theBot    = null;

            try
            {
                theLogger = new LoggerNLog();
                theBot    = new Bot(theLogger);

                theBot.Parser(DateTime.Now);

                timer1.Stop();
                timer1.Enabled = false;
            }
            catch (Exception ex)
            {
                theLogger.Log(ex.Message);
            }
        }
 protected override void OnStop()
 {
     ILogger theLogger = new LoggerNLog();
     theLogger.Log("OnStop");
 }
        protected override void OnStart(string[] args)
        {

            ILogger theLogger = new LoggerNLog();
            theLogger.Log("OnStart");
        }
Example #7
0
        protected override void OnStop()
        {
            ILogger theLogger = new LoggerNLog();

            theLogger.Log("NewsServiceGrabber: OnStop");
        }
Example #8
0
        protected override void OnStart(string[] args)
        {
            ILogger theLogger = new LoggerNLog();

            theLogger.Log("NewsServiceGrabber: OnStart");
        }
Example #9
0
        static void SupportLogger()
        {
            ILogger theLogger = new LoggerNLog();

            theLogger.Log("NewsConsole: SupportLogger");
        }