예제 #1
0
        private void chart_Spectrum_addLine(object wave, double[] spec, bool newSeries, string name)
        {
            if (newSeries)
            {
                ESeriesClass series = new ESeriesClass();

                int index = Chart_spec.AddSeries(series);
                Chart_fitting.Series(index).Title = name;
                Chart_fitting.Series(index).AddArray(spec.Length, spec, wave);
            }
            else
            {
                Chart_spec.Series(0).AddArray(spec.Length, spec, wave);
            }
        }
예제 #2
0
        private void btn_record_Click(object sender, EventArgs e)
        {
            if (processSpec.IsConn)
            {
                int   index = Chart_spec.AddSeries(ESeriesClass.scFastLine);
                Color co    = colorList.getNextColor();
                Chart_spec.Series(index).Color = (uint)ColorTranslator.ToWin32(co);
                Chart_spec.Series(index).asFastLine.LinePen.Width = boldLineWidth;
                Chart_spec.Series(index).AddArray(processSpec.pixelNumber, processSpec.showY, processSpec.showX);

                processSpec.recordSpec(index);


                int gridindex = this.dataGridView1.Rows.Add();
                this.dataGridView1.Rows[gridindex].Cells[0].Value                    = true;
                this.dataGridView1.Rows[gridindex].Cells[1].Style.BackColor          = co;
                this.dataGridView1.Rows[gridindex].Cells[1].Style.SelectionForeColor = co;
                this.dataGridView1.Rows[gridindex].Cells[2].Value                    = "谱图" + index;
            }
        }
예제 #3
0
        private void addSpecSeries(double[] bfspectrum, double[] bfwavelength, string showName = "")
        {
            if (showName == "")
            {
                showName = "谱图" + (Chart_spec.SeriesCount - 1);
            }
            processSpec.recordSpec(showName, bfwavelength, bfspectrum);

            // ESeriesClass series = new ESeriesClass();
            int   index = Chart_spec.AddSeries(ESeriesClass.scFastLine);
            Color co    = colorList.getNextColor();

            Chart_spec.Series(index).Color = (uint)ColorTranslator.ToWin32(co);
            Chart_spec.Series(index).asFastLine.LinePen.Width = boldLineWidth;
            Chart_spec.Series(index).AddArray(bfwavelength.Length, bfspectrum, bfwavelength);
            int gridindex = this.dataGridView1.Rows.Add();

            this.dataGridView1.Rows[gridindex].Cells[0].Value                    = true;
            this.dataGridView1.Rows[gridindex].Cells[1].Style.BackColor          = co;
            this.dataGridView1.Rows[gridindex].Cells[1].Style.SelectionForeColor = co;
            this.dataGridView1.Rows[gridindex].Cells[2].Value                    = showName;
        }