Exemplo n.º 1
0
        private void LoadMap(object sender, RoutedEventArgs e)
        {
            Button    b      = (Button)sender;
            MapWindow window = new MapWindow(true, new MapBasicInfo(b.Content.ToString(), new Size()));

            window.Show();
            this.Close();
        }
Exemplo n.º 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (textBoxName.Text.Length > 0)
     {
         Size         mapSize = new Size(int.Parse(textBoxWidth.Text), int.Parse(textBoxHeight.Text));
         MapBasicInfo map     = new MapBasicInfo(textBoxName.Text, mapSize);
         MapWindow    window  = new MapWindow(false, map);
         window.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Map name is mandatory ...");
     }
 }