C#没有找到适合的方法来重写
这是from1.Designer.cs里面的我没创这个东西,但执行From1.cs后按F5提示错误,双击后出现的这个namespaceWindowsApplication...
这是 from1.Designer.cs里面的 我没创这个东西,但执行From1.cs后按F5 提示错误,双击后出现的这个
namespace WindowsApplication1
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
}
#endregion
}
}
这是Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace RIF
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public class Arr
{
public int[,] arr = new int[25, 25];
public bool win;
}
Arr a = new Arr();
bool cc = true;
public void PaintLab()
{
Bitmap image = new Bitmap(300,300);
Graphics g = Graphics.FromImage(image);
g.Clear(Color.Tan);
Pen pen = new Pen(Color.Black, 1);
int i, j;
i = j = 0;
while (i <= 300)
{
g.DrawLine(pen, i, 0, i, 300);
i = i + 20;
}
while (j <= 300)
{
g.DrawLine(pen, 0, j, 300, j);
j = j + 20;
}
img.Image = image;
}
private void Form1_Load(object sender, EventArgs e)
{
PaintLab();
}
private void img_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int x = e.X;
int y = e.Y;
.....
长度限制,有必要 我再发 展开
namespace WindowsApplication1
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
}
#endregion
}
}
这是Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace RIF
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public class Arr
{
public int[,] arr = new int[25, 25];
public bool win;
}
Arr a = new Arr();
bool cc = true;
public void PaintLab()
{
Bitmap image = new Bitmap(300,300);
Graphics g = Graphics.FromImage(image);
g.Clear(Color.Tan);
Pen pen = new Pen(Color.Black, 1);
int i, j;
i = j = 0;
while (i <= 300)
{
g.DrawLine(pen, i, 0, i, 300);
i = i + 20;
}
while (j <= 300)
{
g.DrawLine(pen, 0, j, 300, j);
j = j + 20;
}
img.Image = image;
}
private void Form1_Load(object sender, EventArgs e)
{
PaintLab();
}
private void img_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int x = e.X;
int y = e.Y;
.....
长度限制,有必要 我再发 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询