From fccc60d8897642ef5c39176b8c872b63fe819ae2 Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期五, 20 十一月 2020 10:44:57 +0800 Subject: [PATCH] gocator添加int4类型数据,暂时注释 --- src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs index 142fc16..6da479f 100644 --- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs +++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardRunBase.cs @@ -8,10 +8,12 @@ using System.Threading.Tasks; using System.Windows.Forms; using Bro.Common.Interface; +using Bro.Common.Base; +using Bro.Common.Model; namespace Bro.UI.Device.Winform { - public partial class CtrlMotionCardRunBase : UserControl + public partial class CtrlMotionCardRunBase : UserControl, IRunCtrl { public CtrlMotionCardRunBase() { @@ -21,20 +23,43 @@ public CtrlMotionCardRunBase(IDevice device) { InitializeComponent(); + Device = device; - //CvImage = new Canvas(); - //CvImage.IsShowElementList = false; - //CvImage.IsShowROITool = false; - //CvImage.Dock = DockStyle.Fill; - //Controls.Add(CvImage); - - //Device = device; - - //Camera.OnImageUpdated += Camera_UpdateShowImage; - //Camera.OnElementsUpdated += Camera_OnElementsUpdated; - //Camera.OnCameraOpModeChanged += Camera_OnCameraOpModeChanged; - - //InitialToolBarVisible(); + InitialLayout(); } + + public IDevice Device { get; set; } + + protected MotionCardBase MotionCard + { + get => Device as MotionCardBase; + } + + //private void MotionCard_OnMonitorInvoke(DateTime arg1, string arg2, IDevice arg3, IMonitorSet arg4) + //{ + // throw new NotImplementedException(); + //} + + private void InitialLayout() + { + foreach (var axisConfig in MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled)) + { + CtrlMotionCardAxisStatus ctrlMotionCardAxisStatus = new CtrlMotionCardAxisStatus(Device, axisConfig.AxisIndex, axisConfig.AxisName); + flowLayoutPanel1.Controls.Add(ctrlMotionCardAxisStatus); + } + + CtrlMotionCardIOStatus ctrlMotionCardIOStatus = new CtrlMotionCardIOStatus(Device); + //ctrlMotionCardIOStatus.Dock = DockStyle.Fill; //flowLayoutPanel鍐呴儴鎺т欢 涓嶈dock fill + flowLayoutPanel2.Controls.Add(ctrlMotionCardIOStatus); + } + + + + private void buttonMotionCardOperation_Click(object sender, EventArgs e) + { + FrmMotionCardOperationBase motionCardOperationBase = new FrmMotionCardOperationBase(Device); + motionCardOperationBase.Show(); + } + } } -- Gitblit v1.8.0