Exemple #1
0
        private void LoadDataToGridView(MapObjects2.MapLayer layer)
        {
            Utilities.LayerProperty oLayerProperty = new MapConfigure.Utilities.LayerProperty();

            try
            {
                this.lblLayerDescription.Text = string.Format("ͼ²ãÃû³Æ £º {0}", layer.Name);

                System.Data.DataTable dtlayerAttributes = oLayerProperty.GetAttributesByLayer(layer);
                this.dgvViewAttributes.DataSource = dtlayerAttributes;
            }
            finally
            {
                oLayerProperty = null;
            }
        }
Exemple #2
0
        private void LoadDataToGridView(MapObjects2.MapLayer layer)
        {
            Utilities.LayerProperty oLayerProperty = new MapConfigure.Utilities.LayerProperty();

            try
            {
                this.lblLayerDescription.Text = string.Format("ͼ������ �� {0}", layer.Name);

                System.Data.DataTable dtlayerAttributes = oLayerProperty.GetAttributesByLayer(layer);
                this.dgvViewAttributes.DataSource = dtlayerAttributes;
            }
            finally
            {
                oLayerProperty = null;
            }
        }
Exemple #3
0
        private void SetConextMenuState()
        {
            if (string.IsNullOrEmpty(this._selectedLayerName))
            {
                return;
            }

            Utilities.LayerProperty oLayerProperty = new MapConfigure.Utilities.LayerProperty();
            MapUtil.MapOperation    oMapOper       = new MapConfigure.MapUtil.MapOperation();
            this._selectedLayerInfos = oLayerProperty.GetLayerInformationByName(this._selectedLayerName, GlobeVariables.MapInfosCollection.Layers);

            if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
            {
                this.mnuIsLayerVisible.Checked = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.ImageLayer).Visible;
                this.mnuViewAttributes.Visible = false;
            }
            else if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moMapLayer)
            {
                this.mnuIsLayerVisible.Checked = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.MapLayer).Visible;
                this.mnuViewAttributes.Visible = true;
            }
        }
Exemple #4
0
        private void SetConextMenuState()
        {
            if (string.IsNullOrEmpty(this._selectedLayerName))
                return;

            Utilities.LayerProperty oLayerProperty = new MapConfigure.Utilities.LayerProperty();
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();
            this._selectedLayerInfos = oLayerProperty.GetLayerInformationByName(this._selectedLayerName, GlobeVariables.MapInfosCollection.Layers);

            if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
            {
                this.mnuIsLayerVisible.Checked = (oMapOper.GetLayerByName(GlobeVariables.MapControl,this._selectedLayerInfos.AliasName) as MapObjects2.ImageLayer).Visible;
                this.mnuViewAttributes.Visible = false;
            }
            else if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moMapLayer)
            {
                this.mnuIsLayerVisible.Checked = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.MapLayer).Visible;
                this.mnuViewAttributes.Visible = true;
            }
        }