相机查看界面增加曝光时间和增益的临时调节

master
lhiven 1 year ago
parent b39c081930
commit a67f402760

@ -232,5 +232,37 @@ namespace Rs.MotionPlat.SysConfig
this.Opacity = 1;
this.Location = new Point(tWidth - Width, tHeight - Height);
}
private void txtUpCameraExposureTime_KeyUp(object sender, KeyEventArgs e)
{
if(e.KeyCode== Keys.Enter)
{
HikCamera.Instance.SetExposure("upCamera", float.Parse(txtUpCameraExposureTime.Text));
}
}
private void txtUpCameraGain_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
HikCamera.Instance.SetGain("upCamera", float.Parse(txtUpCameraGain.Text));
}
}
private void txtDownCameraExposureTime_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
HikCamera.Instance.SetExposure("locationCamera", float.Parse(txtDownCameraExposureTime.Text));
}
}
private void txtDownCameraGain_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
HikCamera.Instance.SetGain("locationCamera", float.Parse(txtDownCameraGain.Text));
}
}
}
}

@ -35,9 +35,19 @@
this.btnDownCameraGrab = new System.Windows.Forms.Button();
this.btnUpCameraGrab = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.himgNozzle8 = new ChoiceTech.Halcon.Control.HWindow_Final();
this.label4 = new System.Windows.Forms.Label();
this.txtUpCameraExposureTime = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtUpCameraGain = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtDownCameraExposureTime = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtDownCameraGain = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// panel1
@ -117,12 +127,29 @@
// panel2
//
this.panel2.Controls.Add(this.himgNozzle8);
this.panel2.Controls.Add(this.panel3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 96);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(633, 685);
this.panel2.Size = new System.Drawing.Size(633, 748);
this.panel2.TabIndex = 4;
//
// panel3
//
this.panel3.Controls.Add(this.txtDownCameraGain);
this.panel3.Controls.Add(this.label3);
this.panel3.Controls.Add(this.txtUpCameraGain);
this.panel3.Controls.Add(this.txtDownCameraExposureTime);
this.panel3.Controls.Add(this.label1);
this.panel3.Controls.Add(this.label2);
this.panel3.Controls.Add(this.txtUpCameraExposureTime);
this.panel3.Controls.Add(this.label4);
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel3.Location = new System.Drawing.Point(0, 701);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(633, 47);
this.panel3.TabIndex = 14;
//
// himgNozzle8
//
this.himgNozzle8.BackColor = System.Drawing.Color.Transparent;
@ -134,14 +161,86 @@
this.himgNozzle8.Location = new System.Drawing.Point(0, 0);
this.himgNozzle8.Margin = new System.Windows.Forms.Padding(4);
this.himgNozzle8.Name = "himgNozzle8";
this.himgNozzle8.Size = new System.Drawing.Size(633, 685);
this.himgNozzle8.TabIndex = 13;
this.himgNozzle8.Size = new System.Drawing.Size(633, 701);
this.himgNozzle8.TabIndex = 15;
//
// label4
//
this.label4.AutoSize = true;
this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Location = new System.Drawing.Point(12, 16);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 12);
this.label4.TabIndex = 2;
this.label4.Text = "上相机曝光:";
//
// txtUpCameraExposureTime
//
this.txtUpCameraExposureTime.Location = new System.Drawing.Point(86, 12);
this.txtUpCameraExposureTime.Name = "txtUpCameraExposureTime";
this.txtUpCameraExposureTime.Size = new System.Drawing.Size(65, 21);
this.txtUpCameraExposureTime.TabIndex = 3;
this.txtUpCameraExposureTime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtUpCameraExposureTime_KeyUp);
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(163, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 12);
this.label1.TabIndex = 2;
this.label1.Text = "上相机增益:";
//
// txtUpCameraGain
//
this.txtUpCameraGain.Location = new System.Drawing.Point(237, 13);
this.txtUpCameraGain.Name = "txtUpCameraGain";
this.txtUpCameraGain.Size = new System.Drawing.Size(65, 21);
this.txtUpCameraGain.TabIndex = 3;
this.txtUpCameraGain.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtUpCameraGain_KeyUp);
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(331, 19);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 12);
this.label2.TabIndex = 2;
this.label2.Text = "下相机曝光:";
//
// txtDownCameraExposureTime
//
this.txtDownCameraExposureTime.Location = new System.Drawing.Point(405, 15);
this.txtDownCameraExposureTime.Name = "txtDownCameraExposureTime";
this.txtDownCameraExposureTime.Size = new System.Drawing.Size(65, 21);
this.txtDownCameraExposureTime.TabIndex = 3;
this.txtDownCameraExposureTime.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtDownCameraExposureTime_KeyUp);
//
// label3
//
this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(482, 20);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(71, 12);
this.label3.TabIndex = 2;
this.label3.Text = "下相机增益:";
//
// txtDownCameraGain
//
this.txtDownCameraGain.Location = new System.Drawing.Point(556, 16);
this.txtDownCameraGain.Name = "txtDownCameraGain";
this.txtDownCameraGain.Size = new System.Drawing.Size(65, 21);
this.txtDownCameraGain.TabIndex = 3;
this.txtDownCameraGain.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtDownCameraGain_KeyUp);
//
// LookCamera
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(633, 781);
this.ClientSize = new System.Drawing.Size(633, 844);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.HeadText = "相机";
@ -157,6 +256,8 @@
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.ResumeLayout(false);
}
@ -167,9 +268,18 @@
private System.Windows.Forms.Button btnDownCameraGrab;
private System.Windows.Forms.Button btnUpCameraGrab;
private System.Windows.Forms.Panel panel2;
private ChoiceTech.Halcon.Control.HWindow_Final himgNozzle8;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.CheckBox checkBox1;
private ChoiceTech.Halcon.Control.HWindow_Final himgNozzle8;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.TextBox txtDownCameraGain;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtUpCameraGain;
private System.Windows.Forms.TextBox txtDownCameraExposureTime;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtUpCameraExposureTime;
private System.Windows.Forms.Label label4;
}
}
Loading…
Cancel
Save