예제 #1
0
        // Done in UI thread after DoPerformSync completes

        private void PerformSyncCompleted()
        {
            Debug.Assert(System.Windows.Forms.Application.MessageLoop);

            if (syncstate.edsm_fullsync_count > 0 || syncstate.edsm_updatesync_count > 0)
            {
                LogLine(string.Format("EDSM update complete with {0} systems".Tx(this, "EDSMU"), syncstate.edsm_fullsync_count + syncstate.edsm_updatesync_count));
            }

            if (syncstate.eddb_sync_count > 0)
            {
                LogLine(string.Format("EDDB update complete with {0} systems".Tx(this, "EDDBU"), syncstate.eddb_sync_count));
            }

            long totalsystems = SystemClassDB.GetTotalSystems();

            LogLineSuccess(string.Format("Loading completed, total of {0:N0} systems stored".Tx(this, "SYST"), totalsystems));

            if (syncstate.edsm_fullsync_count > 0 || syncstate.eddb_sync_count > 0 || syncstate.edsm_updatesync_count > 20000)   // if we have done a resync, or a major update sync (arb no)
            {
                LogLine("Refresh due to updating EDSM or EDDB data".Tx(this, "Refresh"));
                RefreshHistoryAsync();
            }

            OnSyncComplete?.Invoke();

            ReportSyncProgress(-1, "");

            resyncEDSMEDDBRequestedFlag = 0;        // releases flag and allow another async to happen

            Debug.WriteLine(BaseUtils.AppTicks.TickCountLap() + " Perform sync completed");
        }
        // Done in UI thread after DoPerformSync completes

        private void PerformSyncCompletedonUI()
        {
            Debug.Assert(System.Windows.Forms.Application.MessageLoop);

            if (syncstate.edsm_fullsync_count > 0 || syncstate.edsm_updatesync_count > 0)
            {
                LogLine(string.Format("EDSM update complete with {0} systems".T(EDTx.EDDiscoveryController_EDSMU), syncstate.edsm_fullsync_count + syncstate.edsm_updatesync_count));
            }

            if (syncstate.eddb_sync_count > 0)
            {
                LogLine(string.Format("EDDB update complete with {0} systems".T(EDTx.EDDiscoveryController_EDDBU), syncstate.eddb_sync_count));
            }

            if (syncstate.edsm_fullsync_count > 0 || syncstate.eddb_sync_count > 0 || syncstate.edsm_updatesync_count > 20000)   // if we have done a resync, or a major update sync (arb no)
            {
                LogLine("Refresh due to updating EDSM or EDDB data".T(EDTx.EDDiscoveryController_Refresh));
                RefreshHistoryAsync();
            }

            OnSyncComplete?.Invoke();

            ReportSyncProgress("");

            resyncEDSMEDDBRequestedFlag = 0;        // releases flag and allow another async to happen

            Debug.WriteLine(BaseUtils.AppTicks.TickCountLap() + " Perform sync completed");
        }
예제 #3
0
        // Done in UI thread after DoPerformSync completes

        private void PerformSyncCompletedonUI()
        {
            Debug.Assert(System.Windows.Forms.Application.MessageLoop);

            if (syncstate.edsm_fullsync_count > 0 || syncstate.edsm_updatesync_count > 0)
            {
                LogLine(string.Format("EDSM systems update complete with {0} systems".T(EDTx.EDDiscoveryController_EDSMU), syncstate.edsm_fullsync_count + syncstate.edsm_updatesync_count));
            }

            // since we don't assign EDSM IDs to journal entries any more, this is pointless.. removing

            //if (syncstate.edsm_fullsync_count > 0 )   // if we have done a resync, or a major update sync (arb no)
            //{
            //    LogLine("Refresh due to updating EDSM system data".T(EDTx.EDDiscoveryController_Refresh));
            //    RefreshHistoryAsync();
            //}

            OnSyncComplete?.Invoke(syncstate.edsm_fullsync_count, syncstate.edsm_updatesync_count);

            ReportSyncProgress("");

            resyncEDSMRequestedFlag = 0;        // releases flag and allow another async to happen

            Debug.WriteLine(BaseUtils.AppTicks.TickCountLap() + " Perform sync completed");
        }
        private void PerformSyncCompleted()
        {
            ReportProgress(-1, "");

            if (!PendingClose)
            {
                long totalsystems = SystemClassDB.GetTotalSystems();
                LogLineSuccess("Loading completed, total of " + totalsystems + " systems");

                if (syncstate.performhistoryrefresh)
                {
                    LogLine("Refresh due to updating systems");
                    HistoryRefreshed += HistoryFinishedRefreshing;
                    RefreshHistoryAsync();
                }

                OnSyncComplete?.Invoke();

                resyncRequestedFlag = 0;
            }
        }
예제 #5
0
        private void PerformSyncCompleted()
        {
            ReportProgress(-1, "");

            if (!PendingClose)
            {
                long totalsystems = SystemClassDB.GetTotalSystems();
                LogLineSuccess($"Loading completed, total of {totalsystems:N0} systems");

                if (syncstate.performhistoryrefresh)
                {
                    LogLine("Refresh due to updating systems");
                    HistoryRefreshed += HistoryFinishedRefreshing;
                    RefreshHistoryAsync();
                }

                OnSyncComplete?.Invoke();

                resyncRequestedFlag = 0;
            }
            Debug.WriteLine(BaseUtils.AppTicks.TickCount100 + " Perform sync completed");
        }