Beispiel #1
0
 private void UpdateShows()
 {
     //Config.ReloadConfig();
     Database db = new Database();
     db.ProcessingShow += new Database.ProcessingShowHandler(db_ProcessingShow);
     db.ShowsOnDiskToDatabase();
     GetShowsInvoke();
 }
Beispiel #2
0
        private void SyncThread()
        {
            try
            {
                //First Populate the Shows Table
                Database db = new Database();
                db.ProcessingShow += new Database.ProcessingShowHandler(db_ProcessingShow);
                db.ShowsOnDiskToDatabase();

                Stopwatch sw = Stopwatch.StartNew();

                Logger.Log("=====================================================================");
                Logger.Log("Starting {0} v{1} - Build Date: {2:D}", App.Name, App.Version, App.BuildDate);
                Logger.Log("Current System Time: {0}", DateTime.Now);
                Logger.Log("=====================================================================");

                Logger.DeleteLogs();

                var job = new SyncJob();
                job.DbChanged += new SyncJob.DatabaseChangedHandler(UpdateView);
                job.Start();

                sw.Stop();
                Logger.Log("=====================================================================");
                Logger.Log("Process successfully completed. Duration {0:f1}s", sw.Elapsed.TotalSeconds);
                Logger.Log("{0}", DateTime.Now);
            }
            catch (Exception ex)
            {
                Logger.Log("Error: {0}", ex.Message);
                Logger.Log(ex.ToString());
            }
        }