Beispiel #1
0
 private void bWorldEdit_Click( object sender, EventArgs e ) {
     AddWorldPopup popup = new AddWorldPopup( worlds[dgvWorlds.SelectedRows[0].Index] );
     if( popup.ShowDialog() == DialogResult.OK ) {
         string oldName = worlds[dgvWorlds.SelectedRows[0].Index].name;
         worlds[dgvWorlds.SelectedRows[0].Index] = popup.world;
         HandleWorldRename( oldName, popup.world.name );
     }
 }
Beispiel #2
0
 private void bAddWorld_Click( object sender, EventArgs e ) {
     AddWorldPopup popup = new AddWorldPopup( null );
     if( popup.ShowDialog() == DialogResult.OK ) {
         worlds.Add( popup.world );
     }
     string mainWorldName;
     if( cMainWorld.SelectedItem == null ) {
         FillWorldList();
         if( cMainWorld.Items.Count > 0 ) {
             cMainWorld.SelectedIndex = 0;
         }
     } else {
         mainWorldName = cMainWorld.SelectedItem.ToString();
         FillWorldList();
         cMainWorld.SelectedItem = mainWorldName;
     }
 }