public void Init() // ED Discovery calls this during its init { if (!Debugger.IsAttached || EDDOptions.Instance.TraceLog) { TraceLog.LogFileWriterException += ex => { LogLineHighlight($"Log Writer Exception: {ex}"); }; } backgroundWorker = new Thread(BackgroundWorkerThread); backgroundWorker.IsBackground = true; backgroundWorker.Name = "Background Worker Thread"; backgroundWorker.Start(); galacticMapping = new GalacticMapping(); EdsmSync = new EDSMSync(Logger); EdsmLogFetcher = new EDSMLogFetcher(LogLine); EdsmLogFetcher.OnDownloadedSystems += () => RefreshHistoryAsync(); journalmonitor = new EDJournalClass(InvokeAsyncOnUiThread); journalmonitor.OnNewJournalEntry += NewEntry; }
public void Init() // ED Discovery calls this during its init { if (!Debugger.IsAttached || EDDOptions.Instance.TraceLog) { TraceLog.LogFileWriterException += ex => { LogLineHighlight($"Log Writer Exception: {ex}"); }; } Icons.IconSet.ResetIcons(); // start with a clean slate loaded up from default icons string path = EDDOptions.Instance.IconsPath ?? (EDDOptions.Instance.AppDataDirectory + "\\Icons\\*.zip"); Icons.IconSet.LoadIconPack(path, EDDOptions.Instance.AppDataDirectory, AppDomain.CurrentDomain.BaseDirectory); backgroundWorker = new Thread(BackgroundWorkerThread); backgroundWorker.IsBackground = true; backgroundWorker.Name = "Background Worker Thread"; backgroundWorker.Start(); galacticMapping = new GalacticMapping(); EdsmLogFetcher = new EDSMLogFetcher(LogLine); EdsmLogFetcher.OnDownloadedSystems += () => RefreshHistoryAsync(); journalmonitor = new EDJournalClass(InvokeAsyncOnUiThread); journalmonitor.OnNewJournalEntry += NewEntry; journalmonitor.OnNewUIEvent += NewUIEvent; }
public void Init() // ED Discovery calls this during its init { TraceLog.LogFileWriterException += ex => // now we can attach the log writing highter into it { LogLineHighlight($"Log Writer Exception: {ex}"); }; galacticMapping = new GalacticMapping(); EdsmLogFetcher = new EDSMLogFetcher(LogLine); EdsmLogFetcher.OnDownloadedSystems += () => RefreshHistoryAsync(); journalmonitor = new EDJournalClass(InvokeAsyncOnUiThread); journalmonitor.OnNewJournalEntry += NewEntry; journalmonitor.OnNewUIEvent += NewUIEvent; }
// TBD why two inits - remove PostInit_Shown, call this instead, remove readyforinitialload. public void Init() // ED Discovery calls this during its init { TraceLog.LogFileWriterException += ex => // now we can attach the log writing highter into it { LogLineHighlight($"Log Writer Exception: {ex}"); }; backgroundWorker = new Thread(BackgroundWorkerThread); backgroundWorker.IsBackground = true; backgroundWorker.Name = "Background Worker Thread"; backgroundWorker.Start(); // TBD later, get rid of readyforInitialLoad, and start this thread at PostInit_Shown galacticMapping = new GalacticMapping(); EdsmLogFetcher = new EDSMLogFetcher(LogLine); EdsmLogFetcher.OnDownloadedSystems += () => RefreshHistoryAsync(); journalmonitor = new EDJournalClass(InvokeAsyncOnUiThread); journalmonitor.OnNewJournalEntry += NewEntry; journalmonitor.OnNewUIEvent += NewUIEvent; }