日期:2014-05-20  浏览次数:21082 次

同样的程序 没改 昨天行 今天不行
窗口1:
receive = ByteToHexString(buf);
  num = Hexstringtoint(receive.Substring(6, 4));
  num2 = Hexstringtoint(receive.Substring(10, 4));
  num3 = Hexstringtoint(receive.Substring(14, 4));
  num4 = Hexstringtoint(receive.Substring(18, 4));
  form2.zedgraphdisplay4(ClassGongGongBianLiang.wavedisplayx, num, num2, num3, num4);
  ClassGongGongBianLiang.wavedisplayx++;

窗口2:

 public void zedgraphdisplay4(int a, double b, double c, double d, double e)
  {
  list.Add(a, b);
  list2.Add(a, c);
  list3.Add(a, d);
  list4.Add(a, e);
  zg1.AxisChange();
  zg1.Invalidate();
  }

zedgraph死活不给显示 昨天还好的 到底是怎么了????

真想把电脑砸了


------解决方案--------------------
看看引用啥的还全不全了。不行就重新引用一遍试试。
------解决方案--------------------
我说着代码怎么那么熟悉,,
这不是你以前的帖子么?
http://topic.csdn.net/u/20120712/09/17edb840-28d0-4fef-ad5e-5aa090f4a3dc.html

你贴那么点代码没用

------解决方案--------------------
探讨
我已经找到答案了

原因在于我在窗口1中对于窗口2的new,new了2次。。。

预定义一次
Form2 form2 =new Form2();

button click又一次
Form2 form2 =new Form2();

呵呵 找到问题了 谢谢大家