private void FrmUpdateFeatureNames_Load(object sender, EventArgs e) { GSOLayers layers = mGlobeControl.Globe.Layers; if (layers.Count > 0) { for (int i = 0; i < layers.Count; i++) { comboBox1.Items.Add(layers[i].Caption); } } }
//加载所有图层 private void FrmUpdatePipelineColor_Load(object sender, EventArgs e) { if (m_globeControl != null) { GSOLayers layers = m_globeControl.Globe.Layers; for (int i = 0; i < layers.Count; i++) { GSOLayer layer = layers[i]; comboBoxLayerNames.Items.Add(layer.Caption); } comboBoxLayerNames.SelectedIndex = 0; } }
private void FrmParticalExportLayer_Load(object sender, EventArgs e) { GSOLayers layers = mGlobeControl.Globe.Layers; if (layers.Count <= 0) { return; } for (int i = 0; i < layers.Count; i++) { GSOLayer layer = layers[i]; if (layer.Type == EnumLayerType.FeatureLayer) { comboBoxLayerName.Items.Add(layers[i].Caption); } } }
private void FrmBatchUpadateFontOfMarkers_Load(object sender, EventArgs e) { if (mGlobeControl != null) { GSOLayers layers = mGlobeControl.Globe.Layers; if (layers.Count > 0) { for (int i = 0; i < layers.Count; i++) { GSOLayer layer = layers[i]; comboBoxLayers.Items.Add(layer.Caption); } GSOLayer destLayer = mGlobeControl.Globe.DestLayerFeatureAdd; comboBoxLayers.Text = (destLayer.Type == EnumLayerType.MemoryLayer ? layers[0].Caption : destLayer.Caption); } } textBoxFontColor.BackColor = Color.White; comboBoxFontSize.SelectedIndex = 2; }
private void FrmBatchUpadateColor_Load(object sender, EventArgs e) { panelPoints.Enabled = false; panelLines.Enabled = false; panelPolygons.Enabled = false; if (mGlobeControl != null) { GSOLayers layers = mGlobeControl.Globe.Layers; if (layers.Count > 0) { for (int i = 0; i < layers.Count; i++) { GSOLayer layer = layers[i]; comboBoxLayers.Items.Add(layer.Caption); } GSOLayer destLayer = mGlobeControl.Globe.DestLayerFeatureAdd; comboBoxLayers.Text = (destLayer.Type == EnumLayerType.MemoryLayer ? layers[0].Caption : destLayer.Caption); comboBoxLayers_TextChanged(sender, e); } } }
private void FrmBatchUpdateFieldValue_Load(object sender, EventArgs e) { GSOLayers layers = globeControl1.Globe.Layers; for (int i = 0; i < layers.Count; i++) { GSOLayer lay = layers[i]; if (lay.Dataset.IsFeatureDataset) { GSOFeatureDataset data = (GSOFeatureDataset)lay.Dataset; if (data.FieldCount <= 0) { continue; } comboBoxLayers.Items.Add(lay.Caption); //绑定图层 } } if (comboBoxLayers.Items.Count > 0) { comboBoxLayers.SelectedIndex = 0; } panel1.Enabled = false; }