public static List <string[]> GetProductProperies(SentinelProduct product) { var resalt = new List <string[]>(); if (product != null) { foreach (var propertyName in PropertyDescription.Keys) { string propValue = string.Empty; var filedIfo = sentinelProductType.GetField(propertyName); if (filedIfo != null) { propValue = filedIfo.GetValue(product).ToString(); } else { var propInfo = sentinelProductType.GetProperty(propertyName); if (propInfo != null) { propValue = propInfo.GetValue(product).ToString(); } } resalt.Add(new string[] { PropertyDescription[propertyName], propValue.ToString() }); } } return(resalt); }
public IEnumerable <SentinelProduct> GetScenePairProduct(SentinelProduct baseScene) { var pairs = prepareSentinelView.SentinelProducts.Where(p => p.OrbitNumber == baseScene.OrbitNumber); //TO return(pairs); }
public void AddProductsToDownload(IEnumerable <SentinelProductGui> products, SentinelProduct baseScene) { foreach (var p in products) { if (!downloadingScenes.Any(ts => ts.Identifier.Equals(p.Identifier))) { downloadingScenes.Add(p); } } downloadingScenes.ForEach(p => p.BaseScene = p.Id == baseScene.Id); }
public static SentinelProductGui Get(SentinelProduct baseData) { return(Helper.Clone <SentinelProductGui>(baseData)); }
public IEnumerable <SentinelProductGui> AddProductsToDownload(IEnumerable <SentinelProduct> products, SentinelProduct asBase) { var pgs = products.Select(p => CheckProductExistanceToDownload(p) ? null : SentinelProductGui.Get(p)).Where(p => p != null); prepareSentinelView.SelectedTile.AddProductsToDownload(pgs, asBase); return(prepareSentinelView.SelectedTile.DownloadingScenes); }
public bool CheckProductExistanceToDownload(SentinelProduct product) { return(product == null || prepareSentinelView.SelectedTile.DownloadingScenes.Any(pg => pg.Id == product.Id)); }
public List <string[]> GetSentinelProductProperties(SentinelProduct product) { return(SentinelProductHelper.GetProductProperies(product)); }