Example #1
0
 private void buttonAddMap_Click(object sender, EventArgs e)
 {
     MapFile mf = new MapFile("", "");
     FormMap frm = new FormMap(mf);
     if(frm.ShowDialog(this) == DialogResult.OK)
     {
         ListViewItem item = new ListViewItem(mf.Name);
         item.SubItems.Add(mf.File);
         listViewMaps.Items.Add(item);
         mlist.Add(mf);
     }
 }
Example #2
0
        private void buttonAddMap_Click(object sender, EventArgs e)
        {
            MapFile mf  = new MapFile("", "");
            FormMap frm = new FormMap(mf);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(mf.Name);
                item.SubItems.Add(mf.File);
                listViewMaps.Items.Add(item);
                mlist.Add(mf);
            }
        }
Example #3
0
        private void ToolStripMenuItemMod_Click(object sender, EventArgs e)
        {
            if (listViewMaps.SelectedItems.Count == 0)
            {
                return;
            }
            MapFile mf  = mlist[listViewMaps.SelectedItems[0].Index];
            FormMap frm = new FormMap(mf);

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                listViewMaps.SelectedItems[0].SubItems[0].Text = mf.Name;
                listViewMaps.SelectedItems[0].SubItems[1].Text = mf.File;
            }
        }
Example #4
0
 private void ToolStripMenuItemMod_Click(object sender, EventArgs e)
 {
     if(listViewMaps.SelectedItems.Count == 0)
         return;
     MapFile mf = mlist[listViewMaps.SelectedItems[0].Index];
     FormMap frm = new FormMap(mf);
     if(frm.ShowDialog(this) == DialogResult.OK)
     {
         listViewMaps.SelectedItems[0].SubItems[0].Text = mf.Name;
         listViewMaps.SelectedItems[0].SubItems[1].Text = mf.File;
     }
 }