// Click en el botón "Cargar plantilla" private void btnLoad_Click(object sender, RoutedEventArgs e) { if (edit) // Para el modo "Editor de plantillas del restaurante" { RoomEditorWin win = (RoomEditorWin)this.dad; foreach (RoomInf room in list) { if (room.Name.Equals(((RoomItem)listVRooms.SelectedValue).Name)) { win.loadSelectedRoom(room.Name, room.Height, room.Width); } } } else { // Para el modo "Gestor de mesas" JourneyManagerWin win = (JourneyManagerWin)this.dad; win.loadSelectedRoom(((RoomItem)listVRooms.SelectedValue).Name, resetJourney); } this.Visibility = Visibility.Hidden; }
// Método constructor public NewRoomDialog(RoomEditorWin editor) { this.editor = editor; InitializeComponent(); }
// Click en el botón "Editar salón" private void btnRoom_Click(object sender, RoutedEventArgs e) { RoomEditorWin editor = new RoomEditorWin(); editor.Show(); }