1 //------------------------------------------------------------------------------
2 // <copyright file="CalendarDay.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6 
7 namespace System.Web.UI.WebControls {
8     using System.ComponentModel;
9 
10     using System;
11 
12 
13     /// <devdoc>
14     ///    <para> Represents a calendar day.</para>
15     /// </devdoc>
16     public class CalendarDay {
17         private DateTime date;
18         private bool isSelectable;
19         private bool isToday;
20         private bool isWeekend;
21         private bool isOtherMonth;
22         private bool isSelected;
23         private string dayNumberText;
24 
25 
26         /// <devdoc>
27         ///    <para>[To be supplied.]</para>
28         /// </devdoc>
CalendarDay(DateTime date, bool isWeekend, bool isToday, bool isSelected, bool isOtherMonth, string dayNumberText)29         public CalendarDay(DateTime date, bool isWeekend, bool isToday, bool isSelected, bool isOtherMonth, string dayNumberText) {
30             this.date = date;
31             this.isWeekend = isWeekend;
32             this.isToday = isToday;
33             this.isOtherMonth  = isOtherMonth;
34             this.isSelected = isSelected;
35             this.dayNumberText = dayNumberText;
36         }
37 
38 
39         /// <devdoc>
40         ///    <para> Gets the date represented by an instance of this class. This
41         ///       property is read-only.</para>
42         /// </devdoc>
43         public DateTime Date {
44             get {
45                 return date;
46             }
47         }
48 
49 
50         /// <devdoc>
51         ///    <para>Gets the string equivilent of the date represented by an instance of this class. This property is read-only.</para>
52         /// </devdoc>
53         public string DayNumberText {
54             get {
55                 return dayNumberText;
56             }
57         }
58 
59 
60         /// <devdoc>
61         ///    <para>Gets a value indicating whether the date represented by an instance of
62         ///       this class is in a different month from the month currently being displayed. This
63         ///       property is read-only.</para>
64         /// </devdoc>
65         public bool IsOtherMonth {
66             get {
67                 return isOtherMonth;
68             }
69         }
70 
71 
72         /// <devdoc>
73         ///    <para>Gets or sets a value indicating whether the date represented
74         ///       by an instance of
75         ///       this class can be selected.</para>
76         /// </devdoc>
77         public bool IsSelectable {
78             get {
79                 return isSelectable;
80             }
81             set {
82                 isSelectable = value;
83             }
84         }
85 
86 
87         /// <devdoc>
88         ///    <para> Gets a value indicating whether date represented by an instance of this class is selected. This property is read-only.</para>
89         /// </devdoc>
90         public bool IsSelected {
91             get {
92                 return isSelected;
93             }
94         }
95 
96 
97         /// <devdoc>
98         ///    <para>Gets a value indicating whether the date represented by an instance of this class is today's date. This property is read-only.</para>
99         /// </devdoc>
100         public bool IsToday {
101             get {
102                 return isToday;
103             }
104         }
105 
106 
107         /// <devdoc>
108         ///    <para>Gets a value indicating whether the date represented by an instance of
109         ///       this class is on a weekend day. This property is read-only.</para>
110         /// </devdoc>
111         public bool IsWeekend {
112             get {
113                 return isWeekend;
114             }
115         }
116 
117     }
118 }
119 
120