资源简介
一个比较适合用来交作业的c#项目,内容小但是代码还是适合初学者的。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace QiuQiu.Dushu
{
public partial class DushuControl : UserControl
{
private int _leftBlank;//左空
private int _rightBlank;//右空
private int _topBlank;//上空
private int _bottomBlank;//下空
private int _cellWidth;//单元格宽
private int _cellHeight;//单元格高
private int _lineWidth;//细线宽
private int _line2Width;//粗线宽
private int _sideLength;//边长
private int _curRow;//当前行
private int _curCol;//当前列
private Color _lineColor;//线颜色
private Color _textColor;//字颜色
private Color _textConstColor;//常数字颜色
private Font _textFront;//字体
private NumberButton[] _buttons;//按钮
private bool _buttonAdded;//是否已经添加按钮
private bool _isManSet;//是否在人工添加数字
private DushuoData _data;//独数数据
///
/// 独数数据
///
internal DushuoData Data
{
get { return _data; }
set
{
_data = value;
if (_buttonAdded)
{
UpdateButtons();
}
else
{
AddButtons();
}
}
}
public DushuControl()
{
InitializeComponent();
_leftBlank = 40;
_rightBlank = 40;
_topBlank = 40;
_bottomBlank = 40;
_cellHeight = 40;
_cellWidth = 40;
_lineWidth = 1;
_line2Width = 2;
_sideLength = 9;
_lineColor = Color.Black;
_textColor = Color.Blue;
_textConstColor = Color.Red;
_textFront = new Font(new FontFamily(“宋体“) _cellWidth / 2 Fontstyle.Bold);
base.Size = new Size(_sideLength * _cellWidth + _leftBlank + _rightBlank _sideLength * _cellHeight + _topBlank + _bottomBlank);
}
///
/// 添加按钮
///
private void AddButtons()
{
_buttons = new NumberButton[_sideLength _sideLength];
if (_data == null)
return;
string str;
//定义按钮
NumberButton numbutton = new NumberButton();
numbutton.Font = _textFront;
numbutton.Size = new Size(_cellWidth - 2 _cellHeight - 2);
numbutton.ForeColor = _textColor;
//定义常数按钮
NumberButton constbutton = new NumberButton();
constbutton.Font = _textFront;
constbutton.Size = new Size(_cellWidth - 2 _cellHeight - 2);
constbutton.ForeColor = _textConstColor;
for (int r = 0; r < _
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 161 2015-06-14 14:43 C#数独游戏源代码\app.config
文件 4872 2007-12-31 16:27 C#数独游戏源代码\Backup\Dushu.csproj
文件 1591 2007-12-30 23:25 C#数独游戏源代码\Backup\Dushu.sln
..A..H. 31744 2008-03-04 14:45 C#数独游戏源代码\Backup\Dushu.v12.suo
文件 10455 2007-12-31 22:09 C#数独游戏源代码\Backup\DushuControl.cs
文件 2401 2007-12-31 18:30 C#数独游戏源代码\Backup\DushuControl.Designer.cs
文件 5814 2007-12-31 18:30 C#数独游戏源代码\Backup\DushuControl.resx
文件 27253 2008-03-04 12:54 C#数独游戏源代码\Backup\DushuoData.cs
文件 3246 2007-12-31 22:00 C#数独游戏源代码\Backup\MainForm.cs
文件 5752 2007-12-31 20:29 C#数独游戏源代码\Backup\MainForm.Designer.cs
文件 5814 2007-12-31 20:29 C#数独游戏源代码\Backup\MainForm.resx
文件 1241 2007-12-31 15:32 C#数独游戏源代码\Backup\NumberButton.cs
文件 3512 2007-12-31 14:08 C#数独游戏源代码\Backup\Program.cs
文件 1342 2007-12-28 17:24 C#数独游戏源代码\Backup\Properties\AssemblyInfo.cs
文件 2848 2007-12-28 17:25 C#数独游戏源代码\Backup\Properties\Resources.Designer.cs
文件 5612 2007-12-28 17:24 C#数独游戏源代码\Backup\Properties\Resources.resx
文件 1110 2007-12-28 17:25 C#数独游戏源代码\Backup\Properties\Settings.Designer.cs
文件 249 2007-12-28 17:24 C#数独游戏源代码\Backup\Properties\Settings.settings
文件 2185 2007-12-31 16:58 C#数独游戏源代码\Backup\SelectButton.cs
文件 2591 2007-12-31 17:07 C#数独游戏源代码\Backup\SelectNumberPanel.cs
文件 1328 2007-12-31 16:17 C#数独游戏源代码\Backup\SelectNumberPanel.Designer.cs
文件 5814 2007-12-31 16:17 C#数独游戏源代码\Backup\SelectNumberPanel.resx
文件 24064 2007-12-31 18:30 C#数独游戏源代码\bin\Debug\Dushu.exe
文件 75264 2007-12-31 18:30 C#数独游戏源代码\bin\Debug\Dushu.pdb
文件 14680 2007-12-31 18:30 C#数独游戏源代码\bin\Debug\Dushu.vshost.exe
文件 473 2007-02-21 18:51 C#数独游戏源代码\bin\Debug\Dushu.vshost.exe.manifest
文件 25088 2015-06-14 16:09 C#数独游戏源代码\bin\Release\Dushu.exe
文件 161 2015-06-14 14:43 C#数独游戏源代码\bin\Release\Dushu.exe.config
文件 65024 2015-06-14 16:09 C#数独游戏源代码\bin\Release\Dushu.pdb
文件 10271 2008-01-08 10:25 C#数独游戏源代码\bin\Release\Dushu.rar
............此处省略79个文件信息
- 上一篇:ASP.NET+SQL新闻网站(毕业设计)
- 下一篇:图像加密算法与实践
相关资源
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
评论
共有 条评论