示例#1
0
        private void  择样式ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int         mapType   = 0;
            FeatureType layerType = weMapControl1.AllLayer[StyleLayerNum].FeatureType;

            if (layerType == FeatureType.WEEntityPoint || layerType == FeatureType.WEMultiPoint ||
                layerType == FeatureType.WEPoint)
            {
                mapType = 1;
            }
            else if (layerType == FeatureType.WEEntityPolyline || layerType == FeatureType.WEMultiPolyline ||
                     layerType == FeatureType.WEPolyline)
            {
                mapType = 2;
            }
            else if (layerType == FeatureType.WEEntityPolygon || layerType == FeatureType.WEMultiPolygon ||
                     layerType == FeatureType.WEPolygon)
            {
                mapType = 3;
            }
            StyleSetting styleSettingForm = new StyleSetting(mapType, StyleLayerNum, this);

            styleSettingForm.ShowDialog();

            if (styleSettingForm.DialogResult == DialogResult.OK)
            {
                AllLayer[StyleLayerNum].SymbolStyle = styleSettingForm.SetStyle;
                AllLayer[StyleLayerNum].Label       = styleSettingForm.SetLabel;
                weMapControl1.AllLayer = AllLayer;
                //weMapControl1.Refresh();
            }

            weMapControl1.Refresh();
        }
示例#2
0
 public frmLabelSetting(Font source, StyleSetting _father)
 {
     InitializeComponent();
     LabelFont          = source;
     LabelFontText.Text = source.Name;
     father             = _father;
     for (int i = 0; i < father.Items.Count; i++)
     {
         cmbFieldName.Items.Add(father.Items[i]);
     }
     cmbFieldName.SelectedIndex = 0;
 }