Example #1
0
        private void ToolStripMenuItemAdd_Click(object sender, EventArgs e)
        {
            GeoInfoLayer gl  = new GeoInfoLayer();
            FormLayer    frm = new FormLayer(gl);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(gl.TableName);
                item.SubItems.Add(gl.ColName);
                item.SubItems.Add(LAYER_TYPE[gl.Type]);
                item.SubItems.Add(gl.Distance.ToString());
                item.SubItems.Add(gl.Head);
                item.SubItems.Add(gl.Foot);
                listViewLayers.Items.Add(item);
                gList.Add(gl);
            }
        }
Example #2
0
        private void ToolStripMenuItemMod_Click(object sender, EventArgs e)
        {
            if (listViewLayers.SelectedItems.Count == 0)
            {
                return;
            }
            GeoInfoLayer gl  = gList[listViewLayers.SelectedItems[0].Index];
            FormLayer    frm = new FormLayer(gl);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                listViewLayers.SelectedItems[0].SubItems[0].Text = gl.TableName;
                listViewLayers.SelectedItems[0].SubItems[1].Text = gl.ColName;
                listViewLayers.SelectedItems[0].SubItems[2].Text = LAYER_TYPE[gl.Type];
                listViewLayers.SelectedItems[0].SubItems[3].Text = gl.Distance.ToString();
                listViewLayers.SelectedItems[0].SubItems[4].Text = gl.Head;
                listViewLayers.SelectedItems[0].SubItems[5].Text = gl.Foot;
            }
        }
Example #3
0
 private void ToolStripMenuItemAdd_Click(object sender, EventArgs e)
 {
     GeoInfoLayer gl = new GeoInfoLayer();
     FormLayer frm = new FormLayer(gl);
     if(frm.ShowDialog(this) == DialogResult.OK)
     {
         ListViewItem item = new ListViewItem(gl.TableName);
         item.SubItems.Add(gl.ColName);
         item.SubItems.Add(LAYER_TYPE[gl.Type]);
         item.SubItems.Add(gl.Distance.ToString());
         item.SubItems.Add(gl.Head);
         item.SubItems.Add(gl.Foot);
         listViewLayers.Items.Add(item);
         gList.Add(gl);
     }
 }
Example #4
0
 private void ToolStripMenuItemMod_Click(object sender, EventArgs e)
 {
     if(listViewLayers.SelectedItems.Count == 0)
         return;
     GeoInfoLayer gl = gList[listViewLayers.SelectedItems[0].Index];
     FormLayer frm = new FormLayer(gl);
     if(frm.ShowDialog(this) == DialogResult.OK)
     {
         listViewLayers.SelectedItems[0].SubItems[0].Text = gl.TableName;
         listViewLayers.SelectedItems[0].SubItems[1].Text = gl.ColName;
         listViewLayers.SelectedItems[0].SubItems[2].Text = LAYER_TYPE[gl.Type];
         listViewLayers.SelectedItems[0].SubItems[3].Text = gl.Distance.ToString();
         listViewLayers.SelectedItems[0].SubItems[4].Text = gl.Head;
         listViewLayers.SelectedItems[0].SubItems[5].Text = gl.Foot;
     }
 }