private void tblWorldLevel_Click(object sender, EventArgs e) { TableLayoutPanelCellPosition pos = GetCellPosition(tblWorldLevel); //RowNum Then Colnum lblEditor.Text = "Now Editing Cell: " + Char.ConvertFromUtf32(pos.Row + 65) + ":" + (pos.Column + 1); DataTypes.roomInfo RoomEdit = new DataTypes.roomInfo(); RoomEdit = ThisFloor.CurrentFloor[pos.Row, pos.Column]; frmRoomEditor NewForm = new frmRoomEditor(RoomEdit, world.Count, false); NewForm.ShowDialog(); //Wait while room is edited if (NewForm.ChangeMade == true) { ThisFloor.CurrentFloor[pos.Row, pos.Column] = NewForm.Room; world[FloorNum] = ThisFloor; } tblWorldLevel.Refresh(); }
private void txtBuilding_MouseDoubleClick(object sender, MouseEventArgs e) { DataTypes dt = new DataTypes(); DataTypes.Building Building = new DataTypes.Building(); if (Room.Building.BuildingName != null) { Building = Room.Building; } frmRoomEditor NewForm = new frmRoomEditor(dt.BuildingIntoRoom(Building), FloorCount, true); NewForm.ShowDialog(); if (NewForm.ChangeMade == true) { Building = dt.RoomIntoBuilding(NewForm.Room); Room.Building = Building; txtBuilding.Text = Building.BuildingName; } }
private void txtBuilding_MouseDoubleClick(object sender, MouseEventArgs e) { DataTypes dt = new DataTypes(); DataTypes.Building Building = new DataTypes.Building(); if (Room.Building.BuildingName != null) Building = Room.Building; frmRoomEditor NewForm = new frmRoomEditor(dt.BuildingIntoRoom(Building),FloorCount,true); NewForm.ShowDialog(); if (NewForm.ChangeMade == true) { Building = dt.RoomIntoBuilding(NewForm.Room); Room.Building = Building; txtBuilding.Text = Building.BuildingName; } }