Exemple #1
0
 private void resizeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Size thisSize = new Size(currentMap.width, currentMap.height);
     using(ComposedForm form = new ComposedForm("Resize map", ComposedForm.Parts.Size)) {
         form.SetSize(thisSize);
         if (form.ShowDialog() == DialogResult.OK) {
             Size newSize = form.GetSize();
             if (thisSize != newSize) {
                 currentMap.Resize(newSize.Width, newSize.Height);
             }
             mainPanel.Invalidate();
         }
     }
 }