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(); }
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); } }
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); } }