万年历(主要实现的功能是日历功能 呵呵)

时间:2014-07-12 04:47:19
【文件属性】:

文件名称:万年历(主要实现的功能是日历功能 呵呵)

文件大小:929B

文件格式:SLN

更新时间:2014-07-12 04:47:19

日历

sing System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Globalization; namespace PowerCalendar { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { string intmonth = monthCalendar1.TodayDate.Month.ToString();//当前月分 string intdaty = monthCalendar1.TodayDate.Day.ToString();//当前日期 if (monthCalendar1.TodayDate.Month < 10) { intmonth = "0" + monthCalendar1.TodayDate.Month.ToString(); } if (monthCalendar1.TodayDate.Day < 10) { intdaty = "0" + monthCalendar1.TodayDate.Day.ToString(); } string s = String.Format("{0}年{1}月{2}", GetStemBranch(monthCalendar1.TodayDate), GetMonth(monthCalendar1.TodayDate),GetDay(monthCalendar1.TodayDate));//把当前日期转化成中国传统日期 label1.Text = monthCalendar1.TodayDate.Year + "年" + intmonth + "月" + intdaty + "日" + " " + s + " " + getReturnYear(monthCalendar1.TodayDate) + "年"; label1.ForeColor = Color.Green; }


网友评论