Esempio n. 1
0
 public int BindAnalyIntervalLayerData(GeoIntervalEventArgs args)
 {
     int transparency = 200;
     List<GeoRasterStyle> newStyles = new List<GeoRasterStyle>();
     foreach (KeyValuePair<MaxMinValue, Color> pair in args.m_IntervalColorDict)
     {
         GeoIntervalSytle item = new GeoIntervalSytle("name", pair.Value, pair.Key);
         newStyles.Add(item);
         transparency = pair.Value.A;
     }
     if (this.m_DataDic.ContainsKey(args.LayerId))
     {
         this.m_GeoMapMgr.UpdateRasterLayerStyles(args.LayerId, newStyles, transparency);
         return args.LayerId;
     }
     IGeoDemData geoDemData = args.m_GeoDemData;
     GeoDemIntervalData dataSource = new GeoDemIntervalData(geoDemData.FilePath, geoDemData.Bound, geoDemData.Resolution);
     int key = this.m_GeoMapMgr.AddApplicationRasterLayer(dataSource, newStyles, transparency);
     this.m_DataDic.Add(key, dataSource);
     return key;
 }
Esempio n. 2
0
 private void GeoInteralValueShow(PredictionGroup pg, PredictionStudy ps)
 {
     this.ClearIntervalMapLayer(ps);
     this.m_ValueCollectionShort = ps.StudyValueMatrix as ValueMatrixShortCollection;
     this.m_ValueCollectionShort.Open(this.m_SubSysInterface.ProjectManager);
     this.m_DefaultColor = Color.FromArgb(0, Color.White);
     ValueIntervalsLegend legend = ps.StudyLegend.ValueIntervals[ps.StudyLegend.FieldItem[ps.StudyLegend.DisplayTypeIndex]];
     Dictionary<MaxMinValue, Color> valueIntervalsField = legend.ValueIntervalsField;
     List<MaxMinValue> list = new List<MaxMinValue>(valueIntervalsField.Keys);
     foreach (MaxMinValue value2 in list)
     {
         valueIntervalsField[value2] = CheckColorTransparence.CheckColor(valueIntervalsField[value2], ps.StudyLegend.Transparence);
     }
     string str = Enum.GetName(typeof(PredictionStudyType), ps.StudyType).Replace('_', ' ');
     foreach (ValueMatrixShort @short in this.m_ValueCollectionShort.Values)
     {
         GeoIntervalEventArgs args = new GeoIntervalEventArgs(@short, valueIntervalsField, this.m_DefaultColor);
         args.m_PolygonRegion = this.m_PredictionGroup.Region;
         int layerId = this.m_SubSysInterface.AnalyDispEvent.AnalyGeoIntervalLayerMsgChanged(args);
         ps.StudyLegend.MapLever = layerId;
         this.UpdateTreeNodeTag(pg, ps, layerId);
     }
     this.m_ValueCollectionShort.Close(false);
 }