資源簡介
一個比較適合用來交作業的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新聞網站(畢業設計)
- 下一篇:圖像加密算法與實踐
評論
共有 條評論