Exemplo n.º 1
0
        private void ApplicateUniqueValueRenderToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Renderer = oLayerStyles.GetUniqueValueRender(this._mapLayer, this.cbbFields_UniqueValue.SelectedItem.ToString());

            this._mapControl.Refresh();
        }
Exemplo n.º 2
0
        private void ApplicationClassBreaksRenderToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Renderer = oLayerStyles.GetClassBreaksRender(this._mapLayer, this.cbbFields_ClassBreakRender.SelectedItem.ToString(),
                                                                        Int32.Parse(this.cbbNumber_ClassBreakRender.SelectedItem.ToString()), pnlStartColor.BackColor, pnlEndColor.BackColor);

            this._mapControl.Refresh();
        }
Exemplo n.º 3
0
        private void ApplicationLabelRenderToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Renderer = oLayerStyles.GetLabelRender
                                          (this.cbbLabelField.SelectedItem.ToString(), this.ckbAllowOverwrite.Checked, this.ckbLabelScale.Checked,
                                          0, 0, this.pnlLabelColor.BackColor, this.txtFont.Text, (double)this.numLabelSize.Value, (double)this.numLabelRotation.Value,
                                          oLayerStyles.GetLabelAlignmentByName(this.cbbLabelHorizonalAligment.SelectedItem.ToString()),
                                          oLayerStyles.GetLabelAlignmentByName(this.cbbLabelVerticalAligment.SelectedItem.ToString()));

            this._mapControl.Refresh();
        }
Exemplo n.º 4
0
        private void ApplicationGroupRenderToLayer()
        {
            List <object> oRenders = new List <object>();

            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            if (ckbIsAddUniqueValueRender.Checked)
            {
                object oUniqueRender = oLayerStyles.GetUniqueValueRender(this._mapLayer, this.cbbFields_UniqueValue.SelectedItem.ToString());

                oRenders.Add(oUniqueRender);
            }
            if (ckbIsAddClassBreakRender.Checked)
            {
                object oClassBreaksRender = oLayerStyles.GetClassBreaksRender(this._mapLayer, this.cbbFields_ClassBreakRender.SelectedItem.ToString(),
                                                                              Int32.Parse(this.cbbNumber_ClassBreakRender.SelectedItem.ToString()), pnlStartColor.BackColor, pnlEndColor.BackColor);

                oRenders.Add(oClassBreaksRender);
            }
            if (ckbIsAddLabelRender.Checked)
            {
                object oLabelRender = oLayerStyles.GetLabelRender(this.cbbLabelField.SelectedItem.ToString(), this.ckbAllowOverwrite.Checked,
                                                                  this.ckbLabelScale.Checked, 0, 0, this.pnlLabelColor.BackColor, this.txtFont.Text, (double)this.numLabelSize.Value, (double)this.numLabelRotation.Value,
                                                                  oLayerStyles.GetLabelAlignmentByName(this.cbbLabelHorizonalAligment.SelectedItem.ToString()),
                                                                  oLayerStyles.GetLabelAlignmentByName(this.cbbLabelVerticalAligment.SelectedItem.ToString()));

                oRenders.Add(oLabelRender);
            }

            if (oRenders.Count > 0)
            {
                this._mapLayer.Renderer = oLayerStyles.GetGroupRender(oRenders);
                this._mapControl.Refresh();
            }
            else
            {
                MessageBox.Show("请选择一个或多个渲染类型来进行组合.", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 5
0
        private void ApplicateSymbolSetToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Tag = this.numMinScale.Value.ToString() + "-" + this.numMaxScale.Value.ToString();

            this._mapLayer.Symbol.Color = (uint)Utilities.Converter.ConvertSystemtoIntegerColor(this.pnlSymbolColor.BackColor);
            this._mapLayer.Symbol.Size  = (short)this.numSymbolSize.Value;
            this._mapLayer.Symbol.Style = oLayerStyles.GetSymbolStyleByName(this._mapLayer.shapeType, this.cbbSymbolStyle.SelectedItem.ToString());

            if (this._mapLayer.shapeType == MapObjects2.ShapeTypeConstants.moShapeTypePoint)
            {
                this._mapLayer.Symbol.CenterOnAscent = true;
                this._mapLayer.Symbol.CharacterIndex = (short)this._selectedCharactorIndex;
                this._mapLayer.Symbol.Font.Name      = this._selectedFont.Name;
            }
            else if (this._mapLayer.shapeType == MapObjects2.ShapeTypeConstants.moShapeTypePolygon)
            {
                this._mapLayer.Symbol.Outline      = this.ckbIsViewOutline.Checked;
                this._mapLayer.Symbol.OutlineColor = (uint)Utilities.Converter.ConvertSystemtoIntegerColor(this.pnlSymbolOutlineColor.BackColor);
            }
            this._mapControl.Refresh();
        }
Exemplo n.º 6
0
        private void ApplicateSymbolSetToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Tag = this.numMinScale.Value.ToString() + "-" + this.numMaxScale.Value.ToString();

            this._mapLayer.Symbol.Color = (uint)Utilities.Converter.ConvertSystemtoIntegerColor(this.pnlSymbolColor.BackColor);
            this._mapLayer.Symbol.Size = (short)this.numSymbolSize.Value;
            this._mapLayer.Symbol.Style = oLayerStyles.GetSymbolStyleByName(this._mapLayer.shapeType, this.cbbSymbolStyle.SelectedItem.ToString());

            if (this._mapLayer.shapeType == MapObjects2.ShapeTypeConstants.moShapeTypePoint)
            {

                this._mapLayer.Symbol.CenterOnAscent = true;
                this._mapLayer.Symbol.CharacterIndex = (short)this._selectedCharactorIndex;
                this._mapLayer.Symbol.Font.Name = this._selectedFont.Name;
            }
            else if (this._mapLayer.shapeType == MapObjects2.ShapeTypeConstants.moShapeTypePolygon)
            {
                this._mapLayer.Symbol.Outline = this.ckbIsViewOutline.Checked;
                this._mapLayer.Symbol.OutlineColor = (uint)Utilities.Converter.ConvertSystemtoIntegerColor(this.pnlSymbolOutlineColor.BackColor);
            }
            this._mapControl.Refresh();
        }
Exemplo n.º 7
0
        private void ApplicateUniqueValueRenderToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Renderer = oLayerStyles.GetUniqueValueRender(this._mapLayer, this.cbbFields_UniqueValue.SelectedItem.ToString());

            this._mapControl.Refresh();
        }
Exemplo n.º 8
0
        private void ApplicationLabelRenderToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Renderer = oLayerStyles.GetLabelRender
                (this.cbbLabelField.SelectedItem.ToString(), this.ckbAllowOverwrite.Checked,this.ckbLabelScale.Checked,
                0, 0, this.pnlLabelColor.BackColor, this.txtFont.Text,(double)this.numLabelSize.Value, (double)this.numLabelRotation.Value,
                oLayerStyles.GetLabelAlignmentByName(this.cbbLabelHorizonalAligment.SelectedItem.ToString()),
                oLayerStyles.GetLabelAlignmentByName(this.cbbLabelVerticalAligment.SelectedItem.ToString()));

            this._mapControl.Refresh();
        }
Exemplo n.º 9
0
        private void ApplicationGroupRenderToLayer()
        {
            List<object> oRenders = new List<object>();
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            if (ckbIsAddUniqueValueRender.Checked)
            {
                object oUniqueRender = oLayerStyles.GetUniqueValueRender(this._mapLayer, this.cbbFields_UniqueValue.SelectedItem.ToString());

                oRenders.Add(oUniqueRender);
            }
            if (ckbIsAddClassBreakRender.Checked)
            {
                object oClassBreaksRender = oLayerStyles.GetClassBreaksRender(this._mapLayer, this.cbbFields_ClassBreakRender.SelectedItem.ToString(),
                   Int32.Parse(this.cbbNumber_ClassBreakRender.SelectedItem.ToString()), pnlStartColor.BackColor, pnlEndColor.BackColor);

                oRenders.Add(oClassBreaksRender);
            }
            if (ckbIsAddLabelRender.Checked)
            {
                object oLabelRender = oLayerStyles.GetLabelRender(this.cbbLabelField.SelectedItem.ToString(), this.ckbAllowOverwrite.Checked,
                   this.ckbLabelScale.Checked, 0, 0, this.pnlLabelColor.BackColor, this.txtFont.Text,(double)this.numLabelSize.Value, (double)this.numLabelRotation.Value,
                   oLayerStyles.GetLabelAlignmentByName(this.cbbLabelHorizonalAligment.SelectedItem.ToString()),
                   oLayerStyles.GetLabelAlignmentByName(this.cbbLabelVerticalAligment.SelectedItem.ToString()));

                oRenders.Add(oLabelRender);
            }

            if (oRenders.Count > 0)
            {
                this._mapLayer.Renderer = oLayerStyles.GetGroupRender(oRenders);
                this._mapControl.Refresh();
            }
            else
            {
                MessageBox.Show("��ѡ��һ��������Ⱦ�������������.", "����", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 10
0
        private void ApplicationClassBreaksRenderToLayer()
        {
            MapUtil.LayerStyles oLayerStyles = new MapConfigure.MapUtil.LayerStyles();

            this._mapLayer.Renderer = oLayerStyles.GetClassBreaksRender(this._mapLayer, this.cbbFields_ClassBreakRender.SelectedItem.ToString(),
                Int32.Parse(this.cbbNumber_ClassBreakRender.SelectedItem.ToString()), pnlStartColor.BackColor, pnlEndColor.BackColor);

            this._mapControl.Refresh();
        }