Example #1
0
 /// <devdoc>
 /// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.FontUnit'/> class with a <see cref='System.Web.UI.WebControls.FontSize'/>.</para>
 /// </devdoc>
 public FontUnit(FontSize type)
 {
     if (type < FontSize.NotSet || type > FontSize.XXLarge)
     {
         throw new ArgumentOutOfRangeException("type");
     }
     this.type = type;
     if (this.type == FontSize.AsUnit)
     {
         value = Unit.Point(10);
     }
     else
     {
         value = Unit.Empty;
     }
 }
Example #2
0
            public override void Apply(Calendar wc)
            {
                ClearCalendar(wc);

                wc.DayNameFormat  = DayNameFormat.FirstLetter;
                wc.NextPrevFormat = NextPrevFormat.FullMonth;
                wc.TitleFormat    = TitleFormat.Month;

                wc.CellPadding   = 2;
                wc.CellSpacing   = 0;
                wc.ShowGridLines = false;

                wc.Height      = Unit.Pixel(220);
                wc.Width       = Unit.Pixel(400);
                wc.BackColor   = Color.White;
                wc.BorderColor = Color.Black;
                wc.ForeColor   = Color.Black;
                wc.Font.Name   = "Times New Roman";
                wc.Font.Size   = FontUnit.Point(10);

                wc.TitleStyle.Font.Bold     = true;
                wc.TitleStyle.ForeColor     = Color.White;
                wc.TitleStyle.BackColor     = Color.Black;
                wc.TitleStyle.Font.Size     = FontUnit.Point(13);
                wc.TitleStyle.Height        = Unit.Point(14);
                wc.NextPrevStyle.ForeColor  = Color.White;
                wc.NextPrevStyle.Font.Size  = FontUnit.Point(8);
                wc.DayHeaderStyle.Font.Bold = true;
                wc.DayHeaderStyle.Font.Size = FontUnit.Point(7);
                wc.DayHeaderStyle.Font.Name = "Verdana";
                wc.DayHeaderStyle.BackColor = Color.FromArgb(0xCC, 0xCC, 0xCC);
                wc.DayHeaderStyle.ForeColor = Color.FromArgb(0x33, 0x33, 0x33);
                wc.DayHeaderStyle.Height    = Unit.Pixel(10);
                wc.SelectorStyle.BackColor  = Color.FromArgb(0xCC, 0xCC, 0xCC);
                wc.SelectorStyle.ForeColor  = Color.FromArgb(0x33, 0x33, 0x33);
                wc.SelectorStyle.Font.Bold  = true;
                wc.SelectorStyle.Font.Size  = FontUnit.Point(8);
                wc.SelectorStyle.Font.Name  = "Verdana";
                wc.SelectorStyle.Width      = Unit.Percentage(1);

                wc.DayStyle.Width               = Unit.Percentage(14);
                wc.TodayDayStyle.BackColor      = Color.FromArgb(0xCC, 0xCC, 0x99);
                wc.SelectedDayStyle.BackColor   = Color.FromArgb(0xCC, 0x33, 0x33);
                wc.SelectedDayStyle.ForeColor   = Color.White;
                wc.OtherMonthDayStyle.ForeColor = Color.FromArgb(0x99, 0x99, 0x99);
            }
Example #3
0
            public override void Apply(Calendar wc)
            {
                ClearCalendar(wc);

                wc.DayNameFormat  = DayNameFormat.Short;
                wc.NextPrevFormat = NextPrevFormat.ShortMonth;
                wc.TitleFormat    = TitleFormat.MonthYear;

                wc.CellPadding   = 2;
                wc.CellSpacing   = 1;
                wc.ShowGridLines = false;

                wc.Height      = Unit.Pixel(250);
                wc.Width       = Unit.Pixel(330);
                wc.BackColor   = Color.White;
                wc.BorderColor = Color.Black;
                wc.BorderStyle = UI.WebControls.BorderStyle.Solid;
                wc.ForeColor   = Color.Black;
                wc.Font.Name   = "Verdana";
                wc.Font.Size   = FontUnit.Point(9);

                wc.TitleStyle.Font.Bold     = true;
                wc.TitleStyle.ForeColor     = Color.White;
                wc.TitleStyle.BackColor     = Color.FromArgb(0x33, 0x33, 0x99);
                wc.TitleStyle.Font.Size     = FontUnit.Point(12);
                wc.TitleStyle.Height        = Unit.Point(12);
                wc.NextPrevStyle.Font.Bold  = true;
                wc.NextPrevStyle.Font.Size  = FontUnit.Point(8);
                wc.NextPrevStyle.ForeColor  = Color.White;
                wc.DayHeaderStyle.ForeColor = Color.FromArgb(0x33, 0x33, 0x33);
                wc.DayHeaderStyle.Font.Bold = true;
                wc.DayHeaderStyle.Font.Size = FontUnit.Point(8);
                wc.DayHeaderStyle.Height    = Unit.Point(8);

                wc.DayStyle.BackColor           = Color.FromArgb(0xCC, 0xCC, 0xCC);
                wc.TodayDayStyle.BackColor      = Color.FromArgb(0x99, 0x99, 0x99);
                wc.TodayDayStyle.ForeColor      = Color.White;
                wc.SelectedDayStyle.BackColor   = Color.FromArgb(0x33, 0x33, 0x99);
                wc.SelectedDayStyle.ForeColor   = Color.White;
                wc.OtherMonthDayStyle.ForeColor = Color.FromArgb(0x99, 0x99, 0x99);
            }
Example #4
0
 /// <devdoc>
 /// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.FontUnit'/> class with an integer value.</para>
 /// </devdoc>
 public FontUnit(int value)
 {
     this.type  = FontSize.AsUnit;
     this.value = Unit.Point(value);
 }