src/Bro.Common.Model/Interface/IProcessConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/Bro.M071.Process/M071Config.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/Bro.M071.Process/M071Process.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/Bro.M071.Process/UI/M071_MainForm.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/Bro.M071.Process/UI/M071_ShortcutFrm.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/Bro.Process/ProcessConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/Bro.UI.Model.Winform/UI/DockContent/MenuFrmBase.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/Bro.Common.Model/Interface/IProcessConfig.cs
@@ -1,8 +1,9 @@ using System.Collections.Generic; using System.ComponentModel; namespace Bro.Common.Interface { public interface IProcessConfig : IMonitorSetCollection public interface IProcessConfig : IMonitorSetCollection, INotifyPropertyChanged { #region Property /// <summary> src/Bro.M071.Process/M071Config.cs
@@ -51,27 +51,28 @@ [Description("拍摄点位设置集合")] [TypeConverter(typeof(CollectionCountConvert))] [Editor(typeof(ComplexCollectionEditor<SnapshotPoint>), typeof(UITypeEditor))] [DisplayName("拍摄点位")] [DisplayName("1.运动点位")] public List<SnapshotPoint> SnapshotPointCollection { get; set; } = new List<SnapshotPoint>(); [Category("检测设置")] [Description("视觉检测单键配置集合")] [TypeConverter(typeof(CollectionCountConvert))] [Editor(typeof(ComplexCollectionEditor<KeyUnit>), typeof(UITypeEditor))] [DisplayName("单键配置")] [DisplayName("2.单键配置")] public List<KeyUnit> KeyUnitCollection { get; set; } = new List<KeyUnit>(); [Category("检测设置")] [Description("检测配置集合")] [DisplayName("3.检测项集合")] [TypeConverter(typeof(CollectionCountConvert))] [Editor(typeof(ComplexCollectionEditor<MeasurementUnit>), typeof(UITypeEditor))] public List<MeasurementUnit> MeasurementUnitCollection { get; set; } = new List<MeasurementUnit>(); [Category("检测设置")] [DisplayName("结果数据保存路径")] [Description("检测结果数据保存路径")] [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))] public string ResultDataSaveFolder { get; set; } = ""; //[Category("检测设置")] //[DisplayName("结果数据保存路径")] //[Description("检测结果数据保存路径")] //[Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))] //public string ResultDataSaveFolder { get; set; } = ""; [Category("图片保存配置")] [Description("单键图片保存配置")] @@ -94,13 +95,23 @@ [ReadOnly(true)] public bool IsSafetyBeamBlocked { get; set; } = false; private bool isBeepBlocked = false; [Category("屏蔽配置")] [Description("true:屏蔽蜂鸣器 false:启用蜂鸣器")] public bool IsBeepBlocked { get; set; } = false; public bool IsBeepBlocked { get => isBeepBlocked; set => Set(ref isBeepBlocked, value); } private bool isBarcodeManualInputBlocked = true; [Category("屏蔽配置")] [Description("true:禁止手动输入条码 false:允许手动输入条码")] public bool IsBarcodeManulInputBlocked { get; set; } = true; public bool IsBarcodeManualInputBlocked { get => isBarcodeManualInputBlocked; set => Set(ref isBarcodeManualInputBlocked, value); } [Category("MES设置")] [Description("true:数据上传至MES false:数据不上传")] src/Bro.M071.Process/M071Process.cs
@@ -527,7 +527,7 @@ excelExportDto.WorksheetDataTable[excelExportDto.Worksheets[1]] = ExcelExportHelper.ListToDataTable(measurementUnitResultAndKeyUnitDataSet.MeasurementUnitResultList, measurementUnitResultColumns); ; byte[] filecontent = ExcelExportHelper.ExportExcel(excelExportDto, false); string dir = Path.Combine(Config.ResultDataSaveFolder, DateTime.Now.ToString("yyyyMMdd")); string dir = Path.Combine(Config.LogPath, DateTime.Now.ToString("yyyyMMdd")); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); src/Bro.M071.Process/UI/M071_MainForm.cs
@@ -69,7 +69,8 @@ cvImage.Elements.Clear(); lvMeasures.Items.Clear(); txtBarcode.ReadOnly = Config.IsBarcodeManulInputBlocked; txtBarcode.Enabled = !Config.IsBarcodeManualInputBlocked; Config.MeasurementUnitCollection.ForEach(u => { @@ -100,6 +101,14 @@ Process_M071.OnFullResetDone -= Process_M071_FullResetDone; Process_M071.OnFullResetDone += Process_M071_FullResetDone; Config.PropertyChanged -= Config_PropertyChanged; Config.PropertyChanged += Config_PropertyChanged; } private void Config_PropertyChanged(object sender, PropertyChangedEventArgs e) { txtBarcode.Enabled = !Config.IsBarcodeManualInputBlocked; } #region 图片区右键菜单 src/Bro.M071.Process/UI/M071_ShortcutFrm.cs
@@ -53,20 +53,42 @@ { base.OnProcessUpdated(); Task.Run(() => //Task.Run(() => //{ // if (loadHandle.Wait(1000)) // { // this.Invoke(new Action(() => // { // chkBlockBeep.Checked = Config.IsBeepBlocked; // chkBlockSafetyBeam.Checked = Config.IsSafetyBeamBlocked; // chkBlockSaftyDoor.Checked = Config.IsSafetyDoorBlocked; // chkManualInputForbidden.Checked = Config.IsBarcodeManualInputBlocked; // chkEnableMESUpload.Checked = Config.IsEnableMESUpload; // })); // } //}); this.Invoke(new Action(() => { if (loadHandle.Wait(1000)) { this.Invoke(new Action(() => { chkBlockBeep.Checked = Config.IsBeepBlocked; chkBlockSafetyBeam.Checked = Config.IsSafetyBeamBlocked; chkBlockSaftyDoor.Checked = Config.IsSafetyDoorBlocked; chkManualInputForbidden.Checked = Config.IsBarcodeManulInputBlocked; chkEnableMESUpload.Checked = Config.IsEnableMESUpload; })); } }); chkBlockBeep.Checked = Config.IsBeepBlocked; chkBlockSafetyBeam.Checked = Config.IsSafetyBeamBlocked; chkBlockSaftyDoor.Checked = Config.IsSafetyDoorBlocked; chkManualInputForbidden.Checked = Config.IsBarcodeManualInputBlocked; chkEnableMESUpload.Checked = Config.IsEnableMESUpload; })); Config.PropertyChanged -= Config_PropertyChanged; Config.PropertyChanged += Config_PropertyChanged; } private async void Config_PropertyChanged(object sender, PropertyChangedEventArgs e) { chkBlockBeep.Checked = Config.IsBeepBlocked; chkBlockSafetyBeam.Checked = Config.IsSafetyBeamBlocked; chkBlockSaftyDoor.Checked = Config.IsSafetyDoorBlocked; chkManualInputForbidden.Checked = Config.IsBarcodeManualInputBlocked; chkEnableMESUpload.Checked = Config.IsEnableMESUpload; await Task.Delay(100); } private void chkBlockSaftyDoor_CheckedChanged(object sender, EventArgs e) @@ -86,7 +108,7 @@ private void chkManualInputForbidden_CheckedChanged(object sender, EventArgs e) { Config.IsBarcodeManulInputBlocked = chkManualInputForbidden.Checked; Config.IsBarcodeManualInputBlocked = chkManualInputForbidden.Checked; } bool isLightOn = false; src/Bro.Process/ProcessConfig.cs
@@ -7,6 +7,7 @@ using System.ComponentModel; using System.Drawing.Design; using System.Linq; using System.Runtime.CompilerServices; namespace Bro.Process { @@ -68,7 +69,7 @@ [TypeConverter(typeof(CollectionCountConvert))] [Editor(typeof(ComplexCollectionEditor<MonitorSetBase>), typeof(UITypeEditor))] public List<IMonitorSet> MonitorSetCollection { get; set; } = new List<IMonitorSet>(); public virtual List<IInitialConfig> GetAllDeviceInitialConfigs() { List<IInitialConfig> configs = new List<IInitialConfig>(); @@ -107,5 +108,19 @@ return list; } #region IPropertyChanged public event PropertyChangedEventHandler PropertyChanged; public virtual void Set<T>(ref T field, T newValue, [CallerMemberName] string propName = null) { if (!field.Equals(newValue)) { field = newValue; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); } } #endregion } } src/Bro.UI.Model.Winform/UI/DockContent/MenuFrmBase.cs
@@ -27,7 +27,7 @@ _constructionDoneHandle.Wait(); OnProcessUpdated(); _constructionDoneHandle.Reset(); //_constructionDoneHandle.Reset(); } } }