Esempio n. 1
0
 /// <summary>
 /// 画图:入射波和反射波、透射波的最大值
 /// </summary>
 /// <param name="ButtonDex"></param>
 private void drawWaveMax(int ButtonDex)
 {
     //Point po = new Point();
     //标记出入射波、反射波、透射波的最大值(横线+文字)
     TempDraw td = new TempDraw();
     td.TmpX.Clear();
     td.TmpY.Clear();
     td.ITX.Clear();
     td.ITY.Clear();
     td.RX.Clear();
     td.RY.Clear();
     //设置波形界面变量值
     td.zGraph1._isDrawWaveMax = true;
     //图形界面清空、坐标初始化
     td.zGraph1.f_ClearAllPix();
     td.zGraph1.f_reXY();
     //重新设置X轴参数
     if (this.f2.X1[pos2] - this.f2.X1[pos1] < 200)
     {
         td.zGraph1.m_fXBegin = this.f2.X1[pos1];
         td.zGraph1.m_fXEnd = this.f2.X1[pos2];
     }
     if (ButtonDex == 1)                                     //显示CH1
     {
         td.zGraph1._isWaveMaxNum = 1;
         td.zGraph1.ITX = this.f2.X1[addr1];
         td.zGraph1.ITY = this.f2.Y1[addr1];
         td.zGraph1.RX = this.f2.X1[addr2];
         td.zGraph1.RY = this.f2.Y1[addr2];
         for (int t = pos1; t <= pos2; t++)
         {
             td.TmpX.Add(this.f2.X1[t]);
             td.TmpY.Add(this.f2.Y1[t]);
         }
         td.Text = "入射波最大值、反射波最大值图像";
         td.zGraph1.label_ChNum.Text = "当前显示通道为:CH1";
         //重新设置Y轴参数
         if (IMax - RMax < 4)
         {
             td.zGraph1.m_fYBegin = RMax + (IMax - RMax) / 20;
             td.zGraph1.m_fYEnd = IMax + (IMax - RMax) / 20;
         }
         //画出CH1的波形图像
         td.zGraph1.f_LoadOnePix(ref td.TmpX, ref td.TmpY, Color.FromArgb(255, 255, 0), 2);
         //画出入射波最大值的标记
         td.ITX.Add(this.f2.X1[addr1]);
         td.ITY.Add(this.f2.Y1[addr1] - (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
         td.ITX.Add(this.f2.X1[addr1]);
         td.ITY.Add(this.f2.Y1[addr1]);
         td.ITX.Add(this.f2.X1[addr1]);
         td.ITY.Add(this.f2.Y1[addr1] + (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
         td.zGraph1.f_AddPix(ref td.ITX, ref td.ITY, Color.Green, 2);
         //画出反射波最大值的标记
         td.RX.Add(this.f2.X1[addr2]);
         td.RY.Add(this.f2.Y1[addr2] - (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
         td.RX.Add(this.f2.X1[addr2]);
         td.RY.Add(this.f2.Y1[addr2]);
         td.RX.Add(this.f2.X1[addr2]);
         td.RY.Add(this.f2.Y1[addr2] + (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
         td.zGraph1.f_AddPix(ref td.RX, ref td.RY, Color.Green, 2);
     }
     else if (ButtonDex == 2)                                //显示CH2
     {
         td.zGraph1._isWaveMaxNum = 2;
         td.zGraph1.ITX = this.f2.X2[addr3];
         td.zGraph1.ITY = this.f2.Y2[addr3];
         for (int t = pos1; t <= pos2; t++)
         {
             td.TmpX.Add(this.f2.X2[t]);
             td.TmpY.Add(this.f2.Y2[t]);
         }
         td.Text = "透射波最大值图像";
         td.zGraph1.label_ChNum.Text = "当前显示通道为:CH2";
         //重新设置Y轴参数
         if (TMax - TMin < 4)
         {
             td.zGraph1.m_fYBegin = TMin + (TMax - TMin) / 20;
             td.zGraph1.m_fYEnd = TMax + (TMax - TMin) / 20;
         }
         //画出CH2的波形图像
         td.zGraph1.f_LoadOnePix(ref td.TmpX, ref td.TmpY, Color.FromArgb(255, 255, 0), 2);
         //画出透射波最大值的标记
         td.ITX.Add(this.f2.X2[addr3]);
         td.ITY.Add(this.f2.Y2[addr3] - (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
         td.ITX.Add(this.f2.X2[addr3]);
         td.ITY.Add(this.f2.Y2[addr3]);
         td.ITX.Add(this.f2.X2[addr3]);
         td.ITY.Add(this.f2.Y2[addr3] + (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
         td.zGraph1.f_AddPix(ref td.ITX, ref td.ITY, Color.Green, 2);
     }
     td.zGraph1.Refresh();
     td.Show();
 }
Esempio n. 2
0
 /// <summary>
 /// 画图:入射波和反射波、透射波的起点值
 /// </summary>
 /// <param name="ButtonDex"></param>
 private void drawWaveStart(int ButtonDex)
 {
     //标记处入射波、反射波、透射波的起点
         TempDraw td = new TempDraw();
         td.TmpX.Clear();
         td.TmpY.Clear();
         td.ITSX.Clear();
         td.ITSY.Clear();
         td.RSX.Clear();
         td.RSY.Clear();
         //设置波形界面变量值
         td.zGraph1._isDrawWaveStart = true;
         //图形界面清空、坐标初始化
         td.zGraph1.f_ClearAllPix();
         td.zGraph1.f_reXY();
         //显示CH1
         if (ButtonDex == 1)
         {
             td.zGraph1._isWaveStartNum = 1;
             td.zGraph1.ITSX = this.f2.X1[SetStartPos1];
             td.zGraph1.ITSY = this.f2.Y1[SetStartPos1];
             td.zGraph1.RSX = this.f2.X1[SetStartPos2];
             td.zGraph1.RSY = this.f2.Y1[SetStartPos2];
             for (int t = pos1; t <= pos2; t++)
             {
                 td.TmpX.Add(this.f2.X1[t]);
                 td.TmpY.Add(this.f2.Y1[t]);
             }
             td.Text = "入射波起点、反射波起点图像";
             td.zGraph1.label_ChNum.Text = "当前显示通道为:CH1";
             //重新设置Y轴参数
             td.zGraph1.m_fYBegin = RMax + (IMax - RMax) / 20;
             td.zGraph1.m_fYEnd = IMax + (IMax - RMax) / 20;
             //画出CH1的波形图像
             td.zGraph1.f_LoadOnePix(ref td.TmpX, ref td.TmpY, Color.FromArgb(255, 255, 0), 2);
             //画出入射波起点的标记
             td.ITSX.Add(this.f2.X1[SetStartPos1]);
             td.ITSY.Add(this.f2.Y1[SetStartPos1] - (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
             td.ITSX.Add(this.f2.X1[SetStartPos1]);
             td.ITSY.Add(this.f2.Y1[SetStartPos1]);
             td.ITSX.Add(this.f2.X1[SetStartPos1]);
             td.ITSY.Add(this.f2.Y1[SetStartPos1] + (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
             td.zGraph1.f_AddPix(ref td.ITSX, ref td.ITSY, Color.Green, 2);
             //画出反射波起点的标记
             td.RSX.Add(this.f2.X1[SetStartPos2]);
             td.RSY.Add(this.f2.Y1[SetStartPos2] - (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
             td.RSX.Add(this.f2.X1[SetStartPos2]);
             td.RSY.Add(this.f2.Y1[SetStartPos2]);
             td.RSX.Add(this.f2.X1[SetStartPos2]);
             td.RSY.Add(this.f2.Y1[SetStartPos2] + (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
             td.zGraph1.f_AddPix(ref td.RSX, ref td.RSY, Color.Green, 2);
             if (this.isStartNum == 2)         //标记画图,重新开始一轮
             {
                 this.isStartNum = 0;
                 this.isStartOpen = false;
             }
             this.isStartNum++;
         }
         else if (ButtonDex == 2)
         {
             td.zGraph1._isWaveStartNum = 2;
             td.zGraph1.ITSX = this.f2.X2[SetStartPos3];
             td.zGraph1.ITSY = this.f2.Y2[SetStartPos3];
             for (int t = pos1; t <= pos2; t++)
             {
                 td.TmpX.Add(this.f2.X2[t]);
                 td.TmpY.Add(this.f2.Y2[t]);
             }
             td.Text = "透射波起点图像";
             td.zGraph1.label_ChNum.Text = "当前显示通道为:CH2";
             //重新设置Y轴参数
             td.zGraph1.m_fYBegin = TMin + (TMax - TMin) / 20;
             td.zGraph1.m_fYEnd = TMax + (TMax - TMin) / 20;
             //画出CH2的波形图像
             td.zGraph1.f_LoadOnePix(ref td.TmpX, ref td.TmpY, Color.FromArgb(255, 255, 0), 2);
             //画出透射波起点的标记
             td.ITSX.Add(this.f2.X2[SetStartPos3]);
             td.ITSY.Add(this.f2.Y2[SetStartPos3] - (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
             td.ITSX.Add(this.f2.X2[SetStartPos3]);
             td.ITSY.Add(this.f2.Y2[SetStartPos3]);
             td.ITSX.Add(this.f2.X2[SetStartPos3]);
             td.ITSY.Add(this.f2.Y2[SetStartPos3] + (td.zGraph1.m_fYEnd - td.zGraph1.m_fYBegin) / 6);
             td.zGraph1.f_AddPix(ref td.ITSX, ref td.ITSY, Color.Green, 2);
             if (this.isStartNum == 2)         //标记画图,重新开始一轮
             {
                 this.isStartNum = 0;
                 this.isStartOpen = false;
             }
             this.isStartNum++;
         }
         td.zGraph1.Refresh();
         td.Show();
         if (this.isStartNum == 2)             //两幅波形图都已经画出
         {
             this.isStartOpen = true;
         }
 }
Esempio n. 3
0
 /// <summary>
 /// 波的应变计算:计算入射,反射,透射应变;计算工程应力,工程应变,工程应变率;计算真实应力,真实应变,真实应变率
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void 波的应变计算CToolStripMenuItem_Click(object sender, EventArgs e)
 {
     StrainCal sc1 = new StrainCal();
     if (this.f2.IsDisposed == true) { }
     else if (this.f2.zGraph1._isCursorsShowXY == 1)
     {
         if (this.isStartOpen == true && isParasOpen == true)
         {
             if (this.f2.X1.Count > 0
                 && this.f2.X2.Count > 0
                 && this.f2.checkedListBox1.GetItemChecked(0) == true
                 && this.f2.checkedListBox1.GetItemChecked(1) == true
                 && this.f2.showCount == 2)
             {
                 //计算得到推荐波形数据起点和终点
                 this.RecStart = this.f2.X1[SetStartPos1];
                 this.RecEnd = this.RecStart + (float)(2 * this.Lst * 0.001 / Cbar * 1000000 + 50.0);
                 this.RecStartPos = this.SetStartPos1;
                 for (int t = SetStartPos1; t <= pos2; t++)
                 {
                     if (this.f2.X1[t] == this.RecEnd)
                     {
                         this.RecEndPos = t;
                         break;
                     }
                     else if (t <= pos2 - 1 && this.f2.X1[t] < this.RecEnd && this.f2.X1[t + 1] > this.RecEnd)
                     {
                         this.RecEndPos = t;
                         break;
                     }
                 }
                 sc1.textBox1.Text = this.RecStartPos.ToString();
                 sc1.textBox2.Text = (this.RecEndPos - 125).ToString();      //推荐终点值:-125
                 if (isBtn3Click == true)
                 {
                     sc1.textBox3.Text = this.SetEndPos.ToString();
                 }
                 //弹出模式对话框
                 if (sc1.ShowDialog() == DialogResult.OK)
                 {
                     if (sc1.ButtonDex == 0)
                     {
                         if (isBtn3Click == false)
                         {
                             isBtn3Click = true;
                         }
                         this.SetEndPos = int.Parse(sc1.textBox3.Text);
                     }
                     else
                     {
                         if (isBtn3Click == true)
                         {
                             TempDraw td = new TempDraw();
                             //存储数据列表清空
                             td.TmpX1.Clear();
                             td.TmpY1.Clear();
                             td.TmpY2.Clear();
                             td.TmpY3.Clear();
                             td.TmpY4.Clear();
                             //图形界面清空、坐标初始化
                             td.zGraph1.f_ClearAllPix();
                             td.zGraph1.f_reXY();
                             //在选取显示的数据较少时,重新设置X轴参数
                             if (this.f2.X1[this.SetEndPos] - this.f2.X1[this.RecStartPos] <= 200)
                             {
                                 float tmpDelta = (this.f2.X1[this.SetEndPos] - this.f2.X1[this.RecStartPos]) / 20;
                                 td.zGraph1.m_fXBegin = this.f2.X1[this.RecStartPos] - tmpDelta;
                                 td.zGraph1.m_fXEnd = this.f2.X1[this.SetEndPos] + tmpDelta;
                             }
                             if (sc1.ButtonDex == 1 && this.isStrainNum == 0)
                             {
                                 for (int t = this.RecStartPos; t <= this.SetEndPos; t++)
                                 {
                                     td.TmpX1.Add(this.f2.X1[t]);
                                     td.TmpY1.Add(this.f2.Y1[t]);
                                     td.TmpY2.Add(-1 * this.f2.Y1[t + this.SetStartPos2 - this.RecStartPos]);
                                     td.TmpY3.Add(this.f2.Y2[t + this.SetStartPos3 - this.RecStartPos]);
                                     td.TmpY4.Add(this.f2.Y1[t] + this.f2.Y1[t + this.SetStartPos2 - this.RecStartPos]);
                                 }
                                 //重新设置Y轴参数
                                 if (IMax < 4)
                                 {
                                     td.zGraph1.m_fYBegin = -IMax / 20;
                                     td.zGraph1.m_fYEnd = IMax + IMax / 20;
                                 }
                                 td.Text = "入射波、反射波、透射波的电压-时间图像";
                                 td.zGraph1.label_ChNum.Text = "入射波:红色  反射波:绿色  透射波:黄色 入射波-(取反的)反射波:蓝色";
                                 td.zGraph1.f_LoadOnePix(ref td.TmpX1, ref td.TmpY1, Color.Red, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY2, Color.Green, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY3, Color.Yellow, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY4, Color.Blue, 2);
                                 //把画图子窗口的数据保存在父窗体中
                                 for (int t = 0; t < td.TmpX1.Count; t++)
                                 {
                                     this.Ux1.Add(td.TmpX1[t]);
                                     this.Uy1.Add(td.TmpY1[t]);
                                     this.Uy2.Add(td.TmpY2[t]);
                                     this.Uy3.Add(td.TmpY3[t]);
                                 }
                                 this.isStrainNum++;
                                 td.zGraph1.Refresh();
                                 td.Show();
                             }
                             else if (sc1.ButtonDex == 2 && this.isStrainNum == 1)
                             {
                                 for (int t = 0; t < this.Ux1.Count; t++)
                                 {
                                     td.TmpX1.Add(this.Ux1[t]);
                                     td.TmpY1.Add(this.Uy1[t]);
                                     td.TmpY2.Add(this.Uy2[t]);
                                     td.TmpY3.Add(this.Uy3[t]);
                                 }
                                 //计算参数
                                 float N1 = Rg1 / (R1 * 1000 + Rg1) - Rg1 * RC1 * 1000 / (R1 * 1000 * (Rg1 + RC1 * 1000) + Rg1 * RC1 * 1000);
                                 float N2 = Rg2 / (R1 * 1000 + Rg2) - Rg2 * RC2 * 1000 / (R1 * 1000 * (Rg2 + RC2 * 1000) + Rg2 * RC2 * 1000);
                                 //计算入射波、反射波、透射波应变
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     //入射波应变
                                     td.TmpY1[t] *= (N1 / EB1);
                                     td.TmpY1[t] = td.TmpY1[t] * (R1 * 1000 + Rg1) * (R1 * 1000 + Rg1) / K1 / Rg1 / (R1 * 1000 + td.TmpY1[t] * (R1 * 1000 + Rg1));
                                     //反射波应变
                                     td.TmpY2[t] *= (N1 / EB1);
                                     td.TmpY2[t] = td.TmpY2[t] * (R1 * 1000 + Rg1) * (R1 * 1000 + Rg1) / K1 / Rg1 / (R1 * 1000 + td.TmpY2[t] * (R1 * 1000 + Rg1));
                                     //透射波应变
                                     td.TmpY3[t] *= (N2 / EB2);
                                     td.TmpY3[t] = td.TmpY3[t] * (R1 * 1000 + Rg2) * (R1 * 1000 + Rg2) / K2 / Rg2 / (R1 * 1000 + td.TmpY3[t] * (R1 * 1000 + Rg2));
                                 }
                                 //应变值均非常小,没有单位,进行放大后显示:10^4
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     td.TmpY1[t] *= 10000;
                                     td.TmpY2[t] *= 10000;
                                     td.TmpY3[t] *= 10000;
                                 }
                                 float tmpMax = -100;         //临时变量
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     if (td.TmpY1[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY1[t];
                                     }
                                 }
                                 //重新设置Y轴参数
                                 if (tmpMax < 4)
                                 {
                                     td.zGraph1.m_fYBegin = -tmpMax / 20;
                                     td.zGraph1.m_fYEnd = tmpMax + tmpMax / 20;
                                 }
                                 td.Text = "入射波、反射波、透射波的应变-时间图像";
                                 td.zGraph1.label_ChNum.Text = "入射波:红色  反射波:绿色  透射波:黄色";
                                 td.zGraph1.m_SySnameY = "(*10^4)";
                                 td.zGraph1.f_LoadOnePix(ref td.TmpX1, ref td.TmpY1, Color.Red, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY2, Color.Green, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY3, Color.Yellow, 2);
                                 //把画图子窗口的数据保存在父窗体中
                                 for (int t = 0; t < td.TmpX1.Count; t++)
                                 {
                                     this.Sy1.Add(td.TmpY1[t] / 10000);
                                     this.Sy2.Add(td.TmpY2[t] / 10000);
                                     this.Sy3.Add(td.TmpY3[t] / 10000);
                                 }
                                 this.isStrainNum++;
                                 td.zGraph1.Refresh();
                                 td.Show();
                             }
                             else if (sc1.ButtonDex == 3 && this.isStrainNum == 2)
                             {
                                 for (int t = 0; t < this.Ux1.Count; t++)
                                 {
                                     td.TmpX1.Add(this.Ux1[t]);
                                     //注意单位转换GPa->MPa,*1000
                                     td.TmpY1.Add(1000 * E / 2 * RD * RD / LD / LD * (Sy1[t] - Sy2[t] + Sy3[t]));   //三波法
                                     td.TmpY2.Add(1000 * E * RD * RD / LD / LD * Sy3[t]);                           //两波法
                                 }
                                 float tmpMax = -100, tmpMin = 100;         //临时变量
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     if (td.TmpY1[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY1[t];
                                     }
                                     if (td.TmpY2[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY2[t];
                                     }
                                     if (td.TmpY1[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY1[t];
                                     }
                                     if (td.TmpY2[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY2[t];
                                     }
                                 }
                                 //重新设置Y轴参数
                                 if ((tmpMax - tmpMin) < 4)
                                 {
                                     td.zGraph1.m_fYBegin = tmpMin - (tmpMax - tmpMin) / 20;
                                     td.zGraph1.m_fYEnd = tmpMax + (tmpMax - tmpMin) / 20;
                                 }
                                 td.Text = "工程应力-时间图像";
                                 td.zGraph1.label_ChNum.Text = "三波法:红色  两波法:绿色";
                                 td.zGraph1.m_SySnameY = "MPa";
                                 td.zGraph1.f_LoadOnePix(ref td.TmpX1, ref td.TmpY1, Color.Red, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY2, Color.Green, 2);
                                 //把画图子窗口的数据保存在父窗体中
                                 for (int t = 0; t < td.TmpX1.Count; t++)
                                 {
                                     this.ESFy1.Add(td.TmpY1[t]);
                                     this.ESFy2.Add(td.TmpY2[t]);
                                 }
                                 this.isStrainNum++;
                                 td.zGraph1.Refresh();
                                 td.Show();
                             }
                             else if (sc1.ButtonDex == 4 && this.isStrainNum == 3)
                             {
                                 float tmpS1 = 0, tmpS2 = 0; //临时变量
                                 td.TmpX1.Add(this.Ux1[0]);  //t = 0
                                 td.TmpY1.Add(0);
                                 td.TmpY2.Add(0);
                                 for (int t = 1; t < this.Ux1.Count; t++)        //进行模拟积分运算
                                 {
                                     td.TmpX1.Add(this.Ux1[t]);
                                     tmpS1 += (Cbar / Ls) * (this.Ux1[t] - this.Ux1[t - 1]) * ((Sy1[t] + Sy2[t] - Sy3[t]) + (Sy1[t - 1] + Sy2[t - 1] - Sy3[t - 1])) / 2;
                                     tmpS2 += (2 * Cbar / Ls) * (this.Ux1[t] - this.Ux1[t - 1]) * ((Sy1[t] - Sy3[t]) + (Sy1[t - 1] - Sy3[t - 1])) / 2;
                                     td.TmpY1.Add(tmpS1);
                                     td.TmpY2.Add(tmpS2);
                                 }
                                 float tmpMax = -100, tmpMin = 100;         //临时变量
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     if (td.TmpY1[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY1[t];
                                     }
                                     if (td.TmpY2[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY2[t];
                                     }
                                     if (td.TmpY1[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY1[t];
                                     }
                                     if (td.TmpY2[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY2[t];
                                     }
                                 }
                                 //重新设置Y轴参数
                                 if ((tmpMax - tmpMin) < 4)
                                 {
                                     td.zGraph1.m_fYBegin = tmpMin - (tmpMax - tmpMin) / 20;
                                     td.zGraph1.m_fYEnd = tmpMax + (tmpMax - tmpMin) / 20;
                                 }
                                 td.Text = "工程应变-时间图像";
                                 td.zGraph1.label_ChNum.Text = "三波法:红色  两波法:绿色";
                                 td.zGraph1.m_SySnameY = "";
                                 td.zGraph1.f_LoadOnePix(ref td.TmpX1, ref td.TmpY1, Color.Red, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY2, Color.Green, 2);
                                 //把画图子窗口的数据保存在父窗体中
                                 for (int t = 0; t < td.TmpX1.Count; t++)
                                 {
                                     this.ESy1.Add(td.TmpY1[t]);
                                     this.ESy2.Add(td.TmpY2[t]);
                                 }
                                 this.isStrainNum++;
                                 td.zGraph1.Refresh();
                                 td.Show();
                             }
                             else if (sc1.ButtonDex == 5 && this.isStrainNum == 4)
                             {
                                 for (int t = 0; t < this.Ux1.Count; t++)
                                 {
                                     td.TmpX1.Add(this.Ux1[t]);
                                     td.TmpY1.Add(1000 * Cbar / Ls * (Sy1[t] + Sy2[t] - Sy3[t]));   //三波法
                                     td.TmpY2.Add(1000 * 2 * Cbar / Ls * (Sy1[t] - Sy3[t]));        //两波法
                                 }
                                 float tmpMax = -100, tmpMin = 100;         //临时变量
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     if (td.TmpY1[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY1[t];
                                     }
                                     if (td.TmpY2[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY2[t];
                                     }
                                     if (td.TmpY1[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY1[t];
                                     }
                                     if (td.TmpY2[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY2[t];
                                     }
                                 }
                                 //重新设置Y轴参数
                                 if ((tmpMax - tmpMin) < 4)
                                 {
                                     td.zGraph1.m_fYBegin = tmpMin - (tmpMax - tmpMin) / 20;
                                     td.zGraph1.m_fYEnd = tmpMax + (tmpMax - tmpMin) / 20;
                                 }
                                 td.Text = "工程应变率-时间图像";
                                 td.zGraph1.label_ChNum.Text = "三波法:红色  两波法:绿色";
                                 td.zGraph1.m_SySnameY = "1/s";
                                 td.zGraph1.f_LoadOnePix(ref td.TmpX1, ref td.TmpY1, Color.Red, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpX1, ref td.TmpY2, Color.Green, 2);
                                 //把画图子窗口的数据保存在父窗体中
                                 for (int t = 0; t < td.TmpX1.Count; t++)
                                 {
                                     this.ESRy1.Add(td.TmpY1[t]);
                                     this.ESRy2.Add(td.TmpY2[t]);
                                 }
                                 this.isStrainNum++;
                                 td.zGraph1.Refresh();
                                 td.Show();
                             }
                             else if (sc1.ButtonDex == 6 && this.isStrainNum == 5)
                             {
                                 for (int t = 0; t < this.Ux1.Count; t++)
                                 {
                                     td.TmpY1.Add(this.ESy1[t]);   //三波法
                                     td.TmpY2.Add(this.ESFy1[t]);
                                     td.TmpY3.Add(this.ESy2[t]);   //两波法
                                     td.TmpY4.Add(this.ESFy2[t]);
                                 }
                                 //在选取显示的数据较少时,重新设置X轴参数
                                 float TmpMin = 0, TmpMax = 0;
                                 TmpMin = td.TmpY1[0] < td.TmpY3[0] ? td.TmpY1[0] : td.TmpY3[0];
                                 TmpMax = td.TmpY1[td.TmpY1.Count - 1] > td.TmpY3[td.TmpY1.Count - 1] ? td.TmpY1[td.TmpY1.Count - 1] : td.TmpY3[td.TmpY1.Count - 1];
                                 if (TmpMax - TmpMin <= 200)
                                 {
                                     float tmpDelta = (TmpMax - TmpMin) / 20;
                                     td.zGraph1.m_fXBegin = TmpMin - tmpDelta;
                                     td.zGraph1.m_fXEnd = TmpMax + tmpDelta;
                                 }
                                 float tmpMax = -100, tmpMin = 100;         //临时变量
                                 for (int t = 0; t <= this.SetEndPos - this.RecStartPos; t++)
                                 {
                                     if (td.TmpY2[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY2[t];
                                     }
                                     if (td.TmpY4[t] > tmpMax)
                                     {
                                         tmpMax = td.TmpY4[t];
                                     }
                                     if (td.TmpY2[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY2[t];
                                     }
                                     if (td.TmpY4[t] < tmpMin)
                                     {
                                         tmpMin = td.TmpY4[t];
                                     }
                                 }
                                 //重新设置Y轴参数
                                 if ((tmpMax - tmpMin) < 4)
                                 {
                                     td.zGraph1.m_fYBegin = tmpMin - (tmpMax - tmpMin) / 20;
                                     td.zGraph1.m_fYEnd = tmpMax + (tmpMax - tmpMin) / 20;
                                 }
                                 td.Text = "工程应力-工程应变图像";
                                 td.zGraph1.label_ChNum.Text = "三波法:红色  两波法:绿色";
                                 td.zGraph1.m_SySnameX = "";
                                 td.zGraph1.m_SySnameY = "Mpa";
                                 td.zGraph1.f_LoadOnePix(ref td.TmpY1, ref td.TmpY2, Color.Red, 2);
                                 td.zGraph1.f_AddPix(ref td.TmpY3, ref td.TmpY4, Color.Green, 2);
                                 this.isStrainNum++;
                                 td.zGraph1.Refresh();
                                 td.Show();
                             }
                             if (this.isStrainNum == 6)
                             {
                                 this.isStrainOpen = true;
                             }
                         }
                     }
                 }
             }
         }
     }
 }