Example #1
0
        private void mnuDeleteLayer_Click(object sender, EventArgs e)
        {
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

            oMapOper.DeleteLayer(this._selectedLayer, this._mapObject);
            this.mapLegend.LoadLegend();
        }
Example #2
0
        public void SetLayerVisibility(string layerName, bool visible)
        {
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();
            object oLayer = oMapOper.GetLayerByName(GlobeVariables.MapControl, layerName);

            this.SetLayerVisibility(oLayer, visible);
        }
Example #3
0
        public void SetLayerVisibility(string layerName, bool visible)
        {
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();
            object oLayer = oMapOper.GetLayerByName(GlobeVariables.MapControl, layerName);

            this.SetLayerVisibility(oLayer, visible);
        }
Example #4
0
        private void mnuSetProperty_Click(object sender, EventArgs e)
        {
            MapUtil.MapOperation oMapOper          = new MapConfigure.MapUtil.MapOperation();
            object             oLayer              = oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName);
            frmLayerProperties oFrmLayerProperties = new frmLayerProperties(this._mapObject, oLayer);

            oFrmLayerProperties.ShowDialog();
        }
Example #5
0
        private void mnuSetProperty_Click(object sender, EventArgs e)
        {
            MapUtil.MapOperation oMapOper          = new MapConfigure.MapUtil.MapOperation();
            object             oLayer              = this._mapObject.Layers.Item(this.mapLegend.getActiveLayer());
            frmLayerProperties oFrmLayerProperties = new frmLayerProperties(this._mapObject, oLayer);

            if (oFrmLayerProperties.ShowDialog() == DialogResult.OK)
            {
                this.mapLegend.LoadLegend();
            }
        }
Example #6
0
        private void mnuViewAttributes_Click(object sender, EventArgs e)
        {
            if (this._selectedLayer == null || this._selectedLayer is MapObjects2.ImageLayer)
            {
                return;
            }

            MapUtil.MapOperation oMapOper          = new MapConfigure.MapUtil.MapOperation();
            frmAttributesData    oFrmAttributeData = new frmAttributesData(this._selectedLayer as MapObjects2.MapLayer);

            oFrmAttributeData.ShowDialog();
        }
Example #7
0
        private void mnuViewAttributes_Click(object sender, EventArgs e)
        {
            if (this._selectedLayerInfos == null || this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
            {
                return;
            }

            MapUtil.MapOperation oMapOper          = new MapConfigure.MapUtil.MapOperation();
            frmAttributesData    oFrmAttributeData = new frmAttributesData(oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.MapLayer);

            oFrmAttributeData.ShowDialog();
        }
Example #8
0
        public void LoadBackgroudLayer(List <ILayerStruct> layerInfosCollection)
        {
            this.mapControl.Layers.Clear();
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

            foreach (ILayerStruct layerInfos in layerInfosCollection)
            {
                if (layerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moMapLayer &&
                    (layerInfos as MapLayerInfoStruct).ShapeType == (short)MapObjects2.ShapeTypeConstants.moShapeTypePolygon)
                {
                    this.mapControl.Layers.Add(oMapOper.GetLayerByName(GlobeVariables.MapControl, (layerInfos as MapLayerInfoStruct).AliasName));
                }
            }
        }
Example #9
0
        private void mnuZoomToLayer_Click(object sender, EventArgs e)
        {
            if (this._selectedLayerInfos == null || this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
            {
                return;
            }

            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

            if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
            {
                this._mapObject.Extent = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.ImageLayer).Extent;
            }
            else if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moMapLayer)
            {
                this._mapObject.Extent = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.MapLayer).Extent;
            }

            this._mapObject.Refresh();
        }
Example #10
0
        private void mnuZoomToLayer_Click(object sender, EventArgs e)
        {
            if (this._selectedLayer == null)
            {
                return;
            }

            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

            if (this._selectedLayer is MapObjects2.ImageLayer)
            {
                this._mapObject.Extent = (this._selectedLayer as MapObjects2.ImageLayer).Extent;
            }
            else if (this._selectedLayer is MapObjects2.MapLayer)
            {
                this._mapObject.Extent = (this._selectedLayer as MapObjects2.MapLayer).Extent;
            }

            this._mapObject.Refresh();
        }
Example #11
0
        private void mnuIsLayerVisible_Click(object sender, EventArgs e)
        {
            if (this._selectedLayer == null || this._selectedLayer is MapObjects2.ImageLayer)
            {
                return;
            }

            mnuIsLayerVisible.Checked = !mnuIsLayerVisible.Checked;
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

            if (this._selectedLayer is MapObjects2.ImageLayer)
            {
                (this._selectedLayer as MapObjects2.ImageLayer).Visible = mnuIsLayerVisible.Checked;
            }
            else if (this._selectedLayer is MapObjects2.MapLayer)
            {
                (this._selectedLayer as MapObjects2.MapLayer).Visible = mnuIsLayerVisible.Checked;
            }

            this._mapObject.Refresh();
        }
Example #12
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;
            }
        }
Example #13
0
        private void mnuIsLayerVisible_Click(object sender, EventArgs e)
        {
            if (this._selectedLayerInfos == null || this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
            {
                return;
            }

            mnuIsLayerVisible.Checked = !mnuIsLayerVisible.Checked;
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

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

            this._selectedCheckBox.Checked = mnuIsLayerVisible.Checked;

            this._mapObject.Refresh();
        }
Example #14
0
        private void mnuSetProperty_Click(object sender, EventArgs e)
        {
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();
            object oLayer = oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName);
            frmLayerProperties oFrmLayerProperties = new frmLayerProperties(this._mapObject,oLayer);

            oFrmLayerProperties.ShowDialog();
        }
Example #15
0
        private void mnuViewAttributes_Click(object sender, EventArgs e)
        {
            if (this._selectedLayerInfos == null || this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
                return;

            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();
            frmAttributesData oFrmAttributeData = new frmAttributesData(oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.MapLayer);
            oFrmAttributeData.ShowDialog();
        }
Example #16
0
        private void mnuZoomToLayer_Click(object sender, EventArgs e)
        {
            if (this._selectedLayerInfos == null || this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
                return;

            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

            if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
                this._mapObject.Extent = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.ImageLayer).Extent;
            else if (this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moMapLayer)
                this._mapObject.Extent = (oMapOper.GetLayerByName(GlobeVariables.MapControl, this._selectedLayerInfos.AliasName) as MapObjects2.MapLayer).Extent;

            this._mapObject.Refresh();
        }
Example #17
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;
            }
        }
Example #18
0
        private void mnuIsLayerVisible_Click(object sender, EventArgs e)
        {
            if (this._selectedLayerInfos == null || this._selectedLayerInfos.LayerType == (short)MapObjects2.LayerTypeConstants.moImageLayer)
                return;

            mnuIsLayerVisible.Checked = !mnuIsLayerVisible.Checked;
            MapUtil.MapOperation oMapOper = new MapConfigure.MapUtil.MapOperation();

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

            this._selectedCheckBox.Checked = mnuIsLayerVisible.Checked;

            this._mapObject.Refresh();
        }