diff --git a/ISCamRecorder/MainForm.Designer.cs b/ISCamRecorder/MainForm.Designer.cs index f6ff095..594832e 100644 --- a/ISCamRecorder/MainForm.Designer.cs +++ b/ISCamRecorder/MainForm.Designer.cs @@ -89,7 +89,7 @@ // // BtnSetProperty // - this.BtnSetProperty.Location = new System.Drawing.Point(948, 14); + this.BtnSetProperty.Location = new System.Drawing.Point(976, 11); this.BtnSetProperty.Name = "BtnSetProperty"; this.BtnSetProperty.Size = new System.Drawing.Size(62, 34); this.BtnSetProperty.TabIndex = 5; @@ -114,7 +114,7 @@ // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer1.Size = new System.Drawing.Size(1016, 496); + this.splitContainer1.Size = new System.Drawing.Size(1050, 496); this.splitContainer1.SplitterDistance = 248; this.splitContainer1.TabIndex = 7; this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); @@ -134,8 +134,8 @@ // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.splitContainer3); - this.splitContainer2.Size = new System.Drawing.Size(1016, 248); - this.splitContainer2.SplitterDistance = 336; + this.splitContainer2.Size = new System.Drawing.Size(1050, 248); + this.splitContainer2.SplitterDistance = 347; this.splitContainer2.TabIndex = 0; this.splitContainer2.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // @@ -147,7 +147,7 @@ this.TxtCvCamera.Location = new System.Drawing.Point(3, 3); this.TxtCvCamera.Name = "TxtCvCamera"; this.TxtCvCamera.ReadOnly = true; - this.TxtCvCamera.Size = new System.Drawing.Size(328, 19); + this.TxtCvCamera.Size = new System.Drawing.Size(339, 19); this.TxtCvCamera.TabIndex = 3; this.TxtCvCamera.Text = "近接カメラ"; // @@ -158,7 +158,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.PicCvCamera.Location = new System.Drawing.Point(3, 28); this.PicCvCamera.Name = "PicCvCamera"; - this.PicCvCamera.Size = new System.Drawing.Size(328, 216); + this.PicCvCamera.Size = new System.Drawing.Size(339, 216); this.PicCvCamera.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.PicCvCamera.TabIndex = 0; this.PicCvCamera.TabStop = false; @@ -179,8 +179,8 @@ // this.splitContainer3.Panel2.Controls.Add(this.TxtSensor); this.splitContainer3.Panel2.Controls.Add(this.chart1); - this.splitContainer3.Size = new System.Drawing.Size(676, 248); - this.splitContainer3.SplitterDistance = 337; + this.splitContainer3.Size = new System.Drawing.Size(699, 248); + this.splitContainer3.SplitterDistance = 348; this.splitContainer3.TabIndex = 0; this.splitContainer3.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // @@ -192,7 +192,7 @@ this.TxtTop.Location = new System.Drawing.Point(4, 3); this.TxtTop.Name = "TxtTop"; this.TxtTop.ReadOnly = true; - this.TxtTop.Size = new System.Drawing.Size(327, 19); + this.TxtTop.Size = new System.Drawing.Size(338, 19); this.TxtTop.TabIndex = 2; // // icTop @@ -207,7 +207,7 @@ this.icTop.LiveDisplayPosition = new System.Drawing.Point(0, 0); this.icTop.Location = new System.Drawing.Point(4, 28); this.icTop.Name = "icTop"; - this.icTop.Size = new System.Drawing.Size(329, 216); + this.icTop.Size = new System.Drawing.Size(340, 216); this.icTop.TabIndex = 1; // // TxtSensor @@ -218,7 +218,7 @@ this.TxtSensor.Location = new System.Drawing.Point(3, 3); this.TxtSensor.Name = "TxtSensor"; this.TxtSensor.ReadOnly = true; - this.TxtSensor.Size = new System.Drawing.Size(329, 19); + this.TxtSensor.Size = new System.Drawing.Size(341, 19); this.TxtSensor.TabIndex = 3; this.TxtSensor.Text = "逆血センサー"; // @@ -239,7 +239,7 @@ chartArea1.AxisX.LabelStyle.Format = "0.0"; chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.Gray; chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Gray; - chartArea1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); + chartArea1.BackColor = System.Drawing.Color.LemonChiffon; chartArea1.Name = "ChartArea1"; chartArea1.Position.Auto = false; chartArea1.Position.Height = 94F; @@ -277,7 +277,7 @@ this.chart1.Series.Add(series1); this.chart1.Series.Add(series2); this.chart1.Series.Add(series3); - this.chart1.Size = new System.Drawing.Size(327, 218); + this.chart1.Size = new System.Drawing.Size(339, 218); this.chart1.TabIndex = 0; this.chart1.Text = "chart1"; // @@ -296,8 +296,8 @@ // splitContainer4.Panel2 // this.splitContainer4.Panel2.Controls.Add(this.splitContainer5); - this.splitContainer4.Size = new System.Drawing.Size(1016, 244); - this.splitContainer4.SplitterDistance = 336; + this.splitContainer4.Size = new System.Drawing.Size(1050, 244); + this.splitContainer4.SplitterDistance = 347; this.splitContainer4.TabIndex = 0; this.splitContainer4.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // @@ -309,7 +309,7 @@ this.TxtLeft.Location = new System.Drawing.Point(3, 3); this.TxtLeft.Name = "TxtLeft"; this.TxtLeft.ReadOnly = true; - this.TxtLeft.Size = new System.Drawing.Size(326, 19); + this.TxtLeft.Size = new System.Drawing.Size(337, 19); this.TxtLeft.TabIndex = 4; // // icLeft @@ -324,7 +324,7 @@ this.icLeft.LiveDisplayPosition = new System.Drawing.Point(0, 0); this.icLeft.Location = new System.Drawing.Point(3, 28); this.icLeft.Name = "icLeft"; - this.icLeft.Size = new System.Drawing.Size(329, 211); + this.icLeft.Size = new System.Drawing.Size(340, 211); this.icLeft.TabIndex = 3; // // splitContainer5 @@ -343,8 +343,8 @@ // this.splitContainer5.Panel2.Controls.Add(this.TxtRight); this.splitContainer5.Panel2.Controls.Add(this.icRight); - this.splitContainer5.Size = new System.Drawing.Size(676, 244); - this.splitContainer5.SplitterDistance = 337; + this.splitContainer5.Size = new System.Drawing.Size(699, 244); + this.splitContainer5.SplitterDistance = 348; this.splitContainer5.TabIndex = 0; this.splitContainer5.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // @@ -356,7 +356,7 @@ this.TxtFront.Location = new System.Drawing.Point(3, 3); this.TxtFront.Name = "TxtFront"; this.TxtFront.ReadOnly = true; - this.TxtFront.Size = new System.Drawing.Size(327, 19); + this.TxtFront.Size = new System.Drawing.Size(338, 19); this.TxtFront.TabIndex = 10; // // icFront @@ -371,7 +371,7 @@ this.icFront.LiveDisplayPosition = new System.Drawing.Point(0, 0); this.icFront.Location = new System.Drawing.Point(3, 28); this.icFront.Name = "icFront"; - this.icFront.Size = new System.Drawing.Size(328, 211); + this.icFront.Size = new System.Drawing.Size(339, 211); this.icFront.TabIndex = 9; // // TxtRight @@ -382,7 +382,7 @@ this.TxtRight.Location = new System.Drawing.Point(1, 3); this.TxtRight.Name = "TxtRight"; this.TxtRight.ReadOnly = true; - this.TxtRight.Size = new System.Drawing.Size(329, 19); + this.TxtRight.Size = new System.Drawing.Size(341, 19); this.TxtRight.TabIndex = 11; // // icRight @@ -397,7 +397,7 @@ this.icRight.LiveDisplayPosition = new System.Drawing.Point(0, 0); this.icRight.Location = new System.Drawing.Point(1, 28); this.icRight.Name = "icRight"; - this.icRight.Size = new System.Drawing.Size(329, 211); + this.icRight.Size = new System.Drawing.Size(341, 211); this.icRight.TabIndex = 5; // // BtnRecodeMovie @@ -434,13 +434,13 @@ this.TxtSubjectName.Font = new System.Drawing.Font("MS UI Gothic", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.TxtSubjectName.Location = new System.Drawing.Point(487, 14); this.TxtSubjectName.Name = "TxtSubjectName"; - this.TxtSubjectName.Size = new System.Drawing.Size(281, 31); + this.TxtSubjectName.Size = new System.Drawing.Size(319, 31); this.TxtSubjectName.TabIndex = 24; this.TxtSubjectName.Text = "テスト"; // // BtnSetting // - this.BtnSetting.Location = new System.Drawing.Point(848, 14); + this.BtnSetting.Location = new System.Drawing.Point(876, 12); this.BtnSetting.Name = "BtnSetting"; this.BtnSetting.Size = new System.Drawing.Size(94, 34); this.BtnSetting.TabIndex = 25; @@ -471,7 +471,7 @@ // TxtCounter // this.TxtCounter.Font = new System.Drawing.Font("MS UI Gothic", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); - this.TxtCounter.Location = new System.Drawing.Point(774, 14); + this.TxtCounter.Location = new System.Drawing.Point(812, 14); this.TxtCounter.Name = "TxtCounter"; this.TxtCounter.Size = new System.Drawing.Size(29, 31); this.TxtCounter.TabIndex = 28; @@ -482,7 +482,7 @@ // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(809, 25); + this.label9.Location = new System.Drawing.Point(847, 25); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(29, 12); this.label9.TabIndex = 29; @@ -512,7 +512,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1016, 555); + this.ClientSize = new System.Drawing.Size(1050, 555); this.Controls.Add(this.PnlState); this.Controls.Add(this.label9); this.Controls.Add(this.TxtCounter); diff --git a/ISCamRecorder/SensorData.cs b/ISCamRecorder/SensorData.cs index 65f16d4..c1ff9af 100644 --- a/ISCamRecorder/SensorData.cs +++ b/ISCamRecorder/SensorData.cs @@ -134,21 +134,33 @@ } if (_IsRecoding) { + // 検出チャネル決定 + Queue detectCh; + switch (_MF.Setting.RBDetectCh) { + case "R": detectCh = ValuesR; break; + case "G": detectCh = ValuesG; break; + default: detectCh = ValuesB; break; + } // 逆血閾値決定 - var minValue = ValuesG.Min(); - if (_ReverseBloodThreshold < 0 && ValuesG.Count >= NUM_SAMPLES_SET_THRES) { + var minValue = detectCh.Min(); + if (_ReverseBloodThreshold < 0 && detectCh.Count >= NUM_SAMPLES_SET_THRES) { _ReverseBloodThreshold = minValue - _MF.Setting.RBThreshold; - Debug.WriteLine($"逆血閾値 {_ReverseBloodThreshold}"); + //Debug.WriteLine($"逆血閾値 {_ReverseBloodThreshold}"); } // 逆血判定 if (_ReverseBloodThreshold > 0) { - var count = ValuesG.Skip(ValuesG.Count - _MF.Setting.RBDetectSize) + var count = detectCh.Skip(ValuesG.Count - _MF.Setting.RBDetectSize) .Where(v => v <= _ReverseBloodThreshold).Count(); - Debug.WriteLine($"逆血検出数 {count}"); + //Debug.WriteLine($"逆血検出数 {count}"); if (!_IsReverseBlood && count >= _MF.Setting.RBDetectCount) { _IsReverseBlood = true; _MF.ReverseBlood(); + _MF.SensorChart.Invoke((MethodInvoker)delegate { + var an = (TextAnnotation)_MF.SensorChart.Annotations["AnnReverseBlood"]; + an.Text = "逆血あり"; + _MF.SensorChart.ChartAreas[0].BackColor = Color.LightPink; + }); } } } @@ -156,18 +168,12 @@ // プロット表示 if (_MF.State != STATE.Exit) { _MF.SensorChart.Invoke((MethodInvoker)delegate { - var an = (TextAnnotation)_MF.SensorChart.Annotations["AnnReverseBlood"]; - an.Visible = _IsRecoding; - if (_IsRecoding) { - an.Text = _IsReverseBlood ? "逆血あり" : "逆血なし"; - an.ForeColor = _IsReverseBlood ? Color.OrangeRed : Color.Black; - } _MF.SensorChart.Series[0].Points.Clear(); - _MF.SensorChart.Series[0].Points.DataBindXY(Times, ValuesB); + if (_MF.Setting.RBDetectCh == "B") _MF.SensorChart.Series[0].Points.DataBindXY(Times, ValuesB); _MF.SensorChart.Series[1].Points.Clear(); - _MF.SensorChart.Series[1].Points.DataBindXY(Times, ValuesR); + if (_MF.Setting.RBDetectCh == "R") _MF.SensorChart.Series[1].Points.DataBindXY(Times, ValuesR); _MF.SensorChart.Series[2].Points.Clear(); - _MF.SensorChart.Series[2].Points.DataBindXY(Times, ValuesG); + if (_MF.Setting.RBDetectCh == "G") _MF.SensorChart.Series[2].Points.DataBindXY(Times, ValuesG); }); } @@ -200,7 +206,9 @@ if (_CsvWriter != null) { _CsvWriter.WriteLine($"Date,Time,elapsed,B,R,G,IR,switch,Reverse Blood"); } - + _MF.SensorChart.Invoke((MethodInvoker)delegate { + _MF.SensorChart.Annotations["AnnReverseBlood"].Visible = true; + }); _ReverseBloodThreshold = -1; _ReverseBloodCount = 0; _IsReverseBlood = false; @@ -221,6 +229,12 @@ _CsvReader.Close(); _CsvReader = null; } + _MF.SensorChart.Invoke((MethodInvoker)delegate { + var an = (TextAnnotation)_MF.SensorChart.Annotations["AnnReverseBlood"]; + an.Text = "逆血なし"; + an.Visible = false; + _MF.SensorChart.ChartAreas[0].BackColor = Color.LemonChiffon; + }); } /// diff --git a/ISCamRecorder/Setting.Designer.cs b/ISCamRecorder/Setting.Designer.cs index 9bedf3f..9f5338c 100644 --- a/ISCamRecorder/Setting.Designer.cs +++ b/ISCamRecorder/Setting.Designer.cs @@ -72,11 +72,15 @@ this.label15 = new System.Windows.Forms.Label(); this.TxtRBDetectCount = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); + this.CboRBDetectCh = new System.Windows.Forms.ComboBox(); this.groupBox1.SuspendLayout(); this.panel1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); + this.groupBox5.SuspendLayout(); this.SuspendLayout(); // // label3 @@ -99,13 +103,6 @@ // // groupBox1 // - this.groupBox1.Controls.Add(this.label16); - this.groupBox1.Controls.Add(this.TxtRBDetectCount); - this.groupBox1.Controls.Add(this.label15); - this.groupBox1.Controls.Add(this.TxtRBDetectSize); - this.groupBox1.Controls.Add(this.label14); - this.groupBox1.Controls.Add(this.TxtRBThreshold); - this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.panel1); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.TxtTriggerFPS); @@ -114,7 +111,7 @@ this.groupBox1.Controls.Add(this.TxtOutputDir); this.groupBox1.Location = new System.Drawing.Point(10, 12); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(343, 125); + this.groupBox1.Size = new System.Drawing.Size(343, 105); this.groupBox1.TabIndex = 17; this.groupBox1.TabStop = false; this.groupBox1.Text = "全体設定"; @@ -211,12 +208,12 @@ this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(53, 12); this.label7.TabIndex = 22; - this.label7.Text = "画像形式"; + this.label7.Text = "保存形式"; // // BtnApply // this.BtnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.BtnApply.Location = new System.Drawing.Point(408, 373); + this.BtnApply.Location = new System.Drawing.Point(415, 437); this.BtnApply.Name = "BtnApply"; this.BtnApply.Size = new System.Drawing.Size(93, 31); this.BtnApply.TabIndex = 18; @@ -227,7 +224,7 @@ // BtnCancel // this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.BtnCancel.Location = new System.Drawing.Point(507, 373); + this.BtnCancel.Location = new System.Drawing.Point(514, 437); this.BtnCancel.Name = "BtnCancel"; this.BtnCancel.Size = new System.Drawing.Size(93, 31); this.BtnCancel.TabIndex = 19; @@ -253,9 +250,9 @@ this.groupBox2.Controls.Add(this.ChkRecLeft); this.groupBox2.Controls.Add(this.ChkRecTop); this.groupBox2.Controls.Add(this.label9); - this.groupBox2.Location = new System.Drawing.Point(10, 153); + this.groupBox2.Location = new System.Drawing.Point(10, 133); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(343, 156); + this.groupBox2.Size = new System.Drawing.Size(343, 147); this.groupBox2.TabIndex = 20; this.groupBox2.TabStop = false; this.groupBox2.Text = "映像録画設定"; @@ -268,7 +265,7 @@ "JPG", "BMP", "TIF"}); - this.CboFrameType.Location = new System.Drawing.Point(72, 58); + this.CboFrameType.Location = new System.Drawing.Point(133, 58); this.CboFrameType.Name = "CboFrameType"; this.CboFrameType.Size = new System.Drawing.Size(52, 20); this.CboFrameType.TabIndex = 56; @@ -278,15 +275,15 @@ this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(13, 61); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(53, 12); + this.label11.Size = new System.Drawing.Size(114, 12); this.label11.TabIndex = 55; - this.label11.Text = "画像形式"; + this.label11.Text = "フレーム画像保存形式"; // // LblAvailableMemory // this.LblAvailableMemory.AutoSize = true; this.LblAvailableMemory.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); - this.LblAvailableMemory.Location = new System.Drawing.Point(154, 80); + this.LblAvailableMemory.Location = new System.Drawing.Point(154, 109); this.LblAvailableMemory.Name = "LblAvailableMemory"; this.LblAvailableMemory.Size = new System.Drawing.Size(89, 12); this.LblAvailableMemory.TabIndex = 54; @@ -296,7 +293,7 @@ // this.LblRecodingMemory.AutoSize = true; this.LblRecodingMemory.Font = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); - this.LblRecodingMemory.Location = new System.Drawing.Point(154, 102); + this.LblRecodingMemory.Location = new System.Drawing.Point(154, 91); this.LblRecodingMemory.Name = "LblRecodingMemory"; this.LblRecodingMemory.Size = new System.Drawing.Size(89, 12); this.LblRecodingMemory.TabIndex = 53; @@ -305,7 +302,7 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(128, 102); + this.label2.Location = new System.Drawing.Point(128, 91); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(17, 12); this.label2.TabIndex = 52; @@ -314,7 +311,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 102); + this.label1.Location = new System.Drawing.Point(13, 91); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(77, 12); this.label1.TabIndex = 51; @@ -322,7 +319,7 @@ // // TxtRecodingDulation // - this.TxtRecodingDulation.Location = new System.Drawing.Point(90, 99); + this.TxtRecodingDulation.Location = new System.Drawing.Point(90, 88); this.TxtRecodingDulation.Name = "TxtRecodingDulation"; this.TxtRecodingDulation.Size = new System.Drawing.Size(32, 19); this.TxtRecodingDulation.TabIndex = 50; @@ -333,7 +330,7 @@ // // TxtMovieRate // - this.TxtMovieRate.Location = new System.Drawing.Point(68, 126); + this.TxtMovieRate.Location = new System.Drawing.Point(68, 115); this.TxtMovieRate.Name = "TxtMovieRate"; this.TxtMovieRate.Size = new System.Drawing.Size(40, 19); this.TxtMovieRate.TabIndex = 49; @@ -344,7 +341,7 @@ // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(13, 129); + this.label5.Location = new System.Drawing.Point(13, 118); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(56, 12); this.label5.TabIndex = 48; @@ -353,7 +350,7 @@ // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(114, 129); + this.label6.Location = new System.Drawing.Point(114, 118); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(29, 12); this.label6.TabIndex = 47; @@ -428,7 +425,7 @@ this.groupBox3.Controls.Add(this.ChkSnapTop); this.groupBox3.Controls.Add(this.label7); this.groupBox3.Controls.Add(this.label10); - this.groupBox3.Location = new System.Drawing.Point(10, 323); + this.groupBox3.Location = new System.Drawing.Point(10, 295); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(343, 84); this.groupBox3.TabIndex = 21; @@ -496,11 +493,14 @@ // // groupBox4 // + this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.groupBox4.Controls.Add(this.TxtSubjectList); this.groupBox4.Controls.Add(this.label12); this.groupBox4.Location = new System.Drawing.Point(369, 12); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(231, 352); + this.groupBox4.Size = new System.Drawing.Size(238, 416); this.groupBox4.TabIndex = 22; this.groupBox4.TabStop = false; this.groupBox4.Text = "被験者設定"; @@ -515,8 +515,9 @@ this.TxtSubjectList.Multiline = true; this.TxtSubjectList.Name = "TxtSubjectList"; this.TxtSubjectList.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.TxtSubjectList.Size = new System.Drawing.Size(211, 285); + this.TxtSubjectList.Size = new System.Drawing.Size(218, 349); this.TxtSubjectList.TabIndex = 2; + this.TxtSubjectList.WordWrap = false; // // label12 // @@ -530,15 +531,15 @@ // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(7, 103); + this.label13.Location = new System.Drawing.Point(11, 27); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(125, 12); + this.label13.Size = new System.Drawing.Size(77, 12); this.label13.TabIndex = 35; - this.label13.Text = "逆血検出信号変化閾値"; + this.label13.Text = "信号変化閾値"; // // TxtRBThreshold // - this.TxtRBThreshold.Location = new System.Drawing.Point(130, 100); + this.TxtRBThreshold.Location = new System.Drawing.Point(94, 24); this.TxtRBThreshold.Name = "TxtRBThreshold"; this.TxtRBThreshold.Size = new System.Drawing.Size(25, 19); this.TxtRBThreshold.TabIndex = 58; @@ -549,7 +550,7 @@ // label14 // this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(166, 103); + this.label14.Location = new System.Drawing.Point(151, 27); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(65, 12); this.label14.TabIndex = 59; @@ -557,7 +558,7 @@ // // TxtRBDetectSize // - this.TxtRBDetectSize.Location = new System.Drawing.Point(232, 100); + this.TxtRBDetectSize.Location = new System.Drawing.Point(221, 24); this.TxtRBDetectSize.Name = "TxtRBDetectSize"; this.TxtRBDetectSize.Size = new System.Drawing.Size(25, 19); this.TxtRBDetectSize.TabIndex = 60; @@ -568,7 +569,7 @@ // label15 // this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(263, 103); + this.label15.Location = new System.Drawing.Point(250, 27); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(29, 12); this.label15.TabIndex = 61; @@ -576,7 +577,7 @@ // // TxtRBDetectCount // - this.TxtRBDetectCount.Location = new System.Drawing.Point(292, 100); + this.TxtRBDetectCount.Location = new System.Drawing.Point(282, 24); this.TxtRBDetectCount.Name = "TxtRBDetectCount"; this.TxtRBDetectCount.Size = new System.Drawing.Size(25, 19); this.TxtRBDetectCount.TabIndex = 62; @@ -587,18 +588,59 @@ // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(320, 103); + this.label16.Location = new System.Drawing.Point(313, 27); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(17, 12); this.label16.TabIndex = 63; this.label16.Text = "個"; // + // groupBox5 + // + this.groupBox5.Controls.Add(this.CboRBDetectCh); + this.groupBox5.Controls.Add(this.label17); + this.groupBox5.Controls.Add(this.label16); + this.groupBox5.Controls.Add(this.label13); + this.groupBox5.Controls.Add(this.TxtRBDetectCount); + this.groupBox5.Controls.Add(this.TxtRBThreshold); + this.groupBox5.Controls.Add(this.label15); + this.groupBox5.Controls.Add(this.label14); + this.groupBox5.Controls.Add(this.TxtRBDetectSize); + this.groupBox5.Location = new System.Drawing.Point(10, 394); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(343, 77); + this.groupBox5.TabIndex = 23; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "逆血検出センサー設定"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(11, 55); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(66, 12); + this.label17.TabIndex = 64; + this.label17.Text = "検出チャネル"; + // + // CboRBDetectCh + // + this.CboRBDetectCh.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CboRBDetectCh.FormattingEnabled = true; + this.CboRBDetectCh.Items.AddRange(new object[] { + "R", + "G", + "B"}); + this.CboRBDetectCh.Location = new System.Drawing.Point(83, 51); + this.CboRBDetectCh.Name = "CboRBDetectCh"; + this.CboRBDetectCh.Size = new System.Drawing.Size(36, 20); + this.CboRBDetectCh.TabIndex = 65; + // // Setting // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(612, 416); + this.ClientSize = new System.Drawing.Size(619, 480); this.ControlBox = false; + this.Controls.Add(this.groupBox5); this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); @@ -622,6 +664,8 @@ this.groupBox3.PerformLayout(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); this.ResumeLayout(false); } @@ -676,5 +720,8 @@ private System.Windows.Forms.TextBox TxtRBDetectCount; private System.Windows.Forms.Label label15; private System.Windows.Forms.TextBox TxtRBDetectSize; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.ComboBox CboRBDetectCh; + private System.Windows.Forms.Label label17; } } \ No newline at end of file diff --git a/ISCamRecorder/Setting.cs b/ISCamRecorder/Setting.cs index 107884b..5aa9668 100644 --- a/ISCamRecorder/Setting.cs +++ b/ISCamRecorder/Setting.cs @@ -15,7 +15,7 @@ readonly string SUBJECT_LIST_FILE = @"SubjectList.txt"; public enum ACTION { movie, image} public string SaveDir { get; private set; } - public string ImageType { get; private set; } // フォーム表示は大文字,変数は小文字で記録 + public string ImageType { get; private set; } // 静止画保存 フォーム表示は大文字,変数は小文字で記録 public string FrameType { get; private set; } // フォーム表示は大文字,変数は小文字で記録 public int MovieRate { get; private set; } public float RecodingLimit { get; private set; } @@ -29,6 +29,8 @@ public int RBThreshold { get; private set; } // 逆血検出信号変化閾値 public int RBDetectSize { get; private set; } // 直近信号検出ウインドウサイズ public int RBDetectCount { get; private set; } // 直近信号検出数 + public string RBDetectCh { get; private set; } + /// /// コンストラクタ @@ -44,6 +46,7 @@ RBThreshold = 10; RBDetectSize = 10; RBDetectCount = 5; + RBDetectCh = "G"; #if DEBUG SaveDir = @"D:\DataDBG"; RecodingLimit = 10F; @@ -92,6 +95,7 @@ TxtRBThreshold.Text = RBThreshold.ToString(); TxtRBDetectSize.Text = RBDetectSize.ToString(); TxtRBDetectCount.Text = RBDetectCount.ToString(); + CboRBDetectCh.SelectedItem = RBDetectCh; this.UpdateMemoryInfo(); } @@ -123,6 +127,7 @@ RBThreshold = int.Parse(TxtRBThreshold.Text); RBDetectSize = int.Parse(TxtRBDetectSize.Text); RBDetectCount = int.Parse(TxtRBDetectCount.Text); + RBDetectCh = CboRBDetectCh.Text; this.Close(); }