예제 #1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MapVersion mv  = new MapVersion();
            var        box = new MapVersionEditor(mv, this.MainWindow.ImagesUserControl.AvailableImages);
            var        dr  = box.ShowDialog();

            if (dr != DialogResult.OK)
            {
                return;
            }
            box.StoreConfig(mv);
            this.MapVersionList.Items.Add(this.CreateLvi(mv));
        }
예제 #2
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem lvi in this.MapVersionList.SelectedItems)
            {
                MapVersion mapVersion = (MapVersion)lvi.Tag;
                var        box        = new MapVersionEditor(mapVersion, this.MainWindow.ImagesUserControl.AvailableImages);

                var dr = box.ShowDialog();
                if (dr != DialogResult.OK)
                {
                    return;
                }
                box.StoreConfig(mapVersion);
                lvi.SubItems[0].Text = mapVersion.Name;
                lvi.SubItems[1].Text = mapVersion.Type.ToString();
                lvi.SubItems[2].Text = mapVersion.File;
                lvi.SubItems[3].Text = mapVersion.CoordsFile;
                lvi.SubItems[4].Text = String.Join(", ", mapVersion.Name);
            }
        }