コード例 #1
0
        private void m_nReflowerSpeed_TextChanged(object sender, EventArgs e)
        {
            CETReflower pReflower = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower;

            pReflower.m_fSpeed = m_nReflowerSpeed.Value.Tofloat();
            Main_TempChart.Instance.CreateReflowerChart();
        }
コード例 #2
0
        private void m_strReflowerSpeedUnit_SelectedIndexChanged(object sender, EventArgs e)
        {
            CETReflower pReflower = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower;

            if (m_strReflowerSpeedUnit.Text == "cm/min")
            {
                m_nReflowerSpeed.Value = pReflower.m_fSpeed.ToDecimal();
            }
            else if (m_strReflowerSpeedUnit.Text == "m/min")
            {
                m_nReflowerSpeed.Value = (pReflower.m_fSpeed / 10).ToDecimal();
            }
            else if (m_strReflowerSpeedUnit.Text == "mm/min")
            {
                m_nReflowerSpeed.Value = (pReflower.m_fSpeed * 10).ToDecimal();
            }
        }
コード例 #3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                CETReflower pReflower = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower;

                pReflower.m_strTitle     = m_strReflowerType.Text;
                pReflower.m_strSpeedUnit = m_strReflowerSpeedUnit.Text;
                //pReflower.m_fSpeed = m_nReflowerSpeed.Value.Tofloat();

                if (pReflower.m_strSpeedUnit.IndexOf("cm/min") >= 0)
                {
                    pReflower.m_fSpeed = m_nReflowerSpeed.Value.Tofloat();
                }
                else if (pReflower.m_strSpeedUnit.IndexOf("m/min") == 0)
                {
                    pReflower.m_fSpeed = (m_nReflowerSpeed.Value * 10).Tofloat();
                }
                else
                {
                    pReflower.m_fSpeed = (m_nReflowerSpeed.Value / 10).Tofloat();
                }

                pReflower.m_nSampleHeaterAreaCount = m_nHeaterCount.Text.ToInt();
                pReflower.m_nSampleCoolAreaCount   = m_nCoolCount.Text.ToInt();
                pReflower.m_strProduct             = m_strReflowerProduct.Text;
                pReflower.m_strModel = m_strReflowModel.Text;

                pReflower.m_IsWidthSmall = m_IsWidthSmall.Checked;
                pReflower.m_IsSpeedSmall = m_IsSpeedSmall.Checked;
                pReflower.m_IsTempSmall  = m_IsTemplSmall.Checked;
                pReflower.m_strNotes     = m_strReflowerNote.Text;

                SaveTableToApp(GC_ReflowHot, "Hot");
                SaveTableToApp(GC_ReflowCool, "Cool");

                Main_TempChart.Instance.CreateReflowerChart();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #4
0
        public void RefreshReflowData()
        {
            //新增COLUMN
            InitTable(dtHot, "Hot", ColumnTitle.HOT_CHS);
            InitTable(dtCool, "Cool", ColumnTitle.COOL_CHS);
            //新增ROW
            CETReflower pReflower = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower;

            RefreshReflowerList(GC_ReflowHot, GV_ReflowHot, dtHot, pReflower.m_nSampleHeaterAreaCount, "Hot");
            RefreshReflowerList(GC_ReflowCool, GV_ReflowCool, dtCool, pReflower.m_nSampleCoolAreaCount, "Cool");

            m_nReflowStartWidth.Value = pReflower.m_fInitTempl.ToDecimal();
            m_nReflowerSpeed.Value    = pReflower.m_fSpeed.ToDecimal();

            //GC_ReflowHot.Width = 530;
            TempConsistent(!pReflower.m_IsTempSmall, 0, 1);
            SpeedConsistent(!pReflower.m_IsSpeedSmall, 2, 3);
            WidthConsistent(!pReflower.m_IsWidthSmall, 4, GV_ReflowHot);
        }
コード例 #5
0
        private void RefreshReflower()
        {
            var         theApp    = CETCManagerApp.Instance;
            CETReflower pReflower = theApp.m_pETETCStage.m_ETReflower;

            m_strReflowerType.Text = pReflower.m_strTitle;
            //m_strTempUnit.Text = pReflower.m_strTemplUnit;
            //m_strLengthUnit.Text = pReflower.m_strLengthUnit;
            m_strReflowerSpeedUnit.Text = pReflower.m_strSpeedUnit;

            if (pReflower.m_strSpeedUnit.IndexOf("cm/min") >= 0)
            {
                m_nReflowerSpeed.Value = pReflower.m_fSpeed.ToDecimal();
            }
            else if (pReflower.m_strSpeedUnit.IndexOf("m/min") == 0)
            {
                m_nReflowerSpeed.Value = (pReflower.m_fSpeed / 10.0).ToDecimal();
            }
            else
            {
                m_nReflowerSpeed.Value = (pReflower.m_fSpeed * 10.0).ToDecimal();
            }

            m_nHeaterCount.Text       = pReflower.m_nSampleHeaterAreaCount.ToString();
            m_nCoolCount.Text         = pReflower.m_nSampleCoolAreaCount.ToString();
            m_strReflowerProduct.Text = pReflower.m_strProduct;
            m_strReflowModel.Text     = pReflower.m_strModel;

            /* m_IsWidthSmall.CheckedChanged -= m_IsWidthSmall_CheckedChanged;
             * m_IsSpeedSmall.CheckedChanged -= m_IsSpeedSmall_CheckedChanged;
             * m_IsTemplSmall.CheckedChanged -= m_IsTemplSmall_CheckedChanged;*/


            m_IsWidthSmall.Checked = pReflower.m_IsWidthSmall;
            m_IsSpeedSmall.Checked = pReflower.m_IsSpeedSmall;
            m_IsTemplSmall.Checked = pReflower.m_IsTempSmall;
            m_strReflowerNote.Text = pReflower.m_strNotes;

            /*  m_IsWidthSmall.CheckedChanged += m_IsWidthSmall_CheckedChanged;
             * m_IsSpeedSmall.CheckedChanged += m_IsSpeedSmall_CheckedChanged;
             * m_IsTemplSmall.CheckedChanged += m_IsTemplSmall_CheckedChanged;*/
        }
コード例 #6
0
        // 回流炉
        public void CreateReflowerChart()
        {
            XYDiagram pDiagram = chartMain.Diagram as XYDiagram;

            //ASSERT(pDiagram);
            if (pDiagram != null)
            {
                for (int i = m_pChartSeries.Count - 1; i >= 0; i--)
                {
                    if (((SuperTag)m_pChartSeries[i].Tag)?.SeriesMark == "Reflower")
                    {
                        m_pChartSeries.RemoveAt(i);
                    }
                }

                /*for (int i = m_pChartSeries.Count - 1; i >= 0; i--)
                 * {
                 *  if (m_pChartSeries[i].Tag?.ToString() == "Reflower")
                 *  {
                 *      m_pChartSeries.RemoveAt(i);
                 *  }
                 * }*/

                for (int i = pDiagram.AxisX.ConstantLines.Count - 1; i >= 0; i--)
                {
                    if (((SuperTag)pDiagram.AxisX.ConstantLines[i].Tag)?.AxisXConstantLine == "Reflower")
                    {
                        pDiagram.AxisX.ConstantLines.RemoveAt(i);
                    }
                }

                for (int i = pDiagram.AxisY.ConstantLines.Count - 1; i >= 0; i--)
                {
                    if (((SuperTag)pDiagram.AxisY.ConstantLines[i].Tag)?.AxisYConstantLine == "Reflower")
                    {
                        pDiagram.AxisY.ConstantLines.RemoveAt(i);
                    }
                }

                if (m_IsShowReflowerZone)
                {
                    double dReflowerlenth         = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_fInitTempl;
                    var    pReflowerAreaData_Hot  = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_CAreaData["Hot"];
                    var    pReflowerAreaData_Cool = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_CAreaData["Cool"];

                    for (int ii = 0; ii < CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleHeaterAreaCount; ii++)
                    {
                        Series      pSeries     = new Series("", ViewType.Line);
                        CETReflower pETReflower = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower;

                        pSeries.CrosshairEnabled  = DefaultBoolean.False;
                        pSeries.View.Color        = Color.FromArgb(0, 255, 0);
                        pSeries.ArgumentScaleType = ScaleType.Numerical;
                        pSeries.ValueScaleType    = ScaleType.Numerical;
                        pSeries.ShowInLegend      = false;
                        pSeries.Tag = new SuperTag()
                        {
                            SeriesMark = "Reflower"
                        };

                        ((LineSeriesView)pSeries.View).LineStyle.Thickness = 2;

                        // 竖线
                        // 获得时间
                        double dZonePosX  = (dReflowerlenth / pETReflower.m_fSpeed) * 60.0;
                        double dTempWidth = (pReflowerAreaData_Hot[ii].m_fAreaLength / pETReflower.m_fSpeed) * 60.0;

                        SeriesPoint pSeriesPoint = new SeriesPoint(dZonePosX, pReflowerAreaData_Hot[ii].m_fAreaTemplTop);


                        pSeries.Points.Add(pSeriesPoint);
                        pSeriesPoint = new SeriesPoint(dZonePosX + dTempWidth, pReflowerAreaData_Hot[ii].m_fAreaTemplTop);
                        pSeries.Points.Add(pSeriesPoint);

                        // 横线
                        AxisX pAxisX = pDiagram.AxisX;
                        if (pAxisX != null)
                        {
                            var          pAxisCustomLabels = pAxisX.ConstantLines;
                            ConstantLine pAxisCustomLabel  = new ConstantLine();

                            // 获得时间
                            pAxisCustomLabel.AxisValue = dZonePosX.ToString("n1");

                            if (ii != CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleHeaterAreaCount)
                            {
                                string strTingTemp = string.Format(" [{0:n1}°C]", pReflowerAreaData_Hot[ii].m_fAreaTemplTop);

                                pAxisCustomLabel.Title.Text      = pReflowerAreaData_Hot[ii].m_strAreaTitle + strTingTemp;
                                pAxisCustomLabel.Title.Alignment = ConstantLineTitleAlignment.Far;
                            }

                            pAxisCustomLabel.Color               = Color.FromArgb(0, 128, 0);
                            pAxisCustomLabel.Title.TextColor     = Color.FromArgb(0, 128, 0);
                            pAxisCustomLabel.LineStyle.DashStyle = DashStyle.Dash;
                            pAxisCustomLabel.LineStyle.Thickness = 2;
                            pAxisCustomLabel.ShowInLegend        = false;
                            pAxisCustomLabel.Tag = new SuperTag()
                            {
                                AxisXConstantLine = "Reflower"
                            };
                            pAxisCustomLabels.Add(pAxisCustomLabel);

                            pSeries.Name = pAxisCustomLabel.AxisValue.ToString();
                        }

                        if (ii != CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleHeaterAreaCount - 1)
                        {
                            dReflowerlenth += pReflowerAreaData_Hot[ii].m_fAreaLength;
                            m_pChartSeries.Add(pSeries);
                        }
                        else
                        {
                            if (CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleCoolAreaCount > 0)
                            {
                                //dReflowerlenth += pReflowerAreaData_Hot[ii].m_fAreaLength;
                                dReflowerlenth += pReflowerAreaData_Cool[0].m_fAreaLength;
                                m_pChartSeries.Add(pSeries);
                            }
                        }
                    }


                    //      //
                    for (int ii = 0; ii < CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleCoolAreaCount; ii++)
                    {
                        Series      pSeries     = new Series("", ViewType.Line);
                        CETReflower pETReflower = CETCManagerApp.Instance.m_pETETCStage.m_ETReflower;

                        pSeries.View.Color        = Color.FromArgb(0, 255, 0);
                        pSeries.CrosshairEnabled  = DefaultBoolean.False;
                        pSeries.ArgumentScaleType = ScaleType.Numerical;
                        pSeries.ValueScaleType    = ScaleType.Numerical;
                        pSeries.ShowInLegend      = false;
                        pSeries.Tag = new SuperTag()
                        {
                            SeriesMark = "Reflower"
                        };
                        ((LineSeriesView)pSeries.View).LineStyle.Thickness = 2;

                        // 竖线
                        // 获得时间
                        double dZonePosX = (dReflowerlenth / pETReflower.m_fSpeed) * 60.0;//Frm_Main.GetMainForm().m_pETETCStage.m_nSampleRate*60;
                        //double dTempWith = (pETReflower.m_fAreaLength[ii + 12] / pETReflower.m_fSpeed) * 60.0;//Frm_Main.GetMainForm().m_pETETCStage.m_nSampleRate*60;
                        double dTempWith = (pReflowerAreaData_Cool[ii].m_fAreaLength / pETReflower.m_fSpeed) * 60.0;

                        //
                        //SeriesPoint pSeriesPoint = new SeriesPoint(dZonePosX, pETReflower.m_fAreaTemplTop[ii + 12]);
                        SeriesPoint pSeriesPoint = new SeriesPoint(dZonePosX, pReflowerAreaData_Cool[ii].m_fAreaTemplTop);
                        pSeries.Points.Add(pSeriesPoint);
                        //pSeriesPoint = new SeriesPoint(dZonePosX + dTempWith, pETReflower.m_fAreaTemplTop[ii + 12]);
                        pSeriesPoint = new SeriesPoint(dZonePosX + dTempWith, pReflowerAreaData_Cool[ii].m_fAreaTemplTop);
                        pSeries.Points.Add(pSeriesPoint);


                        //
                        // 横线
                        Axis pAxisX = pDiagram.AxisX;
                        if (pAxisX != null)
                        {
                            var          pAxisCustomLabels = pAxisX.ConstantLines;
                            ConstantLine pAxisCustomLabel  = new ConstantLine();

                            // 获得时间
                            pAxisCustomLabel.AxisValue = dZonePosX.ToString("n1");

                            if (ii != CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleCoolAreaCount)
                            {
                                //string strTingTemp = string.Format(" [{0:n1}°C]", pETReflower.m_fAreaTemplTop[ii + 12]);
                                string strTingTemp = string.Format(" [{0:n1}°C]", pReflowerAreaData_Cool[ii].m_fAreaTemplTop);
                                //pAxisCustomLabel.Title.Text = pETReflower.m_strAreaTitle[ii + 12] + strTingTemp;
                                pAxisCustomLabel.Title.Text      = pReflowerAreaData_Cool[ii].m_strAreaTitle + strTingTemp;
                                pAxisCustomLabel.Title.Alignment = ConstantLineTitleAlignment.Far;
                            }

                            pAxisCustomLabel.Color               = Color.FromArgb(0, 128, 0);
                            pAxisCustomLabel.Title.TextColor     = Color.FromArgb(0, 128, 0);
                            pAxisCustomLabel.LineStyle.DashStyle = DashStyle.Dash;
                            pAxisCustomLabel.LineStyle.Thickness = 2;
                            pAxisCustomLabel.ShowInLegend        = false;
                            pAxisCustomLabel.Tag = new SuperTag()
                            {
                                AxisXConstantLine = "Reflower"
                            };
                            pAxisCustomLabels.Add(pAxisCustomLabel);

                            pSeries.Name = pAxisCustomLabel.AxisValue.ToString();
                        }
                        if (ii != CETCManagerApp.Instance.m_pETETCStage.m_ETReflower.m_nSampleCoolAreaCount - 1)
                        {
                            //dReflowerlenth += pETReflower.m_fAreaLength[ii + 12];
                            dReflowerlenth += pReflowerAreaData_Cool[ii].m_fAreaLength;
                            m_pChartSeries.Add(pSeries);
                        }
                    }
                    //

                    /*Series pSeries2 = new Series("", ViewType.Line);
                     * CETReflower pETReflower2 = Frm_Main.GetMainForm().m_pETETCStage.m_ETReflower;
                     *
                     * pSeries2.View.Color = Color.FromArgb(0, 255, 0);
                     *
                     * pSeries2.ArgumentScaleType = ScaleType.Numerical;
                     * //pSeries2.ArgumentDataMember = "時間";
                     * pSeries2.ValueScaleType = ScaleType.Numerical;
                     * pSeries2.ShowInLegend = false;
                     * ((LineSeriesView)pSeries2.View).LineStyle.Thickness = 2;
                     *
                     * // 竖线
                     * //
                     * // 横线
                     * Axis pAxisX2 = pDiagram.AxisX;
                     * if (pAxisX2 != null)
                     * {
                     *  // 获得时间
                     *  var pAxisCustomLabels = pAxisX2.ConstantLines;
                     *  ConstantLine pAxisCustomLabel = new ConstantLine();
                     *  string strAxis = ((pETReflower2.m_fInitTempl / pETReflower2.m_fSpeed) * 60.0).ToString();
                     *  pAxisCustomLabel.AxisValue = string.Format("n1", strAxis);
                     *  pAxisCustomLabel.Color = Color.FromArgb(255, 0, 0);
                     *  pAxisCustomLabel.Title.TextColor = Color.FromArgb(255, 0, 0);
                     *  pAxisCustomLabel.LineStyle.DashStyle = DashStyle.Solid;
                     *  pAxisCustomLabel.LineStyle.Thickness = 2;
                     *  pAxisCustomLabel.ShowInLegend = false;
                     *  pAxisCustomLabels.Add(pAxisCustomLabel);
                     *  pSeries2.Name = pAxisCustomLabel.AxisValue.ToString();
                     * }
                     *
                     * pCollection.Add(pSeries2);*/
                }
            }
        }