热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

C#开发2048小游戏

这应该是几个月前,闲的手痒,敲了一上午代码搞出来的,随之就把它丢弃了,当时让别人玩过,提过几条更改建议,但是时至今日,我也没有进行过优化和更改(本人只会作案,不会收场,嘎嘎),下面的建议要给

 

  这应该是几个月前,闲的手痒,敲了一上午代码搞出来的,随之就把它丢弃了,当时让别人玩过,提过几条更改建议,但是时至今日,我也没有进行过优化和更改(本人只会作案,不会收场,嘎嘎),下面的建议要给代码爱好的童鞋完成了。

更改建议:

a.当数字超过四位数时,显示的时候有部分被它的容器TextBox遮挡了,能不能把显示的数值变小点?答案是可以的。代码里有一段通过矩阵数据填充TextBox值的操作,可以在填充时,判断下数值长度,然后修改TextBox的文字大小。

b.玩游戏的时候,使用方向键移动时,焦点可能没有锁定在自定义控件的画布上,能不能使用方向键移动时,锁定画布?答案是可以的,不敢说出来,因为很简单,说出来就不值得提出这个问题让Reader来做了(哈哈)。

c.还有几条,真的记不住了,唉,老亦。

 

  其实不难,就是多了点,杂了点,喜欢的可以拉走做毕业设计用,如果要说这里面有什么值得看的地方,我觉得应该没有吧,毕竟做的仓促,也没好好的修改。

 

1.应用程序的主入口点:文件名Program.cs,这个简单,可以略过

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;

namespace _2048
{
static class Program
{
///
/// 应用程序的主入口点。
///

[STAThread]
static void Main()
{
AppDomain.CurrentDomain.UnhandledException
+= new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.ThreadException
+= new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(
false);
Application.Run(
new Form1());
}

static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory
+ "Exception.log", DateTime.Now.ToString() + "\t" + e.Exception.Message + Environment.NewLine);
}

static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory
+ "Exception.log", DateTime.Now.ToString() + "\t" + e.ExceptionObject.ToString() + Environment.NewLine);
}
}
}

2.用到的数据模型:文件名Unit.cs,这个简单,可以略过

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace _2048
{
public class Unit
{
public Unit()
{

}

public Unit(int num, bool bMerge)
{
this._num = num;
this._bMerge = bMerge;
}

private int _num = 0;

public int Num
{
get { return _num; }
set { _num = value; }
}

private bool _bMerge = false;

public bool BMerge
{
get { return _bMerge; }
set { _bMerge = value; }
}

//private int _x = 0;

//public int X
//{
// get { return _x; }
// set { _x = value; }
//}

//private int _y = 0;

//public int Y
//{
// get { return _y; }
// set { _y = value; }
//}
}
}

3.自定义控件和算法(设计器和后台文件已合并):文件名GridControl.cs,整个程序的核心内容都在这个文件里,包括2048游戏算法、自定义控件的伸缩、方向键移动控制等等吧,后半部分不用看了,设计器自动生成的,不可或缺,没什么嚼劲。

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 _2048
{
public partial class GridControl : UserControl
{
/*
* 判断结束的必要条件:
* 无论如何移动(上、下、左、右),矩阵中没有空着的位置时,结束
*
*
*1. 初始化参数,初始化数量3
*2. 每次移动,相同数字合并加分
*3. 每次移动,在移动后的随机空格位置处产生一个新数
*/
private int _x = 0;

public int X
{
get { return _x; }
set
{
_x
= value;
CreateTextBox();
}
}

private int _y = 0;

public int Y
{
get { return _y; }
set
{
_y
= value;
CreateTextBox();
}
}

private Unit[][] _matrix = null;
private Random rand = new Random(DateTime.Now.Millisecond);
private int _score = 0;

public int Score
{
get { return _score; }
set { _score = value; }
}

public GridControl()
{
InitializeComponent();
}

public void InitControl()
{
/*初始化矩阵图,以下三个方法的顺序不能颠倒*/
this.InitMatrix();
this.InitParamter();
this.InputData();
}

#region MyRegion

private void CreateTextBox()
{
this.flowLayoutPanel1.Controls.Clear();
this.Size = new System.Drawing.Size(78 * _x + 4, 78 * _y + 4);

for (int j = 0; j <_y; j++)
{
for (int i = 0; i <_x; i++)
{
TextBox textBox
= new TextBox();
textBox.BackColor
= System.Drawing.Color.White;
textBox.Font
= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
textBox.Location
= new System.Drawing.Point(6, 6);
textBox.Name
= "textBox" + i.ToString() + j.ToString();
textBox.ReadOnly
= true;
textBox.Size
= new System.Drawing.Size(71, 71);
textBox.TabIndex
= 0;
textBox.TextAlign
= System.Windows.Forms.HorizontalAlignment.Center;
this.flowLayoutPanel1.Controls.Add(textBox);
}
}
}

///
/// 初始化矩阵
///

private void InitMatrix()
{
_matrix
= new Unit[_x][];

for (int i = 0; i <_x; i++)
{
_matrix[i]
= new Unit[_y];

for (int j = 0; j <_y; j++)
{
_matrix[i][j]
= new Unit();
}
}

this._score = 0;
}

///
/// 初始化参数
///

private void InitParamter()
{
//创建三个初始参数
for (int i = 0; i <3; i++)
{
CreateOneNum();
}
}

private int CountEmpty()
{
int iReturn = 0;

for (int i = 0; i <_x; i++)
{
for (int j = 0; j <_y; j++)
{
if (_matrix[i][j].Num == 0)
iReturn
++;
}
}

return iReturn;
}

///
/// 根据矩阵表填充显示数据
///

private void InputData()
{
for (int i = 0; i <_x; i++)
{
for (int j = 0; j <_y; j++)
{
string name = "textBox" + i.ToString() + j.ToString();
Control[] ctls
= this.flowLayoutPanel1.Controls.Find(name, false);
if (ctls != null)
{
switch (_matrix[i][j].Num)
{
default:
case 0:
{
ctls[
0].Text = string.Empty;
ctls[
0].BackColor = Color.White;
}
break;

case 2:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.BurlyWood;
}
break;

case 4:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.DeepPink;
}
break;

case 8:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.BlueViolet;
}
break;

case 16:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.Chartreuse;
}
break;

case 32:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.Crimson;
}
break;

case 64:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.DarkGray;
}
break;

case 128:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.DarkOliveGreen;
}
break;

case 256:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.DarkSalmon;
}
break;

case 512:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.DarkSlateGray;
}
break;

case 1024:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.GreenYellow;
}
break;

case 2048:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.DodgerBlue;
}
break;

case 4096:
{
ctls[
0].Text = _matrix[i][j].Num.ToString();
ctls[
0].BackColor = Color.Black;
}
break;
}
}
}
}

}

///
/// 游戏是否不能进行
///

/// 是否能进行
private bool CheckGameOver()
{
int countEmpty = CountEmpty();
if (countEmpty == 0)
{
for (int i = 0; i <_x; i++)
{
Unit[] arr
= new Unit[_y];

for (int j = 0; j <_y; j++)
arr[j]
= new Unit(_matrix[i][j].Num, false);

if (Result(ref arr, true))
return true;
}

for (int i = 0; i <_x; i++)
{
Unit[] arr
= new Unit[_y];

for (int j = _y - 1; j >= 0; j--)
arr[_y
- 1 - j] = new Unit(_matrix[i][j].Num, false);

if (Result(ref arr, true))
return true;
}

for (int i = 0; i <_y; i++)
{
Unit[] arr
= new Unit[_x];

for (int j = 0; j <_x; j++)
arr[j]
= new Unit(_matrix[j][i].Num, false);

if (Result(ref arr, true))
return true;
}

for (int i = 0; i <_y; i++)
{
Unit[] arr
= new Unit[_x];

for (int j = _x - 1; j >= 0; j--)
arr[_x
- 1 - j] = new Unit(_matrix[j][i].Num, false);

if (Result(ref arr, true))
return true;
}
return false;
}

return true;
}

private void CreateOneNum()
{
int countEmpty = CountEmpty();
int pos = rand.Next(countEmpty);
int count = 0;

for (int i = 0; i <_x; i++)
{
for (int j = 0; j <_y; j++)
{
if (_matrix[i][j].Num == 0)
{
if (count == pos)
{
int newNum = 0;
if (rand.Next(100) <80)
newNum
= 2;
else
newNum
= 4;
_matrix[i][j].Num
= newNum;

return;
}
count
++;
}
}
}
}

///
/// 核心算法
///

///
///
private bool Result(ref Unit[] arr, bool istest)
{
bool bReturn = false;

while (true)
{
//是否发生移动
bool bMove = false;

//前一个单元
Unit unit = arr[0];

for (int i = 1; i )
{
//如果前面位置为空,当前位置不为空,把当前位置移入前面位置
if (unit.Num == 0 && arr[i].Num > 0)
{
//移动到前一个单元
unit.Num = arr[i].Num;
unit.BMerge
= arr[i].BMerge;

//当前单元清空
arr[i].Num = 0;
arr[i].BMerge
= false;

//移动了才能进入循环
if (!bMove)
{
bMove
= true;
if (!bReturn)
bReturn
= true;
}
}

//如果前面不为空,当前不为空,前面和当前的数字相同并且都没有进行过合并
else if (unit.Num > 0 && arr[i].Num > 0
&& !unit.BMerge && !arr[i].BMerge
&& unit.Num == arr[i].Num)
{
//前一个单元合并操作
unit.Num = unit.Num * 2;
unit.BMerge
= true;

if (!istest)
_score
+= unit.Num;

//当前单元清空
arr[i].Num = 0;
arr[i].BMerge
= false;

//移动了才能进入循环
if (!bMove)
{
bMove
= true;
if (!bReturn)
bReturn
= true;
}
}

unit
= arr[i];
}
if (!bMove)
break;
}

return bReturn;
}

#endregion

internal void MoveUp()
{
bool bMove = false;

for (int i = 0; i <_x; i++)
{
Unit[] arr
= new Unit[_y];

for (int j = 0; j <_y; j++)
{
arr[j]
= _matrix[i][j];
arr[j].BMerge
= false;
}
if (Result(ref arr, false) && !bMove)
bMove
= true;
}
if (bMove)
{
//创建一个新数
CreateOneNum();
}

//显示
InputData();

if (!CheckGameOver())
MessageBox.Show(
" Score: " + _score + "\r\n Game Over!!!");
}

internal void MoveDown()
{
bool bMove = false;

for (int i = 0; i <_x; i++)
{
Unit[] arr
= new Unit[_y];

for (int j = _y - 1; j >= 0; j--)
{
arr[_y
- 1 - j] = _matrix[i][j];
arr[_y
- 1 - j].BMerge = false;
}
if (Result(ref arr, false) && !bMove)
bMove
= true;
}

if (bMove)
{
//创建一个新数
CreateOneNum();
}
//显示
InputData();

if (!CheckGameOver())
MessageBox.Show(
" Score: " + _score + "\r\n Game Over!!!");
}

internal void MoveLeft()
{
bool bMove = false;

for (int i = 0; i <_y; i++)
{
Unit[] arr
= new Unit[_x];

for (int j = 0; j <_x; j++)
{
arr[j]
= _matrix[j][i];
arr[j].BMerge
= false;
}
if (Result(ref arr, false) && !bMove)
bMove
= true;
}

if (bMove)
{
//创建一个新数
CreateOneNum();
}
//显示
InputData();

if (!CheckGameOver())
MessageBox.Show(
" Score: " + _score + "\r\n Game Over!!!");
}

internal void MoveRight()
{
bool bMove = false;

for (int i = 0; i <_y; i++)
{
Unit[] arr
= new Unit[_x];

for (int j = _x - 1; j >= 0; j--)
{
arr[_x
- 1 - j] = _matrix[j][i];
arr[_x
- 1 - j].BMerge = false;
}
if (Result(ref arr, false) && !bMove)
bMove
= true;
}

if (bMove)
{
//创建一个新数
CreateOneNum();
}
//显示
InputData();

if (!CheckGameOver())
MessageBox.Show(
" Score: " + _score + "\r\n Game Over!!!");
}

internal void Back()
{

}

private System.ComponentModel.IContainer compOnents= null;

protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

private void InitializeComponent()
{
this.textBox00 = new System.Windows.Forms.TextBox();
this.textBox10 = new System.Windows.Forms.TextBox();
this.textBox20 = new System.Windows.Forms.TextBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.textBox30 = new System.Windows.Forms.TextBox();
this.textBox01 = new System.Windows.Forms.TextBox();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox21 = new System.Windows.Forms.TextBox();
this.textBox31 = new System.Windows.Forms.TextBox();
this.textBox02 = new System.Windows.Forms.TextBox();
this.textBox12 = new System.Windows.Forms.TextBox();
this.textBox22 = new System.Windows.Forms.TextBox();
this.textBox32 = new System.Windows.Forms.TextBox();
this.textBox03 = new System.Windows.Forms.TextBox();
this.textBox13 = new System.Windows.Forms.TextBox();
this.textBox23 = new System.Windows.Forms.TextBox();
this.textBox33 = new System.Windows.Forms.TextBox();
this.flowLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// textBox00
//
this.textBox00.BackColor = System.Drawing.Color.White;
this.textBox00.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox00.Location = new System.Drawing.Point(6, 6);
this.textBox00.Name = "textBox00";
this.textBox00.ReadOnly= true;
this.textBox00.Size = new System.Drawing.Size(71, 71);
this.textBox00.TabIndex = 0;
this.textBox00.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox10
//
this.textBox10.BackColor = System.Drawing.Color.White;
this.textBox10.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox10.Location = new System.Drawing.Point(83, 6);
this.textBox10.Name = "textBox10";
this.textBox10.ReadOnly= true;
this.textBox10.Size = new System.Drawing.Size(71, 71);
this.textBox10.TabIndex = 3;
this.textBox10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox20
//
this.textBox20.BackColor = System.Drawing.Color.White;
this.textBox20.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox20.Location = new System.Drawing.Point(160, 6);
this.textBox20.Name = "textBox20";
this.textBox20.ReadOnly= true;
this.textBox20.Size = new System.Drawing.Size(71, 71);
this.textBox20.TabIndex = 4;
this.textBox20.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.textBox00);
this.flowLayoutPanel1.Controls.Add(this.textBox10);
this.flowLayoutPanel1.Controls.Add(this.textBox20);
this.flowLayoutPanel1.Controls.Add(this.textBox30);
this.flowLayoutPanel1.Controls.Add(this.textBox01);
this.flowLayoutPanel1.Controls.Add(this.textBox11);
this.flowLayoutPanel1.Controls.Add(this.textBox21);
this.flowLayoutPanel1.Controls.Add(this.textBox31);
this.flowLayoutPanel1.Controls.Add(this.textBox02);
this.flowLayoutPanel1.Controls.Add(this.textBox12);
this.flowLayoutPanel1.Controls.Add(this.textBox22);
this.flowLayoutPanel1.Controls.Add(this.textBox32);
this.flowLayoutPanel1.Controls.Add(this.textBox03);
this.flowLayoutPanel1.Controls.Add(this.textBox13);
this.flowLayoutPanel1.Controls.Add(this.textBox23);
this.flowLayoutPanel1.Controls.Add(this.textBox33);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(3);
this.flowLayoutPanel1.Size = new System.Drawing.Size(315, 316);
this.flowLayoutPanel1.TabIndex = 9;
//
// textBox30
//
this.textBox30.BackColor = System.Drawing.Color.White;
this.textBox30.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox30.Location = new System.Drawing.Point(237, 6);
this.textBox30.Name = "textBox30";
this.textBox30.ReadOnly= true;
this.textBox30.Size = new System.Drawing.Size(71, 71);
this.textBox30.TabIndex = 5;
this.textBox30.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox01
//
this.textBox01.BackColor = System.Drawing.Color.White;
this.textBox01.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox01.Location = new System.Drawing.Point(6, 83);
this.textBox01.Name = "textBox01";
this.textBox01.ReadOnly= true;
this.textBox01.Size = new System.Drawing.Size(71, 71);
this.textBox01.TabIndex = 6;
this.textBox01.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox11
//
this.textBox11.BackColor = System.Drawing.Color.White;
this.textBox11.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox11.Location = new System.Drawing.Point(83, 83);
this.textBox11.Name = "textBox11";
this.textBox11.ReadOnly= true;
this.textBox11.Size = new System.Drawing.Size(71, 71);
this.textBox11.TabIndex = 7;
this.textBox11.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox21
//
this.textBox21.BackColor = System.Drawing.Color.White;
this.textBox21.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox21.Location = new System.Drawing.Point(160, 83);
this.textBox21.Name = "textBox21";
this.textBox21.ReadOnly= true;
this.textBox21.Size = new System.Drawing.Size(71, 71);
this.textBox21.TabIndex = 8;
this.textBox21.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox31
//
this.textBox31.BackColor = System.Drawing.Color.White;
this.textBox31.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox31.Location = new System.Drawing.Point(237, 83);
this.textBox31.Name = "textBox31";
this.textBox31.ReadOnly= true;
this.textBox31.Size = new System.Drawing.Size(71, 71);
this.textBox31.TabIndex = 9;
this.textBox31.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox02
//
this.textBox02.BackColor = System.Drawing.Color.White;
this.textBox02.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox02.Location = new System.Drawing.Point(6, 160);
this.textBox02.Name = "textBox02";
this.textBox02.ReadOnly= true;
this.textBox02.Size = new System.Drawing.Size(71, 71);
this.textBox02.TabIndex = 10;
this.textBox02.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox12
//
this.textBox12.BackColor = System.Drawing.Color.White;
this.textBox12.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox12.Location = new System.Drawing.Point(83, 160);
this.textBox12.Name = "textBox12";
this.textBox12.ReadOnly= true;
this.textBox12.Size = new System.Drawing.Size(71, 71);
this.textBox12.TabIndex = 11;
this.textBox12.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox22
//
this.textBox22.BackColor = System.Drawing.Color.White;
this.textBox22.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox22.Location = new System.Drawing.Point(160, 160);
this.textBox22.Name = "textBox22";
this.textBox22.ReadOnly= true;
this.textBox22.Size = new System.Drawing.Size(71, 71);
this.textBox22.TabIndex = 12;
this.textBox22.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox32
//
this.textBox32.BackColor = System.Drawing.Color.White;
this.textBox32.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox32.Location = new System.Drawing.Point(237, 160);
this.textBox32.Name = "textBox32";
this.textBox32.ReadOnly= true;
this.textBox32.Size = new System.Drawing.Size(71, 71);
this.textBox32.TabIndex = 13;
this.textBox32.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox03
//
this.textBox03.BackColor = System.Drawing.Color.White;
this.textBox03.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox03.Location = new System.Drawing.Point(6, 237);
this.textBox03.Name = "textBox03";
this.textBox03.ReadOnly= true;
this.textBox03.Size = new System.Drawing.Size(71, 71);
this.textBox03.TabIndex = 14;
this.textBox03.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox13
//
this.textBox13.BackColor = System.Drawing.Color.White;
this.textBox13.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox13.Location = new System.Drawing.Point(83, 237);
this.textBox13.Name = "textBox13";
this.textBox13.ReadOnly= true;
this.textBox13.Size = new System.Drawing.Size(71, 71);
this.textBox13.TabIndex = 15;
this.textBox13.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox23
//
this.textBox23.BackColor = System.Drawing.Color.White;
this.textBox23.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox23.Location = new System.Drawing.Point(160, 237);
this.textBox23.Name = "textBox23";
this.textBox23.ReadOnly= true;
this.textBox23.Size = new System.Drawing.Size(71, 71);
this.textBox23.TabIndex = 16;
this.textBox23.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox33
//
this.textBox33.BackColor = System.Drawing.Color.White;
this.textBox33.FOnt= new System.Drawing.Font("宋体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox33.Location = new System.Drawing.Point(237, 237);
this.textBox33.Name = "textBox33";
this.textBox33.ReadOnly= true;
this.textBox33.Size = new System.Drawing.Size(71, 71);
this.textBox33.TabIndex = 17;
this.textBox33.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// GridControl
//
this.AutoScaleDimensiOns= new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flowLayoutPanel1);
this.Name = "GridControl";
this.Size = new System.Drawing.Size(315, 316);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.ResumeLayout(false);

}
private System.Windows.Forms.TextBox textBox20;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.TextBox textBox00;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.TextBox textBox30;
private System.Windows.Forms.TextBox textBox01;
private System.Windows.Forms.TextBox textBox11;
private System.Windows.Forms.TextBox textBox21;
private System.Windows.Forms.TextBox textBox31;
private System.Windows.Forms.TextBox textBox02;
private System.Windows.Forms.TextBox textBox12;
private System.Windows.Forms.TextBox textBox22;
private System.Windows.Forms.TextBox textBox32;
private System.Windows.Forms.TextBox textBox03;
private System.Windows.Forms.TextBox textBox13;
private System.Windows.Forms.TextBox textBox23;
private System.Windows.Forms.TextBox textBox33;

}
}

推荐阅读
  • 阿,里,云,物,联网,net,core,客户端,czgl,aliiotclient, ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • 本文详细介绍了Spring的JdbcTemplate的使用方法,包括执行存储过程、存储函数的call()方法,执行任何SQL语句的execute()方法,单个更新和批量更新的update()和batchUpdate()方法,以及单查和列表查询的query()和queryForXXX()方法。提供了经过测试的API供使用。 ... [详细]
  • Visual C# TabControl中TabPage分离成若干个Form的小办法
    写Visual的同学们都会用到这个TabControl的控件,然后会分好几页的TabPage,每页都有很多控件和业务逻辑,但是每页的关系也 ... [详细]
  • SpringBoot uri统一权限管理的实现方法及步骤详解
    本文详细介绍了SpringBoot中实现uri统一权限管理的方法,包括表结构定义、自动统计URI并自动删除脏数据、程序启动加载等步骤。通过该方法可以提高系统的安全性,实现对系统任意接口的权限拦截验证。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • 不同优化算法的比较分析及实验验证
    本文介绍了神经网络优化中常用的优化方法,包括学习率调整和梯度估计修正,并通过实验验证了不同优化算法的效果。实验结果表明,Adam算法在综合考虑学习率调整和梯度估计修正方面表现较好。该研究对于优化神经网络的训练过程具有指导意义。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • Spring常用注解(绝对经典),全靠这份Java知识点PDF大全
    本文介绍了Spring常用注解和注入bean的注解,包括@Bean、@Autowired、@Inject等,同时提供了一个Java知识点PDF大全的资源链接。其中详细介绍了ColorFactoryBean的使用,以及@Autowired和@Inject的区别和用法。此外,还提到了@Required属性的配置和使用。 ... [详细]
  • WPF开发心率检测大数据曲线图的高性能实现方法
    本文介绍了在WPF开发中实现心率检测大数据曲线图的高性能方法。作者尝试过使用Canvas和第三方开源库,但性能和功能都不理想。最终作者选择使用DrawingVisual对象,并结合局部显示的方式实现了自己想要的效果。文章详细介绍了实现思路和具体代码,对于不熟悉DrawingVisual的读者可以去微软官网了解更多细节。 ... [详细]
  • STL迭代器的种类及其功能介绍
    本文介绍了标准模板库(STL)定义的五种迭代器的种类和功能。通过图表展示了这几种迭代器之间的关系,并详细描述了各个迭代器的功能和使用方法。其中,输入迭代器用于从容器中读取元素,输出迭代器用于向容器中写入元素,正向迭代器是输入迭代器和输出迭代器的组合。本文的目的是帮助读者更好地理解STL迭代器的使用方法和特点。 ... [详细]
  • 本文探讨了容器技术在安全方面面临的挑战,并提出了相应的解决方案。多租户保护、用户访问控制、中毒的镜像、验证和加密、容器守护以及容器监控都是容器技术中需要关注的安全问题。通过在虚拟机中运行容器、限制特权升级、使用受信任的镜像库、进行验证和加密、限制容器守护进程的访问以及监控容器栈,可以提高容器技术的安全性。未来,随着容器技术的发展,还需解决诸如硬件支持、软件定义基础设施集成等挑战。 ... [详细]
  • Introduction(简介)Forbeingapowerfulobject-orientedprogramminglanguage,Cisuseda ... [详细]
  • vb.net不用多线程如何同时运行两个过程?不用多线程?即使用多线程,也不会是“同时”执行,题主只要略懂一些计算机编译原理就能明白了。不用多线程更不可能让两个过程同步执行了。不过可 ... [详细]
author-avatar
龙欣23
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有