Example #1
0
 private void ShowExitDlg(Exit.Direction direction)
 {
     if (roomList.SelectedIndex != -1)
     {
         EditExit exitdlg = new EditExit(_parent, _area);
         exitdlg.UpdateWindowContents(_area.Rooms[roomList.SelectedIndex], direction);
         DialogResult result = exitdlg.ShowDialog();
         if (result == DialogResult.OK)
         {
             Exit exitData = exitdlg.GetExitData();
             _area.Rooms[roomList.SelectedIndex].ExitData[(int)direction] = exitData;
             UpdateExitButtons(_area.Rooms[roomList.SelectedIndex]);
             this._parent.UpdateRoomMap();
         }
     }
     else
     {
         MessageBox.Show("You can't edit exits without first selecting or creating a room.");
     }
 }
Example #2
0
 private void ShowExitDlg(Exit.Direction direction)
 {
     if( roomList.SelectedIndex != -1 )
     {
         EditExit exitdlg = new EditExit(_parent, _area);
         exitdlg.UpdateWindowContents( _area.Rooms[ roomList.SelectedIndex ], direction );
         DialogResult result = exitdlg.ShowDialog();
         if( result == DialogResult.OK )
         {
             Exit exitData = exitdlg.GetExitData();
             _area.Rooms[roomList.SelectedIndex].ExitData[(int)direction] = exitData;
             UpdateExitButtons(_area.Rooms[roomList.SelectedIndex]);
             this._parent.UpdateRoomMap();
         }
     }
     else
     {
         MessageBox.Show( "You can't edit exits without first selecting or creating a room." );
     }
 }