Example #1
0
        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);
        }
Example #2
0
        public IEnumerable <SentinelProduct> GetScenePairProduct(SentinelProduct baseScene)
        {
            var pairs = prepareSentinelView.SentinelProducts.Where(p => p.OrbitNumber == baseScene.OrbitNumber);

            //TO

            return(pairs);
        }
Example #3
0
        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);
        }
Example #4
0
 public static SentinelProductGui Get(SentinelProduct baseData)
 {
     return(Helper.Clone <SentinelProductGui>(baseData));
 }
Example #5
0
        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);
        }
Example #6
0
 public bool CheckProductExistanceToDownload(SentinelProduct product)
 {
     return(product == null || prepareSentinelView.SelectedTile.DownloadingScenes.Any(pg => pg.Id == product.Id));
 }
Example #7
0
 public List <string[]> GetSentinelProductProperties(SentinelProduct product)
 {
     return(SentinelProductHelper.GetProductProperies(product));
 }