C#版: using System; using System.Web; using System.Web.UI; using System.Collections; using System.Collections.Specialized; using System.Globalization; using System.Reflection; using System.Text; [assembly: AssemblyTitle("")] [assembly: AssemblyDescription("A QuickStart Tutorial Assembly")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft QuickStart Tutorials")] [assembly: AssemblyCopyright(" Microsoft Corporation. All rights reserved.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.1.*")] namespace Acme { public class Calendar : Control, IPostBackEventHandler, IPostBackDataHandler { private String[] monthNames = new String[12]; private DateTime currentDate = DateTime.Now; private String backColor = "#dcdcdc"; private String foreColor = "#eeeeee"; protected override void OnInit(EventArgs E) { Page.RegisterRequiresPostBack(this); currentDate = DateTime.Now; monthNames[0] = "January"; monthNames[1] = "February"; monthNames[2] = "March"; monthNames[3] = "April"; monthNames[4] = "May"; monthNames[5] = "June"; monthNames[6] = "July"; monthNames[7] = "August"; monthNames[8] = "September"; monthNames[9] = "October"; monthNames[10] = "November"; monthNames[11] = "December"; |