public void InitializeApp(string filename, bool quitAfterImport) { m_Store = new FileStore(m_Config.DBFile); InitalizeTracing(); m_Locations = LocationList.LoadLocationList(); m_QuickFilters = QuickFilters.LoadQuickFilters(); m_Profiles = GPSProfileList.LoadProfileList(); m_Tools = EToolList.LoadEToolList(); m_Bookmarks = new BookmarkManager(this); m_CentreLat = AppConfig.LastLat; m_CentreLon = AppConfig.LastLon; m_CentreName = AppConfig.LastName; m_Window = new OCMMainWindow(this); QuickFilter startup = m_QuickFilters.GetFilter(AppConfig.StartupFilter); if (startup != null) { m_Window.CacheList.ApplyInitalQuickFilter(startup); } if (filename != null) { if (filename.EndsWith(".zip")) { ImportZip(filename); } else { ImportGPXFile(filename); } if (quitAfterImport) { this.End(); } else { ShowMainWindow(); } } else { m_splash = new OCMSplash(); m_splash.Show(); UpdateGUIThread(); m_splash.Preload(this, startup); } }
public void InitializeApp(string filename, bool quitAfterImport) { m_Store = new FileStore(m_Config.DBFile); InitalizeTracing (); m_Locations = LocationList.LoadLocationList(); m_QuickFilters = QuickFilters.LoadQuickFilters(); m_Profiles = GPSProfileList.LoadProfileList(); m_Tools = EToolList.LoadEToolList(); m_Bookmarks = new BookmarkManager(this); m_CentreLat = AppConfig.LastLat; m_CentreLon = AppConfig.LastLon; m_CentreName = AppConfig.LastName; m_Window = new OCMMainWindow(this); QuickFilter startup = m_QuickFilters.GetFilter(AppConfig.StartupFilter); if (startup != null) m_Window.CacheList.ApplyInitalQuickFilter(startup); if (filename != null) { if (filename.EndsWith(".zip")) ImportZip(filename); else ImportGPXFile(filename); if (quitAfterImport) this.End(); else ShowMainWindow(); } else { m_splash = new OCMSplash(); m_splash.Show(); UpdateGUIThread(); m_splash.Preload(this, startup); } }
public static void ShowSplash() { m_splash = new OCMSplash(); m_splash.ShowNow(); System.Timers.Timer splashtime = new System.Timers.Timer(); splashtime.AutoReset = false; splashtime.Interval = 1000; splashtime.Elapsed += HandleSplashtimeElapsed; splashtime.Start(); }