structs/ChessPoint.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using GoBangProject.GeneticAlgorithm;
namespace GoBangProject.structs
{
/// <summary>
/// 棋子类型
/// </summary>
public enum ChessType
{
BLACK,
WHITE,
NULL
}
public class ChessPoint : Panel
{
public static ChessPoint CreateChessPoint(Point point,ChessType type)
{
ChessPoint pointInstance = new ChessPoint();
pointInstance.Point = point;
pointInstance.Type = type;
return pointInstance;
}
#region 成员变量
private Point point;
private ChessType type;
private Boolean isSelect;
#endregion
/// <summary>
/// 私有构造函数
/// </summary>
private ChessPoint()
{
//设置棋子的大小
this.Size = new System.Drawing.Size(35, 35);
//设置棋子的背景
this.BackColor = System.Drawing.Color.Transparent;
//设置鼠标单击事件
this.Click += new EventHandler(ChessPoint_Click);
//设置该位置是否被选中
isSelect = false;
//设置双缓存
this.DoubleBuffered = true;
后面还有 183 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
