public void ImportObjects(string[] lines, ImportType importType) { string[] currLine; foreach (string line in lines) { currLine = line.Split(new char[] { (importType == ImportType.ByFlux) ? char.Parse(Radioobject.STANDART_STRING_DELIMETER) : ' ' }, StringSplitOptions.RemoveEmptyEntries); switch (importType) { case ImportType.ByFlux: Radioobjects.Add(new Radioobject( coords: new Coordinates(currLine[0]), fluxOn325: double.Parse(currLine[1]), fluxOn1400: double.Parse(currLine[2]), spectralIndex: double.Parse(currLine[3].Replace('.', ',')), type: Radioobject.ParseType(currLine[4]), densityRatio: double.Parse(currLine[5]), redshift: double.Parse(currLine[6]) )); break; case ImportType.BySpectralIndex: Radioobjects.Add(new Radioobject( coords: new Coordinates(currLine[0], currLine[1], ':'), spectralIndex: double.Parse(currLine[2].Replace('.', ',')) )); break; } } ReportToLog("Objects were imported."); }
public async Task GetObjectsDensity() { ReportToLog("Getting density of objects began."); await Radioobjects.GetDensityRatioAsync(Radioobjects[0].Coords, 15000); ReportToLog("Getting density of objects ended."); }
public async Task GetPictures() { ReportToLog("Downloading pictures began."); await Radioobjects.DownloadPicturesAsync(OutputPath); ReportToLog("Downloading pictures ended."); }
public void ImportObjects(string[] lines, IImportManager importManager) { foreach (string line in lines) { Radioobject obj = importManager.ProcessObject(line); if (obj != null) { Radioobjects.Add(obj); } } ReportToLog("Objects were imported."); }
//-----------------------------------------------------------------------// public async Task DownloadListOfObjects(Coordinates coords, int radius) { ReportToLog("Downloading list began."); AreaRadius = radius; try { await Radioobjects.DownloadObjectsListAsync(coords, radius); ReportToLog("Downloading list ended."); } catch (Exception ex) { ReportToLog(ex.Message); } }