Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.comboBox1.SelectedIndex == -1)
            {
                MessageBox.Show("ÇëÑ¡Ôñ²¨¶ÎÃû³Æ!");
                return;
            }

            IRasterBand    rb          = m_rc.Item(m_rc.get_BandIndex(this.comboBox1.SelectedItem.ToString().Trim()));
            IRasterDataset rasterDS    = rb as IRasterDataset;
            IRasterLayer   rasterLayer = new RasterLayerClass();

            rasterLayer.CreateFromDataset(rasterDS);
            this.m_mapCon.Map.AddLayer(rasterLayer);
        }