From 4e75b0d4dacfbe63abbdaf91f6b479fb0a677408 Mon Sep 17 00:00:00 2001 From: liyaobang <884131781@qq.com> Date: Mon, 28 Apr 2025 15:38:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E7=9B=B8=E6=9C=BA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=95=B0=E5=AD=97=E6=A1=86=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=96=87=E6=9C=AC=E6=A1=86=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E6=BB=9A=E5=8A=A8=E4=B8=AD=E9=94=AE=E6=95=B0?= =?UTF-8?q?=E5=80=BC=E5=8F=98=E5=8A=A8=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DHSoftware/Views/CameraControl.Designer.cs | 24 +++++++++++----------- DHSoftware/Views/CameraControl.cs | 20 ++++++++---------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/DHSoftware/Views/CameraControl.Designer.cs b/DHSoftware/Views/CameraControl.Designer.cs index 4fecb57..d9253f3 100644 --- a/DHSoftware/Views/CameraControl.Designer.cs +++ b/DHSoftware/Views/CameraControl.Designer.cs @@ -40,18 +40,18 @@ label1 = new AntdUI.Label(); label2 = new AntdUI.Label(); label3 = new AntdUI.Label(); - iptExposure = new AntdUI.InputNumber(); - iptGain = new AntdUI.InputNumber(); + iptExposure = new AntdUI.Input(); + iptGain = new AntdUI.Input(); iptRevolve = new AntdUI.Select(); label4 = new AntdUI.Label(); sltAcquisitionMode = new AntdUI.Select(); label5 = new AntdUI.Label(); sltTriggerMode = new AntdUI.Select(); label7 = new AntdUI.Label(); - iptROIX = new AntdUI.InputNumber(); - iptROIY = new AntdUI.InputNumber(); - iptROIW = new AntdUI.InputNumber(); - iptROIH = new AntdUI.InputNumber(); + iptROIX = new AntdUI.Input(); + iptROIY = new AntdUI.Input(); + iptROIW = new AntdUI.Input(); + iptROIH = new AntdUI.Input(); label6 = new AntdUI.Label(); sthPic = new AntdUI.Switch(); label8 = new AntdUI.Label(); @@ -477,18 +477,18 @@ private AntdUI.Label label1; private AntdUI.Label label2; private AntdUI.Label label3; - private AntdUI.InputNumber iptExposure; - private AntdUI.InputNumber iptGain; + private AntdUI.Input iptExposure; + private AntdUI.Input iptGain; private AntdUI.Select iptRevolve; private AntdUI.Label label4; private AntdUI.Select sltAcquisitionMode; private AntdUI.Label label5; private AntdUI.Select sltTriggerMode; private AntdUI.Label label7; - private AntdUI.InputNumber iptROIX; - private AntdUI.InputNumber iptROIY; - private AntdUI.InputNumber iptROIW; - private AntdUI.InputNumber iptROIH; + private AntdUI.Input iptROIX; + private AntdUI.Input iptROIY; + private AntdUI.Input iptROIW; + private AntdUI.Input iptROIH; private AntdUI.Label label6; private AntdUI.Switch sthPic; private AntdUI.Label label8; diff --git a/DHSoftware/Views/CameraControl.cs b/DHSoftware/Views/CameraControl.cs index d348e97..5e06e0a 100644 --- a/DHSoftware/Views/CameraControl.cs +++ b/DHSoftware/Views/CameraControl.cs @@ -87,22 +87,20 @@ namespace DHSoftware.Views switch1.DataBindings.Add(nameof(switch1.Checked), CameraBase, nameof(CameraBase.IsZoomCamera), true, DataSourceUpdateMode.OnPropertyChanged); // 曝光时间绑定(假设iptExposure是NumericUpDown) - iptExposure.DataBindings.Add(nameof(iptExposure.Value), CameraBase, nameof(CameraBase.Exposure), - true, DataSourceUpdateMode.OnPropertyChanged, 0M, "N2"); - + + iptExposure.DataBindings.Add(nameof(iptExposure.Text), CameraBase, nameof(CameraBase.Exposure)); // 增益绑定 - iptGain.DataBindings.Add(nameof(iptGain.Value), CameraBase, nameof(CameraBase.Gain), - true, DataSourceUpdateMode.OnPropertyChanged, 0M, "N2"); + iptGain.DataBindings.Add(nameof(iptGain.Text), CameraBase, nameof(CameraBase.Gain)); // 旋转角度绑定 - iptRevolve.DataBindings.Add(nameof(iptRevolve.Text), CameraBase, nameof(CameraBase.RotateImage), - true, DataSourceUpdateMode.OnPropertyChanged, 0M, "N2"); + iptRevolve.DataBindings.Add(nameof(iptRevolve.Text), CameraBase, nameof(CameraBase.RotateImage)); + // ROI坐标绑定 - iptROIX.DataBindings.Add(nameof(iptROIX.Value), CameraBase, nameof(CameraBase.ROIX)); - iptROIY.DataBindings.Add(nameof(iptROIY.Value), CameraBase, nameof(CameraBase.ROIY)); - iptROIW.DataBindings.Add(nameof(iptROIW.Value), CameraBase, nameof(CameraBase.ROIW)); - iptROIH.DataBindings.Add(nameof(iptROIH.Value), CameraBase, nameof(CameraBase.ROIH)); + iptROIX.DataBindings.Add(nameof(iptROIX.Text), CameraBase, nameof(CameraBase.ROIX)); + iptROIY.DataBindings.Add(nameof(iptROIY.Text), CameraBase, nameof(CameraBase.ROIY)); + iptROIW.DataBindings.Add(nameof(iptROIW.Text), CameraBase, nameof(CameraBase.ROIW)); + iptROIH.DataBindings.Add(nameof(iptROIH.Text), CameraBase, nameof(CameraBase.ROIH)); // 采集模式下拉框处理 sltAcquisitionMode.SelectedIndexChanged += (s, e) =>