110,534
社区成员
发帖
与我相关
我的任务
分享
BinaryWriter writer = new BinaryWriter(new MemoryStream());
Console.WriteLine("x ==> {0}", x);
Graphics graph = picture.CreateGraphics();
Pen pen = new Pen(Color.Black, 1);
SolidBrush solidBrush = new SolidBrush(Color.White);
graph.FillRectangle(solidBrush, x + 1, 0, 1, this.Height);
graph.DrawLine(pen, x, picture.Height / 2 - oldy1+5, x + 1, picture.Height / 2 - data+5);
oldy1 = data;
x++;
if (x >= picture.Width)
{
x = 0;
}
graph.Flush();
graph.Dispose();
BinaryWriter writer = new BinaryWriter(new MemoryStream());
Console.WriteLine("x ==> {0}", x);
Graphics graph = picture.CreateGraphics();
Pen pen = new Pen(Color.Black, 1);
SolidBrush solidBrush = new SolidBrush(Color.White);
graph.FillRectangle(solidBrush, x + 1, 0, 1, this.Height);
graph.DrawLine(pen, x, picture.Height / 2 - oldy1+5, x + 1, picture.Height / 2 - data+5);
oldy1 = data;
x++;
if (x >= picture.Width)
{
x = 0;
}
graph.Flush();
graph.Dispose();
唯一的不同可能就是你没有加
graph.Flush();
graph.Dispose();
但我测试了 我这里去掉它 也没有什么影响 你可以测试下我的代码