static void LoadNames()
 {
     if (webFileConstNames.State == StateType.Error)
     {
         Script.Literal("alert({0})", webFileConstNames.Message);
     }
     else if (webFileConstNames.State == StateType.Received)
     {
         CentroidsReady(webFileConstNames.GetText());
     }
 }
 public void FileStateChange()
 {
     if (webFile.State == StateType.Error)
     {
         Script.Literal("alert({0})", webFile.Message);
     }
     else if (webFile.State == StateType.Received)
     {
         LoadConstellationData(webFile.GetText());
     }
 }
Esempio n. 3
0
 public static void StarFileStateChange()
 {
     if (webFileStar.State == StateType.Error)
     {
         Script.Literal("alert({0})", webFileStar.Message);
     }
     else if (webFileStar.State == StateType.Received)
     {
         InitializeStarDB(webFileStar.GetText());
     }
 }
 public static void MoonFileStateChange()
 {
     if (webFileMoons.State == StateType.Error)
     {
         Script.Literal("alert({0})", webFileMoons.Message);
     }
     else if (webFileMoons.State == StateType.Received)
     {
         moonfile = webFileMoons.GetText();
         InitLayers();
     }
 }
Esempio n. 5
0
        private void ExtractCatalogTileRows()
        {
            bool headerRemoved = false;

            foreach (string line in catalogData.GetText().Split("\n"))
            {
                if (!line.StartsWith("#") && !headerRemoved)
                {
                    headerRemoved = true;
                    continue;
                }

                if (!line.StartsWith("#"))
                {
                    List <string> rowData = UiTools.SplitString(line, dataset.HipsProperties.CatalogSpreadSheetLayer.Table.Delimiter);
                    catalogRows.Add(rowData);
                }
            }
        }
Esempio n. 6
0
 public void FileStateChange()
 {
     if (webFile.State == StateType.Error)
     {
         Downloading    = false;
         ReadyToRender  = false;
         errored        = true;
         RequestPending = false;
         TileCache.RemoveFromQueue(this.Key, true);
     }
     else if (webFile.State == StateType.Received)
     {
         texReady       = true;
         Downloading    = false;
         errored        = false;
         ReadyToRender  = texReady && (DemReady || !demTile);
         RequestPending = false;
         TileCache.RemoveFromQueue(this.Key, true);
         LoadData(webFile.GetText());
     }
 }
 private void OnPropertiesDownloadComplete()
 {
     if (webFile.State == StateType.Received)
     {
         ParseProperties(webFile.GetText());
         if (Properties.ContainsKey("dataproduct_type") && Properties["dataproduct_type"].ToLowerCase() == "catalog")
         {
             catalogColumnInfo = VoTable.LoadFromUrl(url.Replace("/properties", "/metadata.xml"), OnCatalogMetadataDownloadComplete);
         }
         else
         {
             if (Properties.ContainsKey("hips_data_range"))
             {
                 string hips_data_range = Properties["hips_data_range"];
                 this.dataset.FitsProperties.MinVal   = Double.Parse(hips_data_range.Split(" ")[0]);
                 this.dataset.FitsProperties.MaxVal   = Double.Parse(hips_data_range.Split(" ")[1]);
                 this.dataset.FitsProperties.LowerCut = this.dataset.FitsProperties.MinVal;
                 this.dataset.FitsProperties.UpperCut = this.dataset.FitsProperties.MaxVal;
             }
             if (Properties.ContainsKey("hips_pixel_cut"))
             {
                 string hips_pixel_cut = Properties["hips_pixel_cut"];
                 this.dataset.FitsProperties.LowerCut = Double.Parse(hips_pixel_cut.Split(" ")[0]);
                 this.dataset.FitsProperties.UpperCut = Double.Parse(hips_pixel_cut.Split(" ")[1]);
                 if (!Properties.ContainsKey("hips_data_range"))
                 {
                     this.dataset.FitsProperties.MinVal = this.dataset.FitsProperties.LowerCut;
                     this.dataset.FitsProperties.MaxVal = this.dataset.FitsProperties.UpperCut;
                 }
             }
             downloadComplete = true;
             if (onDownloadComplete != null)
             {
                 onDownloadComplete.Invoke();
             }
         }
     }
 }