示例#1
0
 private void StartGetSignal() //start getting signal without click
 {
     timerDrawSignal.Start();  //start timer
     Graph1D.f_ClearAllPix();
     Graph1D.f_reXY();
     Graph1D.f_LoadOnePix(ref x1, ref y1, Color.Red, 2);
 }
示例#2
0
 /*******************************************************************************************************************/
 private void StartGetSignal() //start getting signal without click
 {
     timerDrawSignal.Start();  //start timer
     Graph1D.f_ClearAllPix();
     Graph1D.f_reXY();
     Graph1D.f_LoadOnePix(ref x1, ref y1, Color.Red, 2);
     if (heartcuttingNumber > 0)
     {
         Graph1D.f_AddPix(ref x4, ref y4, Color.Blue, 2);
     }
 }
示例#3
0
 private void StartGetSignal() //start getting signal without click
 {
     timerDraw.Start();        //start timer
     Graph1D.f_ClearAllPix();
     TempGraph.f_ClearAllPix();
     Graph1D.f_reXY();
     TempGraph.f_reXY();
     Graph1D.f_LoadOnePix(ref x1, ref y1, Color.Red, 2);
     TempGraph.f_LoadOnePix(ref x2, ref y2, Color.Red, 2);
     TempGraph.f_AddPix(ref x3, ref y3, Color.Blue, 2);
 }
示例#4
0
/*******************************************************************************************************************/
        private void btnGetAnalogIn_Click(object sender, EventArgs e) //start the timer when click the button
        {
            timerDraw.Start();                                        //start timer
            Graph1D.f_ClearAllPix();
            TempGraph.f_ClearAllPix();
            Graph1D.f_reXY();
            TempGraph.f_reXY();
            Graph1D.f_LoadOnePix(ref x1, ref y1, Color.Red, 2);
            TempGraph.f_LoadOnePix(ref x2, ref y2, Color.Red, 2);
            TempGraph.f_AddPix(ref x3, ref y3, Color.Blue, 2);
        }
示例#5
0
 private void overallStart_Click(object sender, EventArgs e)
 {
     x1.Clear();
     x2.Clear();
     x3.Clear();
     x4.Clear();
     y1.Clear();
     y2.Clear();
     y3.Clear();
     y4.Clear();
     initial_set_Ports_Low();
     DrawSingalIndex    = 0;
     DrawTempIndex      = 0;
     SignalOnFlag       = 0;
     heartcuttingNumber = 0;
     heartcuttingflag   = 0;
     Graph1D.f_ClearAllPix();
     TempGraph.f_ClearAllPix();
     Graph1D.f_reXY();
     TempGraph.f_reXY();
     timerMenu.Start();
     StartGetTemp();
     startTime = System.DateTime.Now;
     //ports control
     pumpingTvalue    = float.Parse(pumpingTime.Text);                                                        //s
     waitingTvalue    = float.Parse(waitingTime.Text);                                                        //s
     preconHighTvalue = float.Parse(preconHighTime.Text);                                                     //s
     preconLowTvalue  = float.Parse(preconLowTime.Text);                                                      //s
     lowestTempvalue  = float.Parse(lowestTemp.Text);                                                         //C
     lowestTvalue     = float.Parse(lowestHold.Text) * 60;                                                    //s
     HighestTempvalue = float.Parse(highestTemp.Text);                                                        //C
     HighestTvalue    = float.Parse(highestHold.Text) * 60;                                                   //s
     RampSpeedvalue   = float.Parse(rampSpeed.Text) / 60;                                                     //c/s
     analysisTotalT   = lowestTvalue + HighestTvalue + (HighestTempvalue - lowestTempvalue) / RampSpeedvalue; //s
     cleaningPvalue   = float.Parse(cleaningPreconTime.Text);                                                 //s
     cleaningTvalue   = float.Parse(cleaningTotalTime.Text) * 60;                                             //s
     if (Start1.Text != "" && End1.Text != "")
     {
         if (float.Parse(Start1.Text) > float.Parse(End1.Text))
         {
             EndBeforeStartError();
         }
         else
         {
             heartcuttingStartList[1] = float.Parse(Start1.Text);             //s
             heartcuttingEndList[1]   = float.Parse(End1.Text);               //s
             heartcuttingNumber++;
         }
     }
     if (Start2.Text != "" && End2.Text != "")
     {
         if (float.Parse(Start2.Text) > float.Parse(End2.Text))
         {
             EndBeforeStartError();
         }
         else if (heartcuttingNumber != 1)
         {
             EmptyBetweenError();
         }
         else if (float.Parse(Start2.Text) < heartcuttingEndList[1] + preconHighTvalue + preconLowTvalue)
         {
             TooCloseError();
         }
         else
         {
             heartcuttingStartList[2] = float.Parse(Start2.Text);             //s
             heartcuttingEndList[2]   = float.Parse(End2.Text);               //s
             heartcuttingNumber++;
         }
     }
     if (Start3.Text != "" && End3.Text != "")
     {
         if (float.Parse(Start3.Text) > float.Parse(End3.Text))
         {
             EndBeforeStartError();
         }
         else if (heartcuttingNumber != 2)
         {
             EmptyBetweenError();
         }
         else if (float.Parse(Start3.Text) < heartcuttingEndList[2] + preconHighTvalue + preconLowTvalue)
         {
             TooCloseError();
         }
         else
         {
             heartcuttingStartList[3] = float.Parse(Start3.Text);             //s
             heartcuttingEndList[3]   = float.Parse(End3.Text);               //s
             heartcuttingNumber++;
         }
     }
     if (Start4.Text != "" && End4.Text != "")
     {
         if (float.Parse(Start4.Text) > float.Parse(End4.Text))
         {
             EndBeforeStartError();
         }
         else if (heartcuttingNumber != 3)
         {
             EmptyBetweenError();
         }
         else if (float.Parse(Start4.Text) < heartcuttingEndList[3] + preconHighTvalue + preconLowTvalue)
         {
             TooCloseError();
         }
         else
         {
             heartcuttingStartList[4] = float.Parse(Start4.Text);             //s
             heartcuttingEndList[4]   = float.Parse(End4.Text);               //s
             heartcuttingNumber++;
         }
     }
     if (Start5.Text != "" && End5.Text != "")
     {
         if (float.Parse(Start5.Text) > float.Parse(End5.Text))
         {
             EndBeforeStartError();
         }
         else if (heartcuttingNumber != 4)
         {
             EmptyBetweenError();
         }
         else if (float.Parse(Start5.Text) < heartcuttingEndList[4] + preconHighTvalue + preconLowTvalue)
         {
             TooCloseError();
         }
         else
         {
             heartcuttingStartList[5] = float.Parse(Start5.Text);             //s
             heartcuttingEndList[5]   = float.Parse(End5.Text);               //s
             heartcuttingNumber++;
         }
     }
     if (ExperienceName.Text == "")
     {
         timerMenu.Stop();
         timerDrawSignal.Stop();
         timerDrawTemp.Stop();
         MessageBox.Show("Experience Name cannot be empty.", "Heartcutting Input Error");
     }
     else
     {
         ExperienceNamevalue = ExperienceName.Text;
         file = new System.IO.StreamWriter(@"C:\Users\Nanova\Documents\Software\GC\c#\TestOutputs\" + ExperienceNamevalue + ".dat");
     }
 }
示例#6
0
        /*******************************************************************************************************************/

        private void overallStart_Click(object sender, EventArgs e)
        {
            x1.Clear();
            x2.Clear();
            x3.Clear();
            y1.Clear();
            y2.Clear();
            y3.Clear();
            initial_set_Ports_Low();
            DrawSingalIndex    = 0;
            DrawTempIndex      = 0;
            SignalOnFlag       = 0;
            heartcuttingNumber = 0;
            Graph1D.f_ClearAllPix();
            TempGraph.f_ClearAllPix();
            Graph1D.f_reXY();
            TempGraph.f_reXY();
            timerMenu.Start();
            StartGetTemp();
            startTime = System.DateTime.Now;
            //ports control
            pumpingTvalue    = float.Parse(pumpingTime.Text);                                                        //s
            waitingTvalue    = float.Parse(waitingTime.Text);                                                        //s
            preconHighTvalue = float.Parse(preconHighTime.Text);                                                     //s
            preconLowTvalue  = float.Parse(preconLowTime.Text);                                                      //s
            lowestTempvalue  = float.Parse(lowestTemp.Text);                                                         //C
            lowestTvalue     = float.Parse(lowestHold.Text) * 60;                                                    //s
            HighestTempvalue = float.Parse(highestTemp.Text);                                                        //C
            HighestTvalue    = float.Parse(highestHold.Text) * 60;                                                   //s
            RampSpeedvalue   = float.Parse(rampSpeed.Text) / 60;                                                     //c/s
            analysisTotalT   = lowestTvalue + HighestTvalue + (HighestTempvalue - lowestTempvalue) / RampSpeedvalue; //s
            cleaningPvalue   = float.Parse(cleaningPreconTime.Text);                                                 //s
            cleaningTvalue   = float.Parse(cleaningTotalTime.Text) * 60;                                             //s
            if (Start1.Text != "" && float.Parse(Start1.Text) < float.Parse(End1.Text))
            {
                heartcuttingStartList[1] = float.Parse(Start1.Text);             //s
                heartcuttingEndList[1]   = float.Parse(End1.Text);               //s
                heartcuttingNumber++;
            }
            if (Start2.Text != "" && float.Parse(Start2.Text) > heartcuttingEndList[1] && float.Parse(Start2.Text) < float.Parse(End2.Text))
            {
                heartcuttingStartList[2] = float.Parse(Start2.Text);             //s
                heartcuttingEndList[2]   = float.Parse(End2.Text);               //s
                heartcuttingNumber++;
            }
            if (Start3.Text != "" && float.Parse(Start3.Text) > heartcuttingEndList[2] && float.Parse(Start3.Text) < float.Parse(End3.Text))
            {
                heartcuttingStartList[3] = float.Parse(Start3.Text);             //s
                heartcuttingEndList[3]   = float.Parse(End3.Text);               //s
                heartcuttingNumber++;
            }
            if (Start4.Text != "" && float.Parse(Start4.Text) > heartcuttingEndList[3] && float.Parse(Start4.Text) < float.Parse(End4.Text))
            {
                heartcuttingStartList[4] = float.Parse(Start4.Text);             //s
                heartcuttingEndList[4]   = float.Parse(End4.Text);               //s
                heartcuttingNumber++;
            }
            if (Start5.Text != "" && float.Parse(Start5.Text) > heartcuttingEndList[4] && float.Parse(Start5.Text) < float.Parse(End5.Text))
            {
                heartcuttingStartList[5] = float.Parse(Start5.Text);             //s
                heartcuttingEndList[5]   = float.Parse(End5.Text);               //s
                heartcuttingNumber++;
            }
        }