/// <summary> /// Create a new Room form /// </summary> /// <param name="centre">Centre the new Room is in</param> internal MeetingRoomForm(MeetingCentre centre) { this._name = string.Empty; this._code = string.Empty; this._description = string.Empty; this._capacity = 0; this._videoConference = false; this.Instance = null; this.Centre = centre; this.PropertyChanged = null; }
/// <summary> /// Create a Form from a Room /// </summary> /// <param name="room">Source MeetingRoom</param> internal MeetingRoomForm(MeetingRoom room) { this._name = room.Name; this._code = room.Code; this._description = room.Description; this._capacity = room.Capacity; this._videoConference = room.VideoConference; this.Instance = room; this.Centre = null; this.PropertyChanged = null; }
/// <summary> /// Sets the value of MeetingCentre. /// Used for importing from JSON and XML. /// </summary> /// <param name="centre">Assigning MeetingCentre</param> public void AssignMeetingCentre(MeetingCentre centre) { if (this.MeetingCentre is null) { this.MeetingCentre = centre; } else { throw new System.Exception("Meeting Centre has already been set"); } }
/// <summary> /// Create a form for a new Meeting Room in a Meeting Centre /// </summary> /// <param name="centre">Meeting Room's parent Centre</param> /// <returns cref="MeetingCentreForm">Blank MeetingRoomForm</returns> public static MeetingRoomForm GetNewForm(MeetingCentre centre) { return(new MeetingRoomForm(centre)); }
/// <summary> /// Creates a Room in a Meeting Centre /// </summary> /// <param name="meetingCentre">Parent Meeting Centre</param> public MeetingRoom(MeetingCentre meetingCentre) { this.MeetingCentre = meetingCentre; this.Reservations = new ObservableDictionary <string, ObservableCollection <MeetingReservation> >(); this.Reservations.CollectionChanged += ReservationsDictionaryChanged; }