コード例 #1
0
        /// <summary>
        /// 统计图回调
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ContextMenuClick_onChart(object sender, RoutedEventArgs e)
        {
            int           tblIndex    = Convert.ToInt32(((System.Windows.FrameworkElement)(((System.Windows.Controls.ContentControl)(tabControl1.SelectedItem)).Content)).Name.ToString().Split('_')[1]);
            CAttDataTable curRltTable = _lastSelRlt.AttDS[0].attTables[tblIndex];

            if (this.m_chartControl == null)
            {
                this.m_chartControl = new Chart();
            }
            this.m_chartControl.setDataProvider(curRltTable);
            this.m_chartControl.Show();
        }
コード例 #2
0
        /**
         * 绑定数据
         */
        public void setDataProvider(CAttDataTable dataTable)
        {
            this._data = dataTable;
            if (this._data == null)
            {
                return;
            }
            int           fldNum = dataTable.Columns.FldNumber;
            List <string> data   = new List <string>();

            for (int i = 0; i < fldNum; i++)
            {
                data.Add(dataTable.Columns.FldName[i]);
            }
            this.xaxis.ItemsSource   = data;
            this.xaxis.SelectedIndex = 0;
            this.yaxis.ItemsSource   = data;
            this.yaxis.SelectedIndex = 0;
            this.mychart.Series.Clear();
        }
コード例 #3
0
        private void setFeature(object sender, UploadStringCompletedEventArgs e)
        {
            CLayerSelectAndGetAtt obj = this.IMSCatalog.ActiveLayerObj.OnLayerSelectAndGetAtt(e);

            if (obj == null)
            {
                MessageBox.Show("未获取到要素");
                this.m_graphicsLayer.DrawingType         = DrawingType.Point;
                this.m_graphicsLayer.DrawingOverCallback = new DrawingEventHandler(Drawpoint_callback);
                return;
            }
            CAttDataTable curRltTable = obj.AttDS[this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex].attTables[this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex];

            if (obj.AttDS[this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex].attTables[this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex] != null)
            {
                CAttDataRow[] curRltRows = obj.AttDS[this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex].attTables[this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex].Rows;
                if (curRltRows == null)
                {
                    MessageBox.Show("未获取到要素");
                    this.m_graphicsLayer.DrawingType         = DrawingType.Point;
                    this.m_graphicsLayer.DrawingOverCallback = new DrawingEventHandler(Drawpoint_callback);
                    return;
                }
                CAttDataRow   row    = curRltTable.Rows[0] as CAttDataRow;
                CLayerGetByID getGeo = new CLayerGetByID();
                getGeo.FeatureID  = row.FID;
                getGeo.GdbIndex   = this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex;
                getGeo.LayerIndex = this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex;
                this.IMSCatalog.ActiveLayerObj.GetGeomByFID(getGeo, flashFeature);
            }
            else
            {
                MessageBox.Show("未获取到要素");
                this.m_graphicsLayer.DrawingType         = DrawingType.Point;
                this.m_graphicsLayer.DrawingOverCallback = new DrawingEventHandler(Drawpoint_callback);
            }
        }