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