示例#1
0
        private void propertytoolStripButton_Click(object sender, EventArgs e)
        {
            frmEditTemplateProperty property = new frmEditTemplateProperty();
            YTEditTemplate          tag      = this.listView2.SelectedItems[0].Tag as YTEditTemplate;

            property.EditTemplate = tag;
            if ((property.ShowDialog() == DialogResult.OK) && (this.listView2.SelectedItems[0].Text != tag.Name))
            {
                this.listView2.SelectedItems[0].Text = tag.Name;
                EditTemplateManager.TemplatePropertyChange(tag);
            }
        }
示例#2
0
        private void  除图层中全部内容ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <YTEditTemplate> template = new List <YTEditTemplate>();

            foreach (ListViewItem item in this.listView2.Items)
            {
                template.Add(item.Tag as YTEditTemplate);
            }
            if (template.Count > 0)
            {
                EditTemplateManager.DeleteMoreEditTemplate(template);
                this.listView2.Items.Clear();
            }
            this.除图层中全部内容ToolStripMenuItem.Enabled = false;
            this.除ToolStripMenuItem.Enabled        = false;
        }
示例#3
0
 private void  除地图中全部内容ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("确定删除地图中所有模板?", "组织模板", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         List <YTEditTemplate> template = new List <YTEditTemplate>();
         foreach (KeyValuePair <IFeatureLayer, List <YTEditTemplate> > pair in this.Templates)
         {
             template.AddRange(pair.Value);
         }
         if (template.Count > 0)
         {
             EditTemplateManager.DeleteMoreEditTemplate(template);
             this.listView2.Items.Clear();
         }
     }
 }
示例#4
0
        private void btnFinish_Click(object sender, EventArgs e)
        {
            if (this.m_step == 0)
            {
                this.selectLayerCtrl.Apply();
            }
            List <YTEditTemplate> template = new List <YTEditTemplate>();

            foreach (KeyValuePair <IFeatureLayer, List <YTEditTemplateWrap> > pair in this.selectLayerCtrl.Templates)
            {
                foreach (YTEditTemplateWrap wrap in pair.Value)
                {
                    if (wrap.IsUse)
                    {
                        template.Add(wrap.EditTemplate);
                    }
                }
            }
            if (template.Count > 0)
            {
                EditTemplateManager.AddMoreEditTemplate(template);
            }
            base.DialogResult = DialogResult.OK;
        }