资源简介
c# winfrom万年历 c# winfrom万年历
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender EventArgs e)
{
richTextBox1.Text += “星期日\t星期一\t星期二\t星期三\t星期四\t星期五\t星期六\t“;
string year = textBox1.Text.Trim();
string month = textBox2.Text.Trim();
string data = textBox1.Text.Trim() + “-“ + textBox2.Text.Trim() + “-“ + “1“;
DateTime datetime = DateTime.Parse(data);
if (month == “1“ || month == “3“ || month == “5“ || month == “7“ || month == “8“ || month == “10“ || month == “12“)
{
Print(datetime 31);
}
else if (month == “4“ || month == “6“ || month == “9“ || month == “11“)
{
Print(datetime 30);
}
else
{
int two = datetime.DayOfYear;
string dating = textBox1.Text.Trim() + “-“ + “3-1“;
DateTime date_three = DateTime.Parse(dating);
int three = date_three.DayOfYear;
Print(datetime (three - two));
}
}
public void Print(DateTime date int days)
{
int weeks = (int)date.DayOfWeek;
richTextBox1.Text += “\r\n“;
for (int i = 0; i < weeks; i++)
{
richTextBox1.Text += “\t“;
}
for (int i = 0; i < 7 - weeks; i++)
{
richTextBox1.Text += (i + 1).ToString() + “\t“;
}
richTextBox1.Text += “\r\n“;
for (int i = 7 - weeks + 1; i <= days; i++)
{
if ((i + weeks - 7) % 7 == 0)
{
richTextBox1.Text += i.ToString() + “\t“ + “\r\n“;
}
else
{
richTextBox1.Text += i.ToString() + “\t“;
}
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 10240 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 22016 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 14328 2009-12-05 18:03 万年历\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2007-07-21 01:33 万年历\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 2338 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 4549 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 5814 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 1367 2009-12-05 18:03 万年历\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 847 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
文件 10240 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
文件 180 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
文件 22016 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
文件 180 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources
文件 505 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs
文件 1380 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs
文件 2898 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs
文件 5612 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx
文件 1109 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs
文件 249 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings
文件 3759 2009-11-26 17:54 万年历\WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj
文件 962 2009-11-26 13:42 万年历\WindowsFormsApplication1\WindowsFormsApplication1.sln
文件 15360 2009-12-05 18:03 万年历\WindowsFormsApplication1\WindowsFormsApplication1.suo
文件 10240 2009-11-26 14:15 万年历\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe
文件 26112 2009-11-26 14:15 万年历\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.pdb
文件 14328 2009-11-26 18:46 万年历\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe
文件 490 2009-06-11 05:14 万年历\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.manifest
文件 2344 2009-11-26 14:17 万年历\WindowsFormsApplication2\Form1.cs
文件 4548 2009-11-26 13:43 万年历\WindowsFormsApplication2\Form1.Designer.cs
文件 5814 2009-11-26 13:43 万年历\WindowsFormsApplication2\Form1.resx
文件 1229 2009-11-26 18:46 万年历\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.csproj.FileListAbsolute.txt
............此处省略33个文件信息
相关资源
- C#随机生成发货地址,生成详细地址,
- 构建Delaunay三角网的c#源程序
- C#创建windows服务+Form+Web调用服务
- P2P之UDP穿透NAT的原理与C#实现
- 国家商用密码算法开放动态库及演示
- C# WinForm TreeListView控件用法
- c# picture下图片移动
- C# 简单的tcp服务器demo
- C#.net发送邮件完整源代码DEMO完整版
- c#的P2P聊天程序完整源码
- SQLite操作类C#
- C#的GDI+绘制图形分层拖放操作源码
- C#调用Ansys二次开发
- 超漂亮的C#登录窗口动画效果
- C#将jpg格式图像转换为数据流,数据流
- 双滑块控件.rar
- c# 验证码识别源代码
- C# 实现Windows任务管理器源代码
- TINdelaunay三角网生成算法
- 最完整的一套C#读取与写入GIS地图数据
- C#实现的表达式解析与计算动态库TE
- C#贪吃蛇C#贪吃蛇C#贪吃蛇
- 写字板C#写的windows窗体编程
- c# 图像 图像放大 图像放大缩小 以鼠
- Visual C#.NET串口通信及测控应用典型超
- C#实现图像腐蚀运算、膨胀运算、开运
- C#建立最简单的Web服务,无需IIS
- [免积分]C#制作的Winform窗体设计器(仿
- C#+ComboBox联想输入+代码类
- 比较完善的C#中调用mapx教程
评论
共有 条评论