コード例 #1
0
 public SingleBooking(DateTime dateTime, int roomID, DailySchedule.TimeSlot timeSlot, Booking booking)
 {
     dateTime_ = dateTime;
     roomID_ = roomID;
     timeSlot_ = timeSlot;
     booking_ = booking;
 }
コード例 #2
0
 public Booking(Booking mBooking)
 {
     booked_ = mBooking.booked_;
     type_ = mBooking.type_;
     bookedBy_ = mBooking.bookedBy_;
     title_ = mBooking.title_;
     description_ = mBooking.description_;
 }
コード例 #3
0
 //===============================================================================
 // Constructors and Destructors
 //===============================================================================
 public DailySchedule()
 {
     timeBooking_ = new Booking[MaxBookings];
     for(int i = 0; i < MaxBookings; ++i)
     {
         timeBooking_[i] = new Booking();
     }
 }
コード例 #4
0
 public WeeklyBooking(Calendar.Semester semester, DayOfWeek dayOfWeek, int roomID, DailySchedule.TimeSlot timeSlot, Booking booking)
 {
     semester_ = semester;
     roomID_ = roomID;
     dayOfWeek_ = dayOfWeek;
     timeSlot_ = timeSlot;
     booking_ = booking;
 }
コード例 #5
0
 //===============================================================================
 // Public Methods
 //===============================================================================
 public bool AddBooking(Booking newBooking, TimeSlot timeSlot)
 {
     if (CheckBooking(timeSlot))
     {
         return false;
     }
     else
     {
         timeBooking_[(int)timeSlot] = newBooking;
         return true;
     }
 }
コード例 #6
0
        public InfoBox(Booking booking)
        {
            InitializeComponent();
            textbox.Location = new System.Drawing.Point(10, 10);
            textbox.AutoWordSelection = true;
            textbox.ScrollBars = RichTextBoxScrollBars.ForcedVertical;
            textbox.Size = new System.Drawing.Size(this.ClientSize.Width - 20, this.ClientSize.Height - 20);
            textbox.Text = "Name: " + booking.Title +
                "\nDescription: " + booking.Description +
                "\nOwner of Booking: " + booking.BookedBy;
            this.Controls.Add(this.textbox);

        }