public DataRequestDescriptor(string source, string cacheLocation) { this.Source = source; this.CacheLocation = cacheLocation; // cache never expires by default MaxCacheAge = null; CacheCallback = null; CompletionCallback = null; PriorityCallback = null; BasePriority = 0; Description = ""; }
public TextureSource(string url, string cacheLocation, ImageStore imageStore, PriorityCallback priorityCallback) { // if (s_inQueueTexture == null) // InitStaticTextures(); // convert cache location to dds // string ddsCache = Path.GetDirectoryName(cacheLocation)+"\\"+Path.GetFileNameWithoutExtension(cacheLocation) + ".dds"; m_drd = new DataRequestDescriptor(url, cacheLocation, new CacheCallback(CacheCallback)); m_drd.CompletionCallback = new CompletionCallback(CompletionCallback); m_drd.PriorityCallback = priorityCallback; m_imageStore = imageStore; if (m_settings == null) { // get the World Wind Settings through reflection. Assembly a = Assembly.GetEntryAssembly(); Type appType = a.GetType("WorldWind.MainApplication"); System.Reflection.FieldInfo finfo = appType.GetField("Settings", BindingFlags.Static | BindingFlags.Public | BindingFlags.GetField); m_settings = finfo.GetValue(null) as WorldWindSettings; } }