@@ -0,0 +1,1470 @@
+package com.gruppe27.fellesprosjekt.client.controllers;%0A%0Aimport java.time.LocalDate;%0Aimport java.time.LocalTime;%0A%0Aimport com.gruppe27.fellesprosjekt.client.CalendarClient;%0Aimport com.gruppe27.fellesprosjekt.common.Event;%0Aimport com.gruppe27.fellesprosjekt.common.messages.EventMessage;%0A%0Aimport javafx.fxml.FXML;%0Aimport javafx.scene.control.Button;%0Aimport javafx.scene.control.ChoiceBox;%0Aimport javafx.scene.control.DatePicker;%0Aimport javafx.scene.control.ListView;%0Aimport javafx.scene.control.TextField;%0A%0Apublic class CreateEventController %7B%0A%09%0A%09@FXML%0A%09TextField emne;%0A%09%0A%09@FXML%0A%09DatePicker dato;%0A%09%0A%09@FXML%0A%09TextField fraTid;%0A%09%0A%09@FXML%0A%09TextField tilTid;%0A%09%0A%09@FXML%0A%09ListView deltakere;%0A%09%0A%09@FXML%0A%09ChoiceBox romValg;%0A%09%0A%09@FXML%0A%09Button createEventButton;%0A%09%0A%09@FXML%0A%09Button cancelButton;%0A%0A%09private CalendarClient calendarClient;%0A%09%0A%09@FXML%0A%09private void handleCreateEventAction()%7B%0A%09%09Event event = new Event();%0A%09%09event.setName(emne.getText());%0A%09%0A%09%09event.setDate(dato.getValue());%0A%09%09%0A%09%09LocalTime startTime = LocalTime.parse(fraTid.getText());%0A%09%09LocalTime endTime = LocalTime.parse(tilTid.getText());%0A%09%09event.setStartTime(startTime);%0A%09%09event.setEndTime(endTime);%0A%09%09event.setCreator(calendarClient.getUser());%0A%09%09%0A%09%09EventMessage message = new EventMessage(EventMessage.Command.CREATE_EVENT, event);%0A%09%09calendarClient.sendMessage(message);%0A%09%7D%0A%09%0A%09private void handleCancelAction()%7B%0A%09%09%0A%09%7D%0A%0A%09public void setClient(CalendarClient calendarClient) %7B%0A%09%09this.calendarClient = calendarClient;%0A%09%7D%0A%0A%7D%0A

Add CreateEventController