private float[] f;
private string[] s;
private int count = 0;//计数
private int cou=0;//计数
Queue<float[]> myValue = new Queue<float[]>();
Queue<string> myDate = new Queue<string>();
private void ooo()
{
cou += 5;
if (cou > 45)
{
cou = 0;
}
ashDraw(cou.ToString(), DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString());
ashDraw(cou.ToString(), DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString());
ashDraw(cou.ToString(), DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString());
}
private void ashDraw(string strAsh, string strDate)
{
if (strAsh == null || strAsh == "")
{
return;
}
count++;
if (count == 1)
{
f[0] = float.Parse(strAsh);
}
else if (count == 2)
{
f[1] = float.Parse(strAsh);
}
else
{
f[2] = float.Parse(strAsh);
if (myValue.Count < XScale)
{
myValue.Enqueue(f);
myDate.Enqueue(strDate);
}
else
{
for (int i = myValue.Count; i > XScale; i--)
{
myValue.Dequeue();
myDate.Dequeue();
}
myValue.Enqueue(f);
myDate.Enqueue(strDate);
}
pictureBox1.Image = ash.drawCurve(UpLimit, DownLimit, Dust_Value, myValue, myDate, 876, 233, "灰分", XScale,myFlag);
count = 0;
}
}
大家帮忙看看为什么存到myValue中的值都是一样的