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; } }