private void BrushingToCorrelogram(frmCorrelogram_local pfrmCorrelogram, IFeatureLayer pFLayer, IFeatureSelection featureSelection) { if (pfrmCorrelogram.m_pFLayer == pFLayer) { IFeatureClass pFeatureClass = pFLayer.FeatureClass; //int intVarIdx = pFeatureClass.Fields.FindField(pfrmMScatterResults.strVarNM); int intFIDIdx = pFeatureClass.FindField(pFeatureClass.OIDFieldName); ICursor pCursor = null; featureSelection.SelectionSet.Search(null, false, out pCursor); IRow pRow = pCursor.NextRow(); //IFeature pFeature = pFCursor.NextFeature(); int dblOriPtsSize = pfrmCorrelogram.pChart.Series[0].MarkerSize; //Remove Previous Selection while (pfrmCorrelogram.pChart.Series.Count != pfrmCorrelogram.m_intTotalNSeries) { pfrmCorrelogram.pChart.Series.RemoveAt(pfrmCorrelogram.pChart.Series.Count - 1); } int intSelLinesCount = 0; while (pRow != null) { //Add Sel Lines var seriesLines = new System.Windows.Forms.DataVisualization.Charting.Series { Name = "SelLines" + intSelLinesCount.ToString(), Color = System.Drawing.Color.Red, BorderColor = System.Drawing.Color.Red, IsVisibleInLegend = false, IsXValueIndexed = false, ChartType = SeriesChartType.Line, MarkerStyle = MarkerStyle.Circle, MarkerSize = dblOriPtsSize * 2 }; intSelLinesCount++; pfrmCorrelogram.pChart.Series.Add(seriesLines); int intSelFID = Convert.ToInt32(pRow.get_Value(intFIDIdx)); int intValueIdx = Array.IndexOf(pfrmCorrelogram.m_pFIDs, intSelFID); for (int l = 0; l < pfrmCorrelogram.m_intMaxLag; l++) { int intXvalue = l * 2 + 1; seriesLines.Points.AddXY(intXvalue, pfrmCorrelogram.m_lstCorrelograms[l].LocalMeasureEst[intValueIdx]); } pRow = pCursor.NextRow(); } } }
private void spatialCorrelogramLocalVerToolStripMenuItem_Click(object sender, EventArgs e) { frmCorrelogram_local pfrmCorrelogram_Local = new frmCorrelogram_local(); pfrmCorrelogram_Local.Show(); }
public void BrushingToOthers(IFeatureLayer pFLayer, IntPtr intPtrParent) { try { FormCollection pFormCollection = System.Windows.Forms.Application.OpenForms; //IActiveView pActiveView = mForm.axMapControl1.ActiveView; if (pFLayer.Visible) { //Brushing to Mapcontrol string ShapeFieldName = pFLayer.FeatureClass.ShapeFieldName; IFeatureSelection featureSelection = (IFeatureSelection)pFLayer; for (int j = 0; j < pFormCollection.Count; j++) { if (pFormCollection[j].Handle != intPtrParent) // Brushing to Others { if (pFormCollection[j].Name == "frmHistResults") //Brushing to Histogram { frmHistResults pfrmHistResults = pFormCollection[j] as frmHistResults; BrushingToHistogram(pfrmHistResults, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmScatterPlotResults") //Brushing to Scatterplot { frmScatterPlotResults pfrmPointsPlot = pFormCollection[j] as frmScatterPlotResults; BrushingToScatterPlot(pfrmPointsPlot, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmQQPlotResults") //Brushing to QQPlot { frmQQPlotResults pfrmQQPlotResult = pFormCollection[j] as frmQQPlotResults; BrushingToQQPlot(pfrmQQPlotResult, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmAttributeTable")//Brushing to AttributeTable { frmAttributeTable pfrmAttTable = pFormCollection[j] as frmAttributeTable; BrushingToAttTable(pfrmAttTable, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmBoxPlotResults")//Brushing to AttributeTable { frmBoxPlotResults pfrmBoxPlotResult = pFormCollection[j] as frmBoxPlotResults; BrushingToBoxPlot(pfrmBoxPlotResult, pFLayer, featureSelection); } //if (pFormCollection[j].Name == "frmClassificationGraph")//Brushing to Optiize Graph //{ // frmClassificationGraph pfrmClassGraph = pFormCollection[j] as frmClassificationGraph; // BrushingToOptimizeGraph(pfrmClassGraph, pFLayer, featureSelection); //} //if (pFormCollection[j].Name == "frmCSDesign")//Brushing to CS Graph //{ // frmCSDesign pfrmCSDesign = pFormCollection[j] as frmCSDesign; // BrushingToClassSepGraph(pfrmCSDesign, pFLayer, featureSelection); //} if (pFormCollection[j].Name == "frmMScatterResults")//Brushing to Moran ScatterPlot { frmMScatterResults pfrmMScatterPlot = pFormCollection[j] as frmMScatterResults; BrushingToMScatterPlot(pfrmMScatterPlot, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmCCMapsResults")//Brushing to Moran ScatterPlot { frmCCMapsResults pfrmCCMApsResults = pFormCollection[j] as frmCCMapsResults; BrushingToCCMaps(pfrmCCMApsResults, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmBoxCox")//Brushing to Box-Cox transformation tool { frmBoxCox pfrmBoxCox = pFormCollection[j] as frmBoxCox; BrushingToBoxCox(pfrmBoxCox, pFLayer, featureSelection); } if (pFormCollection[j].Name == "frmCorrelogram_local")//Brushing to Correlogram { frmCorrelogram_local pfrmCorrelogram = pFormCollection[j] as frmCorrelogram_local; BrushingToCorrelogram(pfrmCorrelogram, pFLayer, featureSelection); } } } } } catch (Exception ex) { MessageBox.Show("Exception:" + ex.Message); return; } }
public void CloseAllRelatedPlots(IFeatureLayer pFLayer) { //try //{ FormCollection pFormCollection = System.Windows.Forms.Application.OpenForms; List <int> lstPlotIdx = new List <int>(); for (int j = 0; j < pFormCollection.Count; j++) { if (pFormCollection[j].Name == "frmHistResults")//Brushing to Histogram { frmHistResults pfrmHistResults = pFormCollection[j] as frmHistResults; if (pfrmHistResults.pFLayer == pFLayer) { lstPlotIdx.Add(j); } } if (pFormCollection[j].Name == "frmScatterPlotResults") //Brushing to Scatterplot { frmScatterPlotResults pfrmPointsPlot = pFormCollection[j] as frmScatterPlotResults; if (pfrmPointsPlot.m_pFLayer == pFLayer) { lstPlotIdx.Add(j); } } if (pFormCollection[j].Name == "frmQQPlotResults") //Brushing to QQPlot { frmQQPlotResults pfrmQQPlotResult = pFormCollection[j] as frmQQPlotResults; if (pfrmQQPlotResult.m_pFLayer == pFLayer) { lstPlotIdx.Add(j); } } if (pFormCollection[j].Name == "frmAttributeTable")//Brushing to AttributeTable { frmAttributeTable pfrmAttTable = pFormCollection[j] as frmAttributeTable; if (pfrmAttTable.m_pLayer == (ILayer)pFLayer) { lstPlotIdx.Add(j); } } if (pFormCollection[j].Name == "frmBoxPlotResults")//Brushing to AttributeTable { frmBoxPlotResults pfrmBoxPlotResult = pFormCollection[j] as frmBoxPlotResults; if (pfrmBoxPlotResult.pFLayer == pFLayer) { lstPlotIdx.Add(j); } } //if (pFormCollection[j].Name == "frmClassificationGraph")//Brushing to Optiize Graph //{ // frmClassificationGraph pfrmClassGraph = pFormCollection[j] as frmClassificationGraph; // BrushingToOptimizeGraph(pfrmClassGraph, pFLayer, featureSelection); //} //if (pFormCollection[j].Name == "frmCSDesign")//Brushing to CS Graph //{ // frmCSDesign pfrmCSDesign = pFormCollection[j] as frmCSDesign; // if (pfrmCSDesign.pFLayer == pFLayer) // lstPlotIdx.Add(j); //} if (pFormCollection[j].Name == "frmMScatterResults")//Brushing to Moran ScatterPlot { frmMScatterResults pfrmMScatterPlot = pFormCollection[j] as frmMScatterResults; if (pfrmMScatterPlot.m_pFLayer == pFLayer) { lstPlotIdx.Add(j); } } if (pFormCollection[j].Name == "frmCorrelogram_local")//Brushing to Correlogram { frmCorrelogram_local pfrmCorrelogram = pFormCollection[j] as frmCorrelogram_local; if (pfrmCorrelogram.m_pFLayer == pFLayer) { lstPlotIdx.Add(j); } } } lstPlotIdx.Sort(); for (int j = lstPlotIdx.Count - 1; j >= 0; j--) { pFormCollection[lstPlotIdx[j]].Close(); } //} //catch (Exception ex) //{ // MessageBox.Show("Exception:" + ex.Message); // return; //} }