Exemple #1
0
 private void cycleMaxMinValue(IIntervalStudy study, ref int index, ref float CoverArea, float area, ref float percentage, Dictionary<MaxMinValue, int> MaxMinDic, Dictionary<MaxMinValue, List<double>> clutterDic)
 {
     foreach (MaxMinValue value2 in MaxMinDic.Keys)
     {
         this.dgvExpoertData.Rows.Add();
         Color color = study.StyleList[index].Color;
         string featureName = study.StyleList[index].FeatureName;
         percentage = ((float) MaxMinDic[value2]) / ((float) this.m_Group.NumPointInPolygon);
         percentage = this.SolvePrecisionBelow_1(percentage);
         CoverArea = area * percentage;
         this.m_GroupArea += CoverArea;
         this.m_GroupPercentage += percentage;
         CoverArea = this.SolvePrecision((double) CoverArea, this.m_Mode);
         this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Value = this.m_EmptyString + featureName;
         this.dgvExpoertData.Rows[this.m_Index].Cells["CoverArea"].Value = (float) CoverArea;
         this.dgvExpoertData.Rows[this.m_Index].Cells["Percentage"].Value = this.SolvePrecision((double) (percentage * 100f), this.m_Mode) + "%";
         List<double> list = clutterDic[value2];
         for (int i = 0; i < this.m_Clutters.Count; i++)
         {
             this.dgvExpoertData.Rows[this.m_Index].Cells[this.m_Clutters[i]].Value = this.SolvePrecision(list[i] * 100.0, this.m_Mode) + "%";
         }
         this.m_Index++;
         index++;
     }
 }
 private string CreateExpLegendForStudyXml(IIntervalStudy study)
 {
     string str = (string.Empty + "<studyNode name = \"" + study.Name + "\">\r\n") + "<Interval_values>\r\n";
     int num = 0;
     foreach (GeoIntervalSytle sytle in study.StyleList)
     {
         MaxMinValue value2 = (MaxMinValue) sytle.Value;
         num = sytle.Color.ToArgb();
         object obj2 = str;
         str = string.Concat(new object[] { obj2, "<Row color=\"", num, "\" minvalue=\"", LegendAndValueAnalyse.AnalyseMaxMinValue(value2.min), "\" maxvalue=\"", LegendAndValueAnalyse.AnalyseMaxMinValue(value2.max), "\" > </Row>\r\n" });
     }
     return (str + "</Interval_values>\r\n" + "</studyNode>\r\n");
 }
 private bool IsXMLValidateForStudy(IIntervalStudy study, XmlDocument doc)
 {
     XmlNode node = doc.ChildNodes[1];
     XmlNode node2 = node.ChildNodes[0];
     XmlNode node3 = node2.ChildNodes[0];
     if (!((node2.ChildNodes.Count != 0) && node2.Attributes["name"].Value.Equals(study.Name)))
     {
         return false;
     }
     return true;
 }
 private void ImportLegendXmlForStudy(IIntervalStudy study, XmlDocument doc, DataGridView dataGridView)
 {
     XmlNode node = doc.ChildNodes[1];
     XmlNode node2 = node.ChildNodes[0].ChildNodes[0];
     string valueStr = string.Empty;
     string str3 = string.Empty;
     float num = 0f;
     float num2 = 0f;
     int argb = 0;
     dataGridView.Rows.Clear();
     int num4 = 0;
     foreach (XmlNode node3 in node2.ChildNodes)
     {
         argb = int.Parse(node3.Attributes["color"].Value);
         valueStr = node3.Attributes["minvalue"].Value;
         str3 = node3.Attributes["maxvalue"].Value;
         num = LegendAndValueAnalyse.AnalyseMaxMinValue(valueStr);
         num2 = LegendAndValueAnalyse.AnalyseMaxMinValue(str3);
         num4 = dataGridView.Rows.Add();
         dataGridView.Rows[num4].Cells["ColorType"].Value = Color.FromArgb(argb);
         dataGridView.Rows[num4].Cells["MinValue"].Value = LegendAndValueAnalyse.AnalyseMaxMinValue(num);
         dataGridView.Rows[num4].Cells["MaxValue"].Value = LegendAndValueAnalyse.AnalyseMaxMinValue(num2);
         dataGridView.Rows[num4].Cells["Legend"].Value = LegendAndValueAnalyse.CombineLegendStr(study.Unit, study.Name, num2, num);
         dataGridView.Rows[num4].Cells["CheckLegend"].Value = true;
     }
     dataGridView.Refresh();
 }
Exemple #5
0
 private void GetIntervalLegend(IPredictionGroup group, IIntervalStudy study)
 {
     string key = group.Name + study.Name;
     int index = 0;
     float coverArea = 0f;
     float area = 0f;
     float percentage = 0f;
     Dictionary<MaxMinValue, int> maxMinDic = this.psm.CalcIntervalValue(study);
     if (!this.m_IntervalCluterCoverage.ContainsKey(key))
     {
         this.GetClutterCoverage(study, key);
     }
     if (maxMinDic != null)
     {
         if (this.m_Group.Region != null)
         {
             area = (float) this.m_Group.Region.RegionArea;
         }
         Dictionary<MaxMinValue, List<double>> clutterDic = new Dictionary<MaxMinValue, List<double>>();
         foreach (GeoRasterStyle style in this.m_IntervalCluterCoverage[key].Keys)
         {
             clutterDic[(MaxMinValue) style.Value] = this.m_IntervalCluterCoverage[key][style];
         }
         this.cycleMaxMinValue(study, ref index, ref coverArea, area, ref percentage, maxMinDic, clutterDic);
         this.m_GroupPercentage = this.SolvePrecisionBelow_1(this.m_GroupPercentage);
         this.m_GroupArea = this.SolvePrecision((double) this.m_GroupArea, this.m_Mode);
         if ((maxMinDic != null) && (maxMinDic.Keys.Count > 0))
         {
             this.GetCumulatePer(maxMinDic.Keys.Count);
         }
     }
 }
Exemple #6
0
 private void GetClutterCoverage(IIntervalStudy study, string key)
 {
     study.Open(this.m_IProjectManager);
     this.m_IntervalCluterCoverage.Add(key, this.m_IAnalyDispEvent.GetStudyClutterCoverage(new PredictionGeoDataStructure(study), study.StyleList.ToGeoRasterStyleList()));
     study.Close(false);
 }
Exemple #7
0
 public void CreatGraphCDF(string name, IIntervalStudy study, System.Drawing.Color color, int count, Dictionary<MaxMinValue, int> intCountDic)
 {
     List<GeoIntervalSytle> styleList = study.StyleList;
     if (intCountDic != null)
     {
         LineItem item;
         GraphPane graphPane = this.zgc.GraphPane;
         string unit = study.Unit;
         graphPane.Title.Text = study.Name;
         graphPane.XAxis.Title.Text = LTEPredictionResource.PREDICTION_GRAPH_XAXIX + unit;
         graphPane.YAxis.Title.Text = LTEPredictionResource.PREDICTION_GRAPH_YAXIX;
         int num = styleList.Count;
         double[] x = new double[styleList.Count + 1];
         double[] y = new double[styleList.Count + 1];
         x[0] = this.m_PredictionStatisticsManager.solveMaxMinValueForDraw(styleList[num - 1], "MIN", study);
         y[0] = 0.0;
         for (int i = 0; i < styleList.Count; i++)
         {
             x[i + 1] = this.m_PredictionStatisticsManager.solveMaxMinValueForDraw(styleList[(num - i) - 1], "MAX", study);
             y[i + 1] = ((((double) intCountDic[(MaxMinValue) styleList[(num - i) - 1].Value]) / this.m_PredictionStatisticsManager.ValidPoint) * 100.0) + y[i];
         }
         if (count <= 4)
         {
             item = graphPane.AddCurve(name, x, y, color, SymbolType.None);
         }
         else if (count == 5)
         {
             item = graphPane.AddCurve("...", x, y, color, SymbolType.None);
         }
         else
         {
             item = graphPane.AddCurve(string.Empty, x, y, color, SymbolType.None);
         }
     }
 }