CalendarDay.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / CalendarDay.cs / 1 / CalendarDay.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Web.UI.WebControls { 
    using System.ComponentModel; 

    using System; 
    using System.Security.Permissions;


    ///  
    ///     Represents a calendar day.
    ///  
    [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
    [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
    public class CalendarDay { 
        private DateTime date;
        private bool isSelectable;
        private bool isToday;
        private bool isWeekend; 
        private bool isOtherMonth;
        private bool isSelected; 
        private string dayNumberText; 

 
        /// 
        ///    [To be supplied.]
        /// 
        public CalendarDay(DateTime date, bool isWeekend, bool isToday, bool isSelected, bool isOtherMonth, string dayNumberText) { 
            this.date = date;
            this.isWeekend = isWeekend; 
            this.isToday = isToday; 
            this.isOtherMonth  = isOtherMonth;
            this.isSelected = isSelected; 
            this.dayNumberText = dayNumberText;
        }

 
        /// 
        ///     Gets the date represented by an instance of this class. This 
        ///       property is read-only. 
        /// 
        public DateTime Date { 
            get {
                return date;
            }
        } 

 
        ///  
        ///    Gets the string equivilent of the date represented by an instance of this class. This property is read-only.
        ///  
        public string DayNumberText {
            get {
                return dayNumberText;
            } 
        }
 
 
        /// 
        ///    Gets a value indicating whether the date represented by an instance of 
        ///       this class is in a different month from the month currently being displayed. This
        ///       property is read-only.
        /// 
        public bool IsOtherMonth { 
            get {
                return isOtherMonth; 
            } 
        }
 

        /// 
        ///    Gets or sets a value indicating whether the date represented
        ///       by an instance of 
        ///       this class can be selected.
        ///  
        public bool IsSelectable { 
            get {
                return isSelectable; 
            }
            set {
                isSelectable = value;
            } 
        }
 
 
        /// 
        ///     Gets a value indicating whether date represented by an instance of this class is selected. This property is read-only. 
        /// 
        public bool IsSelected {
            get {
                return isSelected; 
            }
        } 
 

        ///  
        ///    Gets a value indicating whether the date represented by an instance of this class is today's date. This property is read-only.
        /// 
        public bool IsToday {
            get { 
                return isToday;
            } 
        } 

 
        /// 
        ///    Gets a value indicating whether the date represented by an instance of
        ///       this class is on a weekend day. This property is read-only.
        ///  
        public bool IsWeekend {
            get { 
                return isWeekend; 
            }
        } 

    }
}
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK