| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using LB_SmartVision.SQL; |
| | | using LB_SmartVisionCommon; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Globalization; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using CsvHelper; |
| | | namespace LB_SmartVision.CSV |
| | | { |
| | | internal class CsvDataHelperRecordProductData |
| | | { |
| | | /// <summary> |
| | | /// å°RecordProductDatasåå
¸ä¿åå°CSVæä»¶ |
| | | /// </summary> |
| | | /// <param name="filePath">CSVæä»¶è·¯å¾</param> |
| | | /// <param name="recordProductDatas">è¦ä¿åçæ°æ®åå
¸</param> |
| | | public static void SaveToCsv(string filePath, List<RecordProductData> recordProductDatas) |
| | | { |
| | | try |
| | | { |
| | | using (var writer = new StreamWriter(filePath)) |
| | | using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture)) |
| | | { |
| | | csv.Context.RegisterClassMap<CsvRecordProductDataMap>(); |
| | | // å°åå
¸è½¬æ¢ä¸ºCsvRecordå表 |
| | | var records = recordProductDatas.Select(kvp => new CsvRecordProductData |
| | | { |
| | | //DictionaryKey = kvp.Key, |
| | | ProductName = kvp.ProductName, |
| | | ProductSN = kvp.ProductSN, |
| | | InspectionOperator = kvp.InspectionOperator, |
| | | NGType = kvp.NGType, |
| | | NGSize = kvp.NGSize, |
| | | DetectionTime = kvp.DetectionTime, |
| | | CameraInspection = kvp.CameraInspection, |
| | | |
| | | }).ToList(); |
| | | for (int i = 0; i < records.Count; i++) |
| | | { |
| | | AsyncLogHelper.Warn("ç©æå·æäº§ååç§°ï¼" + records[i].ProductName + "\r\n" + |
| | | "ï¼äº§åSNå·ï¼" + records[i].ProductSN + "\r\n" + |
| | | "ï¼æ£æµä½ä¸åï¼" + records[i].InspectionOperator + "\r\n" + |
| | | "ï¼NGç±»åï¼" + records[i].NGType + " mm" + "\r\n" + |
| | | "ï¼NG大å°ï¼" + records[i].NGSize + " mm" + "\r\n" + |
| | | "ï¼æ£æµæ¶é´ï¼" + records[i].DetectionTime + "\r\n" + |
| | | "ï¼æ£æµç¸æºï¼" + records[i].CameraInspection + " mm" + "\r\n" ); |
| | | |
| | | } |
| | | csv.WriteRecords(records); |
| | | } |
| | | LogHelper.Info($"æ°æ®æåä¿åå°: {filePath}"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Error($"ä¿åCSVæä»¶æ¶åºé: {ex.Message}"); |
| | | //throw; |
| | | } |
| | | //Task.Factory.StartNew(() => |
| | | //{ |
| | | //}); |
| | | } |
| | | /// <summary> |
| | | /// ä»CSVæä»¶è¯»åæ°æ®å°RecordProductDatasåå
¸ |
| | | /// </summary> |
| | | /// <param name="filePath">CSVæä»¶è·¯å¾</param> |
| | | /// <returns>读åçæ°æ®åå
¸</returns> |
| | | public static List<RecordProductData> LoadFromCsv(string filePath) |
| | | { |
| | | var recordProductDatas = new List<RecordProductData>(); |
| | | try |
| | | { |
| | | if (!File.Exists(filePath)) |
| | | { |
| | | LogHelper.Info($"æä»¶ä¸åå¨: {filePath}"); |
| | | return recordProductDatas; |
| | | } |
| | | using (var reader = new StreamReader(filePath)) |
| | | using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture)) |
| | | { |
| | | csv.Context.RegisterClassMap<CsvRecordProductDataMap>(); |
| | | var records = csv.GetRecords<CsvRecordProductData>(); |
| | | foreach (var record in records) |
| | | { |
| | | var productData = new RecordProductData |
| | | { |
| | | ProductName = record.ProductName, |
| | | ProductSN = record.ProductSN, |
| | | InspectionOperator = record.InspectionOperator, |
| | | NGType = record.NGType, |
| | | NGSize = record.NGSize, |
| | | DetectionTime = record.DetectionTime, |
| | | CameraInspection = record.CameraInspection, |
| | | }; |
| | | recordProductDatas.Add(productData); |
| | | } |
| | | } |
| | | LogHelper.Info($"ä» {filePath} æå读å {recordProductDatas.Count} æ¡è®°å½"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Error($"读åCSVæä»¶æ¶åºé: {ex.Message}"); |
| | | //throw; |
| | | } |
| | | return recordProductDatas; |
| | | } |
| | | |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using CsvHelper.Configuration; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_SmartVision.CSV |
| | | { |
| | | internal class CsvRecordProductDataMap:ClassMap<CsvRecordProductData> |
| | | { |
| | | public CsvRecordProductDataMap() |
| | | { |
| | | //Map(m => m.DictionaryKey).Name("è®°å½æ¶é´"); |
| | | Map(m => m.ProductName).Name("ç©æå·æäº§ååç§°"); |
| | | Map(m => m.ProductSN).Name("产åSNå·"); |
| | | Map(m => m.InspectionOperator).Name("æ£æµä½ä¸å"); |
| | | Map(m => m.NGType).Name("NGç±»å"); |
| | | Map(m => m.NGSize).Name("NG大å°"); |
| | | Map(m => m.DetectionTime).Name("æ£æµæ¶é´"); |
| | | Map(m => m.CameraInspection).Name("æ£æµç¸æº"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | lblAddress.Name = "lblAddress"; |
| | | lblAddress.Size = new Size(38, 18); |
| | | lblAddress.TabIndex = 0; |
| | | lblAddress.Text = "å°å"; |
| | | lblAddress.Text = "åéå°å"; |
| | | // |
| | | // lblIP |
| | | // |
| | |
| | | { |
| | | InitializeComponent(); |
| | | cmbType.Items.Clear(); |
| | | |
| | | if (communicator != null && !string.IsNullOrEmpty(communicator.CommunicatorConnections["åå·"]?.ToString())) |
| | | { |
| | | cmbType.Items.Add(communicator.CommunicatorConnections["åå·"]?.ToString()); |
| | |
| | | { |
| | | InitializeComponent(); |
| | | if (communicator == null) |
| | | { |
| | | return; |
| | | |
| | | } |
| | | cmbIP.Enabled = false; |
| | | txtIP.Enabled = false; |
| | | txtPort.Enabled = false; |
| | |
| | | |
| | | |
| | | this.Text = name; |
| | | |
| | | if (communicator is UARTPort) |
| | | { |
| | | //ç»è®¡å¯ç¨ç«¯å£ |
| | | SerialPortStream temp = new SerialPortStream(); |
| | | string[] ArryPort = temp.GetPortNames(); |
| | | for (int i = 0; i < ArryPort.Length; i++) |
| | | { |
| | | cmbIP.Items.Add(ArryPort[i]); |
| | | |
| | | } |
| | | cmbIP.Text = communicator.CommunicatorConnections["å°å"]?.ToString(); |
| | | txtPort.Text = communicator.CommunicatorConnections["端å£"]?.ToString(); |
| | | txtIP.Visible = false; |
| | | cmbIP.Visible = true; |
| | | |
| | | this.btnRuleSend.Visible = true; |
| | | |
| | | |
| | | lblType.Visible = false; |
| | | lblAddress.Visible = false; |
| | | cmbType.Visible = false; |
| | |
| | | txtPort.Text = communicator.CommunicatorConnections["端å£"]?.ToString(); |
| | | txtIP.Visible = true; |
| | | cmbIP.Visible = false; |
| | | |
| | | this.btnRuleSend.Visible = false; |
| | | |
| | | |
| | | lblType.Visible = false; |
| | | lblAddress.Visible = false; |
| | | cmbType.Visible = false; |
| | |
| | | txtIP.Text = communicator.CommunicatorConnections["å°å"]?.ToString(); |
| | | txtPort.Text = communicator.CommunicatorConnections["端å£"]?.ToString(); |
| | | cmbType.Items.Clear(); |
| | | |
| | | if (!string.IsNullOrEmpty(communicator.CommunicatorConnections["åå·"]?.ToString())) |
| | | { |
| | | cmbType.Items.Add(communicator.CommunicatorConnections["åå·"]?.ToString()); |
| | |
| | | txtIP.Visible = true; |
| | | cmbIP.Visible = false; |
| | | this.btnRuleSend.Visible = false; |
| | | |
| | | lblType.Visible = true; |
| | | lblAddress.Visible = true; |
| | | cmbType.Visible = true; |
| | |
| | | communicatorChanged(communicator); |
| | | } |
| | | } |
| | | |
| | | private void cmbVarType_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | //if (communicator != null && !communicator.CommunicatorConnections.Contains("åéç±»å")) |
| | | //{ |
| | | // communicator.CommunicatorConnections.Add("åéç±»å", cmbVarType.Text); |
| | | //} |
| | | //else if (communicator != null) |
| | | //{ |
| | | // communicator.CommunicatorConnections["åéç±»å"] = cmbVarType.Text; |
| | | // communicatorChanged(communicator); |
| | | //} |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if (GlobalVar.dicCommunicators.ContainsKey(oldName)) |
| | | GlobalVar.dicCommunicators.TryRename(oldName, newName); |
| | | foreach (var item in GlobalVar.dicMotionControlData.Keys) |
| | | { |
| | | foreach (var item1 in GlobalVar.dicMotionControlData[item].Keys) |
| | | { |
| | | if (GlobalVar.dicMotionControlData[item][item1].CommunicatorsName.Contains(oldName)) |
| | | { |
| | | GlobalVar.dicMotionControlData[item][item1].CommunicatorsName = newName; |
| | | } |
| | | } |
| | | } |
| | | |
| | | flow.Refresh(); |
| | | } |
| | |
| | | // |
| | | tableLayoutPanel4.Anchor = AnchorStyles.Top | AnchorStyles.Right; |
| | | tableLayoutPanel4.ColumnCount = 2; |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); |
| | | tableLayoutPanel4.Controls.Add(btnHisDataFind, 0, 0); |
| | | tableLayoutPanel4.Controls.Add(btnHisDataExport, 1, 0); |
| | | tableLayoutPanel4.Location = new Point(657, 509); |
| | | tableLayoutPanel4.Name = "tableLayoutPanel4"; |
| | | tableLayoutPanel4.RowCount = 1; |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel4.Size = new Size(200, 39); |
| | | tableLayoutPanel4.TabIndex = 1; |
| | | // |
| | |
| | | btnHisDataFind.Text = "æ¥è¯¢"; |
| | | btnHisDataFind.TextColor = Color.White; |
| | | btnHisDataFind.WarningColor = Color.FromArgb(230, 162, 60); |
| | | btnHisDataFind.Click += btnHisDataFind_Click; |
| | | // |
| | | // btnHisDataExport |
| | | // |
| | |
| | | Name = "HistoricalDataEditPage"; |
| | | Size = new Size(866, 580); |
| | | grpHisData.ResumeLayout(false); |
| | | grpHisData.PerformLayout(); |
| | | tableLayoutPanel1.ResumeLayout(false); |
| | | tableLayoutPanel2.ResumeLayout(false); |
| | | tableLayoutPanel3.ResumeLayout(false); |
| | |
| | | using LB_SmartVisionCommon; |
| | | using LB_SmartVision.CSV; |
| | | using LB_SmartVision.SQL; |
| | | using LB_SmartVisionCommon; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Globalization; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | public partial class HistoricalDataEditPage : UserControl |
| | | { |
| | | public Action<string, LogInfoType> LogInfo; |
| | | // ä¿ååå§æ°æ®çå表 |
| | | private List<DataGridViewRow> originalRows = new List<DataGridViewRow>(); |
| | | |
| | | private int row2OriginalHeight; |
| | | private int row3OriginalHeight; |
| | | |
| | | List<RecordProductData> RecordProductDatas = new List<RecordProductData>(); |
| | | public HistoricalDataEditPage() |
| | | { |
| | | Name = "HistoricalDataEditPage"; |
| | |
| | | /// </summary> |
| | | private void InitializeDataGridView() |
| | | { |
| | | // 设置DataGridViewå宽 |
| | | dataGridViewHD.ColumnCount = 4; |
| | | |
| | | int totalWidth = dataGridViewHD.ClientSize.Width; |
| | | int columnCount = dataGridViewHD.ColumnCount; |
| | | int columnWidth = totalWidth / columnCount; |
| | | |
| | | // 设置æå°å®½åº¦ |
| | | int minWidth = 100; // æå°å®½åº¦ |
| | | if (columnWidth < minWidth) |
| | | { |
| | | columnWidth = minWidth; |
| | | } |
| | | |
| | | for (int i = 0; i < columnCount; i++) |
| | | { |
| | | dataGridViewHD.Columns[i].Width = columnWidth; |
| | | } |
| | | |
| | | // è®¾ç½®åæ é¢ |
| | | dataGridViewHD.Columns[0].Name = "SNå·"; |
| | | dataGridViewHD.Columns[1].Name = "æ¶é´"; |
| | | dataGridViewHD.Columns[2].Name = "NGç±»"; |
| | | dataGridViewHD.Columns[3].Name = "缺é·å¤§å°"; |
| | | this.dataGridViewHD.DataSource = RecordProductDatas; |
| | | |
| | | dataGridViewHD.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; |
| | | |
| | |
| | | { |
| | | dateTimePickerEnd.MinDate = dateTimePickerStart.Value; |
| | | } |
| | | |
| | | private void btnHisDataExport_Click(object sender, EventArgs e) |
| | | public string OpenFileForSave() |
| | | { |
| | | |
| | | } |
| | | |
| | | public void SaveToCSV(string filePath, int rowIndex) |
| | | { |
| | | // ä½¿ç¨ StreamWriter æ¥åå
¥æä»¶ |
| | | using (StreamWriter writer = new StreamWriter(filePath)) |
| | | using (SaveFileDialog saveFileDialog = new SaveFileDialog()) |
| | | { |
| | | DataGridViewRow row = dataGridViewHD.Rows[rowIndex]; |
| | | // 设置é»è®¤æä»¶ååæ©å±å |
| | | saveFileDialog.FileName = $"å岿°æ®_{DateTime.Now:yyyyMMdd_HHmmss}"; |
| | | saveFileDialog.DefaultExt = "xlsx"; |
| | | |
| | | int rowCount = 10;//10æ¹ä¸ºé鿬¡æ° |
| | | // 设置æä»¶è¿æ»¤å¨ |
| | | saveFileDialog.Filter = "Excelæä»¶ (*.xlsx)|*.xlsx|" + |
| | | "CSVæä»¶ (*.csv)|*.csv|" + |
| | | "ææ¬æä»¶ (*.txt)|*.txt|" + |
| | | "æææä»¶ (*.*)|*.*"; |
| | | |
| | | writer.WriteLine("SNå·, æ¶é´, NGç±», 缺é·å¤§å°"); |
| | | saveFileDialog.Title = "éæ©æä»¶ä¿åä½ç½®"; |
| | | saveFileDialog.RestoreDirectory = true; // è®°ä½ä¸æ¬¡æå¼çç®å½ |
| | | saveFileDialog.OverwritePrompt = true; // è¦çæ¶æç¤º |
| | | |
| | | // é忝ä¸è¡æ°æ® |
| | | for (int i = 0; i < rowCount; i++) |
| | | if (saveFileDialog.ShowDialog() == DialogResult.OK) |
| | | { |
| | | int batchSize = 4; |
| | | |
| | | // åå
¥è¿ä¸æ¹æ¬¡çæ¯ä¸åæ°æ® |
| | | for (int k = 0; k < batchSize; k++) |
| | | { |
| | | writer.Write($"{row.Cells[k].Value}"); |
| | | |
| | | // å¨å
ç´ ä¹é´æ·»å éå·ï¼é¤éè¿æ¯æåä¸ä¸ªå
ç´ |
| | | if (k < batchSize - 1) |
| | | { |
| | | writer.Write(","); |
| | | } |
| | | } |
| | | |
| | | // åå
¥å®ä¸è¡åï¼æ¢è¡ |
| | | writer.WriteLine(); |
| | | |
| | | string filePathHD = saveFileDialog.FileName; |
| | | return filePathHD; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | private void btnHisDataExport_Click(object sender, EventArgs e) |
| | | { |
| | | CsvDataHelperRecordProductData.SaveToCsv(OpenFileForSave(), RecordProductDatas); |
| | | } |
| | | |
| | | private void btnHisDataFind_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | DateTime startDate = dateTimePickerStart.Value.Date; |
| | | DateTime endDate = dateTimePickerEnd.Value.Date; |
| | | |
| | | switch(comboBoxSearchBasis.SelectedIndex) |
| | | { |
| | | //便®æ¥ææ¥è¯¢ |
| | | case 0: |
| | | RecordProductDatas = RecordProductDataRepository.GetRecordsByTimeRange(DateTime.Parse(this.dateTimePickerStart.Value.ToString()), DateTime.Parse(this.dateTimePickerEnd.Value.ToString())); |
| | | break; |
| | | //便®SNå·æ¥è¯¢ |
| | | case 1: |
| | | if(string.IsNullOrEmpty(textBoxSN.Text)) |
| | | { |
| | | MessageBox.Show("请填åSNå·ï¼", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | } |
| | | else |
| | | { |
| | | RecordProductDatas = RecordProductDataRepository.GetRecordsByProductNumber(textBoxSN.Text); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | this.dataGridViewHD.DataSource = RecordProductDatas; |
| | | this.dataGridViewHD.AutoGenerateColumns = true; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MotionControlForm)); |
| | | uiGroupBoxMotionControl = new GroupBox(); |
| | | panel1 = new Panel(); |
| | | tableLayoutPanel3 = new TableLayoutPanel(); |
| | | tableLayoutPanel6 = new TableLayoutPanel(); |
| | | uiButtonCloseSoftGrab = new Button(); |
| | |
| | | textBoxAngSpeed = new TextBox(); |
| | | labelAngSpeed = new Label(); |
| | | textBoxPointSpeed = new TextBox(); |
| | | groupBoxPulseMotionSpeedAddress = new GroupBox(); |
| | | textBoxPulseMotionSpeedAddress = new TextBox(); |
| | | groupBoxAngularVelocityAddress = new GroupBox(); |
| | | textBoxAngularVelocityAddress = new TextBox(); |
| | | groupBoxCom = new GroupBox(); |
| | | cmbCom = new Sunny.UI.UIComboBox(); |
| | | tableLayoutPanel2 = new TableLayoutPanel(); |
| | | uiButtonIncreasePitchAngle = new Button(); |
| | | groupBoxPitchAnglePosition = new GroupBox(); |
| | |
| | | uiButtonDecreaseX = new Button(); |
| | | groupBoxXPosition = new GroupBox(); |
| | | textBoxXPosition = new TextBox(); |
| | | groupBoxYVarAddress = new GroupBox(); |
| | | textBoxYVarAddress = new TextBox(); |
| | | groupBoxXVarAddress = new GroupBox(); |
| | | textBoxXVarAddress = new TextBox(); |
| | | groupBoxZVarAddress = new GroupBox(); |
| | | textBoxZVarAddress = new TextBox(); |
| | | groupBoxWVarAddress = new GroupBox(); |
| | | textBoxWVarAddress = new TextBox(); |
| | | groupBoxYDetectLocation = new GroupBox(); |
| | | textBoxYDetectLocation = new TextBox(); |
| | | groupBoxZDetectLocation = new GroupBox(); |
| | | textBoxZDetectLocation = new TextBox(); |
| | | groupBoxWDetectLocation = new GroupBox(); |
| | | textBoxWDetectLocation = new TextBox(); |
| | | groupBoxXDetectLocation = new GroupBox(); |
| | | textBoxXDetectLocation = new TextBox(); |
| | | groupBoxXOriginalLocation = new GroupBox(); |
| | | textBoxXOriginalLocation = new TextBox(); |
| | | groupBoxYOriginalLocation = new GroupBox(); |
| | | textBoxYOriginalLocation = new TextBox(); |
| | | groupBoxZOriginalLocation = new GroupBox(); |
| | | textBoxZOriginalLocation = new TextBox(); |
| | | groupBoxWOriginalLocation = new GroupBox(); |
| | | textBoxWOriginalLocation = new TextBox(); |
| | | tableLayoutPanel1 = new TableLayoutPanel(); |
| | | textBox1 = new TextBox(); |
| | | textBoxSN = new TextBox(); |
| | | uiMarkLabelSN = new Label(); |
| | | tableLayoutPanel7 = new TableLayoutPanel(); |
| | | textBox2 = new TextBox(); |
| | | textBoxName = new TextBox(); |
| | | uiMarkLabelName = new Label(); |
| | | uiGroupBoxImage = new GroupBox(); |
| | | uiSplitContainer1 = new SplitContainer(); |
| | | themeForm1 = new ReaLTaiizor.Forms.ThemeForm(); |
| | | controlBox1 = new ReaLTaiizor.Controls.ControlBox(); |
| | | uiGroupBoxMotionControl.SuspendLayout(); |
| | | panel1.SuspendLayout(); |
| | | tableLayoutPanel3.SuspendLayout(); |
| | | tableLayoutPanel6.SuspendLayout(); |
| | | tableLayoutPanel5.SuspendLayout(); |
| | | tableLayoutPanel4.SuspendLayout(); |
| | | groupBoxPulseMotionSpeedAddress.SuspendLayout(); |
| | | groupBoxAngularVelocityAddress.SuspendLayout(); |
| | | groupBoxCom.SuspendLayout(); |
| | | tableLayoutPanel2.SuspendLayout(); |
| | | groupBoxPitchAnglePosition.SuspendLayout(); |
| | | groupBoxZPosition.SuspendLayout(); |
| | | groupBoxYPosition.SuspendLayout(); |
| | | groupBoxXPosition.SuspendLayout(); |
| | | groupBoxYVarAddress.SuspendLayout(); |
| | | groupBoxXVarAddress.SuspendLayout(); |
| | | groupBoxZVarAddress.SuspendLayout(); |
| | | groupBoxWVarAddress.SuspendLayout(); |
| | | groupBoxYDetectLocation.SuspendLayout(); |
| | | groupBoxZDetectLocation.SuspendLayout(); |
| | | groupBoxWDetectLocation.SuspendLayout(); |
| | | groupBoxXDetectLocation.SuspendLayout(); |
| | | groupBoxXOriginalLocation.SuspendLayout(); |
| | | groupBoxYOriginalLocation.SuspendLayout(); |
| | | groupBoxZOriginalLocation.SuspendLayout(); |
| | | groupBoxWOriginalLocation.SuspendLayout(); |
| | | tableLayoutPanel1.SuspendLayout(); |
| | | tableLayoutPanel7.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)uiSplitContainer1).BeginInit(); |
| | |
| | | // |
| | | // uiGroupBoxMotionControl |
| | | // |
| | | uiGroupBoxMotionControl.Controls.Add(tableLayoutPanel3); |
| | | uiGroupBoxMotionControl.Controls.Add(panel1); |
| | | uiGroupBoxMotionControl.Dock = DockStyle.Fill; |
| | | uiGroupBoxMotionControl.Font = new Font("å®ä½", 12F); |
| | | uiGroupBoxMotionControl.ForeColor = SystemColors.Control; |
| | | uiGroupBoxMotionControl.Location = new Point(0, 0); |
| | | uiGroupBoxMotionControl.Margin = new Padding(4, 5, 4, 5); |
| | | uiGroupBoxMotionControl.MinimumSize = new Size(1, 1); |
| | | uiGroupBoxMotionControl.Name = "uiGroupBoxMotionControl"; |
| | | uiGroupBoxMotionControl.Padding = new Padding(0, 32, 0, 0); |
| | | uiGroupBoxMotionControl.Size = new Size(374, 624); |
| | | uiGroupBoxMotionControl.Padding = new Padding(0); |
| | | uiGroupBoxMotionControl.Size = new Size(580, 684); |
| | | uiGroupBoxMotionControl.TabIndex = 18; |
| | | uiGroupBoxMotionControl.TabStop = false; |
| | | uiGroupBoxMotionControl.Text = "è¿å¨æ§å¶åæ°"; |
| | | // |
| | | // panel1 |
| | | // |
| | | panel1.Controls.Add(tableLayoutPanel3); |
| | | panel1.Dock = DockStyle.Fill; |
| | | panel1.Location = new Point(0, 23); |
| | | panel1.Name = "panel1"; |
| | | panel1.Padding = new Padding(0, 3, 0, 0); |
| | | panel1.Size = new Size(580, 661); |
| | | panel1.TabIndex = 1; |
| | | // |
| | | // tableLayoutPanel3 |
| | | // |
| | |
| | | tableLayoutPanel3.Controls.Add(tableLayoutPanel2, 0, 4); |
| | | tableLayoutPanel3.Controls.Add(tableLayoutPanel1, 0, 0); |
| | | tableLayoutPanel3.Controls.Add(tableLayoutPanel7, 0, 1); |
| | | tableLayoutPanel3.Location = new Point(0, 55); |
| | | tableLayoutPanel3.Dock = DockStyle.Fill; |
| | | tableLayoutPanel3.Location = new Point(0, 3); |
| | | tableLayoutPanel3.Name = "tableLayoutPanel3"; |
| | | tableLayoutPanel3.RowCount = 6; |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel3.Size = new Size(374, 560); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 188F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel3.Size = new Size(580, 658); |
| | | tableLayoutPanel3.TabIndex = 0; |
| | | tableLayoutPanel3.Paint += tableLayoutPanel3_Paint; |
| | | // |
| | |
| | | tableLayoutPanel6.Name = "tableLayoutPanel6"; |
| | | tableLayoutPanel6.RowCount = 1; |
| | | tableLayoutPanel6.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel6.Size = new Size(368, 39); |
| | | tableLayoutPanel6.Size = new Size(574, 39); |
| | | tableLayoutPanel6.TabIndex = 6; |
| | | // |
| | | // uiButtonCloseSoftGrab |
| | | // |
| | | uiButtonCloseSoftGrab.Anchor = AnchorStyles.None; |
| | | uiButtonCloseSoftGrab.BackColor = Color.Black; |
| | | uiButtonCloseSoftGrab.Location = new Point(225, 5); |
| | | uiButtonCloseSoftGrab.Location = new Point(379, 5); |
| | | uiButtonCloseSoftGrab.Name = "uiButtonCloseSoftGrab"; |
| | | uiButtonCloseSoftGrab.Size = new Size(102, 29); |
| | | uiButtonCloseSoftGrab.TabIndex = 2; |
| | |
| | | // |
| | | uiButtonHardGrabWithPLC.Anchor = AnchorStyles.None; |
| | | uiButtonHardGrabWithPLC.BackColor = Color.Black; |
| | | uiButtonHardGrabWithPLC.Location = new Point(41, 5); |
| | | uiButtonHardGrabWithPLC.Location = new Point(92, 3); |
| | | uiButtonHardGrabWithPLC.Name = "uiButtonHardGrabWithPLC"; |
| | | uiButtonHardGrabWithPLC.Size = new Size(102, 29); |
| | | uiButtonHardGrabWithPLC.Size = new Size(102, 33); |
| | | uiButtonHardGrabWithPLC.TabIndex = 1; |
| | | uiButtonHardGrabWithPLC.Text = "模æéé"; |
| | | uiButtonHardGrabWithPLC.UseVisualStyleBackColor = false; |
| | |
| | | tableLayoutPanel5.Name = "tableLayoutPanel5"; |
| | | tableLayoutPanel5.RowCount = 1; |
| | | tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel5.Size = new Size(368, 39); |
| | | tableLayoutPanel5.Size = new Size(574, 39); |
| | | tableLayoutPanel5.TabIndex = 5; |
| | | // |
| | | // uiButtonGrabOnce |
| | |
| | | uiButtonGrabOnce.Dock = DockStyle.Fill; |
| | | uiButtonGrabOnce.Location = new Point(3, 3); |
| | | uiButtonGrabOnce.Name = "uiButtonGrabOnce"; |
| | | uiButtonGrabOnce.Size = new Size(362, 33); |
| | | uiButtonGrabOnce.Size = new Size(568, 33); |
| | | uiButtonGrabOnce.TabIndex = 0; |
| | | uiButtonGrabOnce.Text = "åå¼ éé"; |
| | | uiButtonGrabOnce.UseVisualStyleBackColor = false; |
| | |
| | | // |
| | | // tableLayoutPanel4 |
| | | // |
| | | tableLayoutPanel4.ColumnCount = 2; |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 42.81768F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 57.18232F)); |
| | | tableLayoutPanel4.ColumnCount = 4; |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 160F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 160F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F)); |
| | | tableLayoutPanel4.Controls.Add(labelPointSpeed, 0, 0); |
| | | tableLayoutPanel4.Controls.Add(textBoxAngleNow, 1, 3); |
| | | tableLayoutPanel4.Controls.Add(labelAngleNow, 0, 3); |
| | |
| | | tableLayoutPanel4.Controls.Add(textBoxAngSpeed, 1, 1); |
| | | tableLayoutPanel4.Controls.Add(labelAngSpeed, 0, 1); |
| | | tableLayoutPanel4.Controls.Add(textBoxPointSpeed, 1, 0); |
| | | tableLayoutPanel4.Controls.Add(groupBoxPulseMotionSpeedAddress, 2, 0); |
| | | tableLayoutPanel4.Controls.Add(groupBoxAngularVelocityAddress, 2, 1); |
| | | tableLayoutPanel4.Controls.Add(groupBoxCom, 0, 4); |
| | | tableLayoutPanel4.Dock = DockStyle.Fill; |
| | | tableLayoutPanel4.Location = new Point(3, 373); |
| | | tableLayoutPanel4.Location = new Point(3, 371); |
| | | tableLayoutPanel4.Name = "tableLayoutPanel4"; |
| | | tableLayoutPanel4.RowCount = 4; |
| | | tableLayoutPanel4.RowCount = 6; |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.Size = new Size(368, 184); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel4.Size = new Size(574, 284); |
| | | tableLayoutPanel4.TabIndex = 2; |
| | | // |
| | | // labelPointSpeed |
| | |
| | | labelPointSpeed.Location = new Point(3, 5); |
| | | labelPointSpeed.Margin = new Padding(3, 5, 3, 5); |
| | | labelPointSpeed.Name = "labelPointSpeed"; |
| | | labelPointSpeed.Size = new Size(151, 35); |
| | | labelPointSpeed.Size = new Size(154, 35); |
| | | labelPointSpeed.TabIndex = 18; |
| | | labelPointSpeed.Text = "ç¹å¨é度(mm/s)"; |
| | | labelPointSpeed.TextAlign = ContentAlignment.MiddleLeft; |
| | |
| | | // |
| | | textBoxAngleNow.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBoxAngleNow.Enabled = false; |
| | | textBoxAngleNow.Location = new Point(160, 144); |
| | | textBoxAngleNow.Location = new Point(163, 142); |
| | | textBoxAngleNow.Name = "textBoxAngleNow"; |
| | | textBoxAngleNow.Size = new Size(205, 30); |
| | | textBoxAngleNow.Size = new Size(154, 30); |
| | | textBoxAngleNow.TabIndex = 17; |
| | | textBoxAngleNow.Text = "0"; |
| | | textBoxAngleNow.TextChanged += textBoxAngleNow_TextChanged; |
| | |
| | | labelAngleNow.Location = new Point(3, 140); |
| | | labelAngleNow.Margin = new Padding(3, 5, 3, 5); |
| | | labelAngleNow.Name = "labelAngleNow"; |
| | | labelAngleNow.Size = new Size(151, 39); |
| | | labelAngleNow.Size = new Size(154, 35); |
| | | labelAngleNow.TabIndex = 16; |
| | | labelAngleNow.Text = "å½åè§åº¦(°)"; |
| | | labelAngleNow.TextAlign = ContentAlignment.MiddleLeft; |
| | |
| | | // |
| | | textBoxPositionNow.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBoxPositionNow.Enabled = false; |
| | | textBoxPositionNow.Location = new Point(160, 97); |
| | | textBoxPositionNow.Location = new Point(163, 97); |
| | | textBoxPositionNow.Name = "textBoxPositionNow"; |
| | | textBoxPositionNow.Size = new Size(205, 30); |
| | | textBoxPositionNow.Size = new Size(154, 30); |
| | | textBoxPositionNow.TabIndex = 15; |
| | | textBoxPositionNow.Text = "(0,0,0)"; |
| | | textBoxPositionNow.TextChanged += textBoxPositionNow_TextChanged; |
| | |
| | | labelPositionNow.Location = new Point(3, 95); |
| | | labelPositionNow.Margin = new Padding(3, 5, 3, 5); |
| | | labelPositionNow.Name = "labelPositionNow"; |
| | | labelPositionNow.Size = new Size(151, 35); |
| | | labelPositionNow.Size = new Size(154, 35); |
| | | labelPositionNow.TabIndex = 14; |
| | | labelPositionNow.Text = "å½åç¹ä½(mm)"; |
| | | labelPositionNow.TextAlign = ContentAlignment.MiddleLeft; |
| | |
| | | // textBoxAngSpeed |
| | | // |
| | | textBoxAngSpeed.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBoxAngSpeed.Location = new Point(160, 52); |
| | | textBoxAngSpeed.Location = new Point(163, 52); |
| | | textBoxAngSpeed.Name = "textBoxAngSpeed"; |
| | | textBoxAngSpeed.Size = new Size(205, 30); |
| | | textBoxAngSpeed.Size = new Size(154, 30); |
| | | textBoxAngSpeed.TabIndex = 13; |
| | | textBoxAngSpeed.Text = "0"; |
| | | textBoxAngSpeed.TextChanged += textBoxAngSpeed_TextChanged; |
| | |
| | | labelAngSpeed.Location = new Point(3, 50); |
| | | labelAngSpeed.Margin = new Padding(3, 5, 3, 5); |
| | | labelAngSpeed.Name = "labelAngSpeed"; |
| | | labelAngSpeed.Size = new Size(151, 35); |
| | | labelAngSpeed.Size = new Size(154, 35); |
| | | labelAngSpeed.TabIndex = 12; |
| | | labelAngSpeed.Text = "è§é度(rad/s)"; |
| | | labelAngSpeed.TextAlign = ContentAlignment.MiddleLeft; |
| | |
| | | // textBoxPointSpeed |
| | | // |
| | | textBoxPointSpeed.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBoxPointSpeed.Location = new Point(160, 7); |
| | | textBoxPointSpeed.Location = new Point(163, 7); |
| | | textBoxPointSpeed.Name = "textBoxPointSpeed"; |
| | | textBoxPointSpeed.Size = new Size(205, 30); |
| | | textBoxPointSpeed.Size = new Size(154, 30); |
| | | textBoxPointSpeed.TabIndex = 11; |
| | | textBoxPointSpeed.Text = "0"; |
| | | textBoxPointSpeed.TextChanged += textBoxPointSpeed_TextChanged; |
| | | textBoxPointSpeed.KeyDown += textBoxXPosition_KeyDown; |
| | | textBoxPointSpeed.KeyPress += textBoxXPosition_KeyPress; |
| | | // |
| | | // groupBoxPulseMotionSpeedAddress |
| | | // |
| | | groupBoxPulseMotionSpeedAddress.Controls.Add(textBoxPulseMotionSpeedAddress); |
| | | groupBoxPulseMotionSpeedAddress.Dock = DockStyle.Fill; |
| | | groupBoxPulseMotionSpeedAddress.Font = new Font("å®ä½", 8F); |
| | | groupBoxPulseMotionSpeedAddress.ForeColor = Color.White; |
| | | groupBoxPulseMotionSpeedAddress.Location = new Point(323, 3); |
| | | groupBoxPulseMotionSpeedAddress.Name = "groupBoxPulseMotionSpeedAddress"; |
| | | groupBoxPulseMotionSpeedAddress.Size = new Size(114, 39); |
| | | groupBoxPulseMotionSpeedAddress.TabIndex = 30; |
| | | groupBoxPulseMotionSpeedAddress.TabStop = false; |
| | | groupBoxPulseMotionSpeedAddress.Text = "ç¹é度å°å"; |
| | | // |
| | | // textBoxPulseMotionSpeedAddress |
| | | // |
| | | textBoxPulseMotionSpeedAddress.Dock = DockStyle.Bottom; |
| | | textBoxPulseMotionSpeedAddress.Font = new Font("å®ä½", 10F); |
| | | textBoxPulseMotionSpeedAddress.Location = new Point(3, 16); |
| | | textBoxPulseMotionSpeedAddress.Multiline = true; |
| | | textBoxPulseMotionSpeedAddress.Name = "textBoxPulseMotionSpeedAddress"; |
| | | textBoxPulseMotionSpeedAddress.Size = new Size(108, 20); |
| | | textBoxPulseMotionSpeedAddress.TabIndex = 12; |
| | | textBoxPulseMotionSpeedAddress.Text = "1"; |
| | | // |
| | | // groupBoxAngularVelocityAddress |
| | | // |
| | | groupBoxAngularVelocityAddress.Controls.Add(textBoxAngularVelocityAddress); |
| | | groupBoxAngularVelocityAddress.Dock = DockStyle.Fill; |
| | | groupBoxAngularVelocityAddress.Font = new Font("å®ä½", 8F); |
| | | groupBoxAngularVelocityAddress.ForeColor = Color.White; |
| | | groupBoxAngularVelocityAddress.Location = new Point(323, 48); |
| | | groupBoxAngularVelocityAddress.Name = "groupBoxAngularVelocityAddress"; |
| | | groupBoxAngularVelocityAddress.Size = new Size(114, 39); |
| | | groupBoxAngularVelocityAddress.TabIndex = 30; |
| | | groupBoxAngularVelocityAddress.TabStop = false; |
| | | groupBoxAngularVelocityAddress.Text = "è§é度å°å"; |
| | | // |
| | | // textBoxAngularVelocityAddress |
| | | // |
| | | textBoxAngularVelocityAddress.Dock = DockStyle.Bottom; |
| | | textBoxAngularVelocityAddress.Font = new Font("å®ä½", 10F); |
| | | textBoxAngularVelocityAddress.Location = new Point(3, 16); |
| | | textBoxAngularVelocityAddress.Multiline = true; |
| | | textBoxAngularVelocityAddress.Name = "textBoxAngularVelocityAddress"; |
| | | textBoxAngularVelocityAddress.Size = new Size(108, 20); |
| | | textBoxAngularVelocityAddress.TabIndex = 12; |
| | | textBoxAngularVelocityAddress.Text = "1"; |
| | | // |
| | | // groupBoxCom |
| | | // |
| | | groupBoxCom.Controls.Add(cmbCom); |
| | | groupBoxCom.Dock = DockStyle.Fill; |
| | | groupBoxCom.Font = new Font("å®ä½", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | groupBoxCom.ForeColor = Color.White; |
| | | groupBoxCom.Location = new Point(3, 183); |
| | | groupBoxCom.Name = "groupBoxCom"; |
| | | groupBoxCom.Size = new Size(154, 54); |
| | | groupBoxCom.TabIndex = 31; |
| | | groupBoxCom.TabStop = false; |
| | | groupBoxCom.Text = "é讯"; |
| | | // |
| | | // cmbCom |
| | | // |
| | | cmbCom.DataSource = null; |
| | | cmbCom.Dock = DockStyle.Fill; |
| | | cmbCom.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; |
| | | cmbCom.FillColor = Color.White; |
| | | cmbCom.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | cmbCom.ItemHoverColor = Color.FromArgb(155, 200, 255); |
| | | cmbCom.ItemSelectForeColor = Color.FromArgb(235, 243, 255); |
| | | cmbCom.Location = new Point(3, 21); |
| | | cmbCom.Margin = new Padding(4, 5, 4, 5); |
| | | cmbCom.MinimumSize = new Size(63, 0); |
| | | cmbCom.Name = "cmbCom"; |
| | | cmbCom.Padding = new Padding(0, 0, 30, 2); |
| | | cmbCom.Size = new Size(148, 30); |
| | | cmbCom.SymbolSize = 24; |
| | | cmbCom.TabIndex = 0; |
| | | cmbCom.TextAlignment = ContentAlignment.MiddleLeft; |
| | | cmbCom.Watermark = ""; |
| | | cmbCom.SelectedIndexChanged += cmbCom_SelectedIndexChanged; |
| | | // |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 3; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 60F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); |
| | | tableLayoutPanel2.ColumnCount = 6; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); |
| | | tableLayoutPanel2.Controls.Add(uiButtonIncreasePitchAngle, 2, 3); |
| | | tableLayoutPanel2.Controls.Add(groupBoxPitchAnglePosition, 1, 3); |
| | | tableLayoutPanel2.Controls.Add(uiButtonDecreasePitchAngle, 0, 3); |
| | |
| | | tableLayoutPanel2.Controls.Add(uiButtonIncreaseX, 2, 0); |
| | | tableLayoutPanel2.Controls.Add(uiButtonDecreaseX, 0, 0); |
| | | tableLayoutPanel2.Controls.Add(groupBoxXPosition, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(groupBoxYVarAddress, 3, 1); |
| | | tableLayoutPanel2.Controls.Add(groupBoxXVarAddress, 3, 0); |
| | | tableLayoutPanel2.Controls.Add(groupBoxZVarAddress, 3, 2); |
| | | tableLayoutPanel2.Controls.Add(groupBoxWVarAddress, 3, 3); |
| | | tableLayoutPanel2.Controls.Add(groupBoxYDetectLocation, 4, 1); |
| | | tableLayoutPanel2.Controls.Add(groupBoxZDetectLocation, 4, 2); |
| | | tableLayoutPanel2.Controls.Add(groupBoxWDetectLocation, 4, 3); |
| | | tableLayoutPanel2.Controls.Add(groupBoxXDetectLocation, 4, 0); |
| | | tableLayoutPanel2.Controls.Add(groupBoxXOriginalLocation, 5, 0); |
| | | tableLayoutPanel2.Controls.Add(groupBoxYOriginalLocation, 5, 1); |
| | | tableLayoutPanel2.Controls.Add(groupBoxZOriginalLocation, 5, 2); |
| | | tableLayoutPanel2.Controls.Add(groupBoxWOriginalLocation, 5, 3); |
| | | tableLayoutPanel2.Dock = DockStyle.Fill; |
| | | tableLayoutPanel2.Location = new Point(3, 183); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel2.Size = new Size(368, 184); |
| | | tableLayoutPanel2.Size = new Size(574, 182); |
| | | tableLayoutPanel2.TabIndex = 3; |
| | | // |
| | | // uiButtonIncreasePitchAngle |
| | | // |
| | | uiButtonIncreasePitchAngle.BackColor = Color.Black; |
| | | uiButtonIncreasePitchAngle.Dock = DockStyle.Left; |
| | | uiButtonIncreasePitchAngle.Location = new Point(298, 140); |
| | | uiButtonIncreasePitchAngle.Location = new Point(150, 140); |
| | | uiButtonIncreasePitchAngle.Margin = new Padding(5); |
| | | uiButtonIncreasePitchAngle.Name = "uiButtonIncreasePitchAngle"; |
| | | uiButtonIncreasePitchAngle.Size = new Size(32, 39); |
| | | uiButtonIncreasePitchAngle.Size = new Size(32, 37); |
| | | uiButtonIncreasePitchAngle.TabIndex = 27; |
| | | uiButtonIncreasePitchAngle.Text = "+"; |
| | | uiButtonIncreasePitchAngle.UseVisualStyleBackColor = false; |
| | |
| | | // groupBoxPitchAnglePosition |
| | | // |
| | | groupBoxPitchAnglePosition.Controls.Add(textBoxPitchAnglePosition); |
| | | groupBoxPitchAnglePosition.Dock = DockStyle.Fill; |
| | | groupBoxPitchAnglePosition.Font = new Font("å®ä½", 8F); |
| | | groupBoxPitchAnglePosition.ForeColor = Color.White; |
| | | groupBoxPitchAnglePosition.Location = new Point(123, 138); |
| | | groupBoxPitchAnglePosition.Margin = new Padding(50, 3, 3, 3); |
| | | groupBoxPitchAnglePosition.Location = new Point(48, 138); |
| | | groupBoxPitchAnglePosition.Name = "groupBoxPitchAnglePosition"; |
| | | groupBoxPitchAnglePosition.Size = new Size(115, 39); |
| | | groupBoxPitchAnglePosition.Size = new Size(94, 41); |
| | | groupBoxPitchAnglePosition.TabIndex = 26; |
| | | groupBoxPitchAnglePosition.TabStop = false; |
| | | groupBoxPitchAnglePosition.Text = "俯仰è§(°)"; |
| | |
| | | // |
| | | textBoxPitchAnglePosition.Dock = DockStyle.Bottom; |
| | | textBoxPitchAnglePosition.Font = new Font("å®ä½", 10F); |
| | | textBoxPitchAnglePosition.Location = new Point(3, 16); |
| | | textBoxPitchAnglePosition.Location = new Point(3, 18); |
| | | textBoxPitchAnglePosition.Multiline = true; |
| | | textBoxPitchAnglePosition.Name = "textBoxPitchAnglePosition"; |
| | | textBoxPitchAnglePosition.Size = new Size(109, 20); |
| | | textBoxPitchAnglePosition.Size = new Size(88, 20); |
| | | textBoxPitchAnglePosition.TabIndex = 13; |
| | | textBoxPitchAnglePosition.Text = "1"; |
| | | textBoxPitchAnglePosition.KeyDown += textBoxXPosition_KeyDown; |
| | |
| | | // |
| | | uiButtonDecreasePitchAngle.BackColor = Color.Black; |
| | | uiButtonDecreasePitchAngle.Dock = DockStyle.Right; |
| | | uiButtonDecreasePitchAngle.Location = new Point(37, 140); |
| | | uiButtonDecreasePitchAngle.Location = new Point(9, 140); |
| | | uiButtonDecreasePitchAngle.Margin = new Padding(5); |
| | | uiButtonDecreasePitchAngle.Name = "uiButtonDecreasePitchAngle"; |
| | | uiButtonDecreasePitchAngle.Size = new Size(31, 39); |
| | | uiButtonDecreasePitchAngle.Size = new Size(31, 37); |
| | | uiButtonDecreasePitchAngle.TabIndex = 25; |
| | | uiButtonDecreasePitchAngle.Text = "-"; |
| | | uiButtonDecreasePitchAngle.UseVisualStyleBackColor = false; |
| | |
| | | // groupBoxZPosition |
| | | // |
| | | groupBoxZPosition.Controls.Add(textBoxZPosition); |
| | | groupBoxZPosition.Dock = DockStyle.Fill; |
| | | groupBoxZPosition.Font = new Font("å®ä½", 8F); |
| | | groupBoxZPosition.ForeColor = Color.White; |
| | | groupBoxZPosition.Location = new Point(123, 93); |
| | | groupBoxZPosition.Margin = new Padding(50, 3, 3, 3); |
| | | groupBoxZPosition.Location = new Point(48, 93); |
| | | groupBoxZPosition.Name = "groupBoxZPosition"; |
| | | groupBoxZPosition.Size = new Size(115, 39); |
| | | groupBoxZPosition.Size = new Size(94, 39); |
| | | groupBoxZPosition.TabIndex = 24; |
| | | groupBoxZPosition.TabStop = false; |
| | | groupBoxZPosition.Text = "Z(mm)"; |
| | |
| | | textBoxZPosition.Location = new Point(3, 16); |
| | | textBoxZPosition.Multiline = true; |
| | | textBoxZPosition.Name = "textBoxZPosition"; |
| | | textBoxZPosition.Size = new Size(109, 20); |
| | | textBoxZPosition.Size = new Size(88, 20); |
| | | textBoxZPosition.TabIndex = 13; |
| | | textBoxZPosition.Text = "1"; |
| | | textBoxZPosition.KeyDown += textBoxXPosition_KeyDown; |
| | |
| | | // groupBoxYPosition |
| | | // |
| | | groupBoxYPosition.Controls.Add(textBoxYPosition); |
| | | groupBoxYPosition.Dock = DockStyle.Fill; |
| | | groupBoxYPosition.Font = new Font("å®ä½", 8F); |
| | | groupBoxYPosition.ForeColor = Color.White; |
| | | groupBoxYPosition.Location = new Point(123, 48); |
| | | groupBoxYPosition.Margin = new Padding(50, 3, 3, 3); |
| | | groupBoxYPosition.Location = new Point(48, 48); |
| | | groupBoxYPosition.Name = "groupBoxYPosition"; |
| | | groupBoxYPosition.Size = new Size(115, 39); |
| | | groupBoxYPosition.Size = new Size(94, 39); |
| | | groupBoxYPosition.TabIndex = 23; |
| | | groupBoxYPosition.TabStop = false; |
| | | groupBoxYPosition.Text = "Y(mm)"; |
| | |
| | | textBoxYPosition.Location = new Point(3, 16); |
| | | textBoxYPosition.Multiline = true; |
| | | textBoxYPosition.Name = "textBoxYPosition"; |
| | | textBoxYPosition.Size = new Size(109, 20); |
| | | textBoxYPosition.Size = new Size(88, 20); |
| | | textBoxYPosition.TabIndex = 13; |
| | | textBoxYPosition.Text = "1"; |
| | | textBoxYPosition.KeyDown += textBoxXPosition_KeyDown; |
| | |
| | | // |
| | | uiButtonIncreaseZ.BackColor = Color.Black; |
| | | uiButtonIncreaseZ.Dock = DockStyle.Left; |
| | | uiButtonIncreaseZ.Location = new Point(298, 95); |
| | | uiButtonIncreaseZ.Location = new Point(150, 95); |
| | | uiButtonIncreaseZ.Margin = new Padding(5); |
| | | uiButtonIncreaseZ.Name = "uiButtonIncreaseZ"; |
| | | uiButtonIncreaseZ.Size = new Size(32, 35); |
| | |
| | | // |
| | | uiButtonDecreaseZ.BackColor = Color.Black; |
| | | uiButtonDecreaseZ.Dock = DockStyle.Right; |
| | | uiButtonDecreaseZ.Location = new Point(37, 95); |
| | | uiButtonDecreaseZ.Location = new Point(9, 95); |
| | | uiButtonDecreaseZ.Margin = new Padding(5); |
| | | uiButtonDecreaseZ.Name = "uiButtonDecreaseZ"; |
| | | uiButtonDecreaseZ.Size = new Size(31, 35); |
| | |
| | | // |
| | | uiButtonIncreaseY.BackColor = Color.Black; |
| | | uiButtonIncreaseY.Dock = DockStyle.Left; |
| | | uiButtonIncreaseY.Location = new Point(298, 50); |
| | | uiButtonIncreaseY.Location = new Point(150, 50); |
| | | uiButtonIncreaseY.Margin = new Padding(5); |
| | | uiButtonIncreaseY.Name = "uiButtonIncreaseY"; |
| | | uiButtonIncreaseY.Size = new Size(32, 35); |
| | |
| | | // |
| | | uiButtonDecreaseY.BackColor = Color.Black; |
| | | uiButtonDecreaseY.Dock = DockStyle.Right; |
| | | uiButtonDecreaseY.Location = new Point(37, 50); |
| | | uiButtonDecreaseY.Location = new Point(9, 50); |
| | | uiButtonDecreaseY.Margin = new Padding(5); |
| | | uiButtonDecreaseY.Name = "uiButtonDecreaseY"; |
| | | uiButtonDecreaseY.Size = new Size(31, 35); |
| | |
| | | // |
| | | uiButtonIncreaseX.BackColor = Color.Black; |
| | | uiButtonIncreaseX.Dock = DockStyle.Left; |
| | | uiButtonIncreaseX.Location = new Point(298, 5); |
| | | uiButtonIncreaseX.Location = new Point(150, 5); |
| | | uiButtonIncreaseX.Margin = new Padding(5); |
| | | uiButtonIncreaseX.Name = "uiButtonIncreaseX"; |
| | | uiButtonIncreaseX.Size = new Size(32, 35); |
| | |
| | | // |
| | | uiButtonDecreaseX.BackColor = Color.Black; |
| | | uiButtonDecreaseX.Dock = DockStyle.Right; |
| | | uiButtonDecreaseX.Location = new Point(37, 5); |
| | | uiButtonDecreaseX.Location = new Point(9, 5); |
| | | uiButtonDecreaseX.Margin = new Padding(5); |
| | | uiButtonDecreaseX.Name = "uiButtonDecreaseX"; |
| | | uiButtonDecreaseX.Size = new Size(31, 35); |
| | |
| | | // groupBoxXPosition |
| | | // |
| | | groupBoxXPosition.Controls.Add(textBoxXPosition); |
| | | groupBoxXPosition.Dock = DockStyle.Fill; |
| | | groupBoxXPosition.Font = new Font("å®ä½", 8F); |
| | | groupBoxXPosition.ForeColor = Color.White; |
| | | groupBoxXPosition.Location = new Point(123, 3); |
| | | groupBoxXPosition.Margin = new Padding(50, 3, 3, 3); |
| | | groupBoxXPosition.Location = new Point(48, 3); |
| | | groupBoxXPosition.Name = "groupBoxXPosition"; |
| | | groupBoxXPosition.Size = new Size(115, 39); |
| | | groupBoxXPosition.Size = new Size(94, 39); |
| | | groupBoxXPosition.TabIndex = 21; |
| | | groupBoxXPosition.TabStop = false; |
| | | groupBoxXPosition.Text = "X(mm)"; |
| | |
| | | textBoxXPosition.Location = new Point(3, 16); |
| | | textBoxXPosition.Multiline = true; |
| | | textBoxXPosition.Name = "textBoxXPosition"; |
| | | textBoxXPosition.Size = new Size(109, 20); |
| | | textBoxXPosition.Size = new Size(88, 20); |
| | | textBoxXPosition.TabIndex = 12; |
| | | textBoxXPosition.Text = "1"; |
| | | textBoxXPosition.KeyDown += textBoxXPosition_KeyDown; |
| | | textBoxXPosition.KeyPress += textBoxXPosition_KeyPress; |
| | | // |
| | | // groupBoxYVarAddress |
| | | // |
| | | groupBoxYVarAddress.Controls.Add(textBoxYVarAddress); |
| | | groupBoxYVarAddress.Dock = DockStyle.Fill; |
| | | groupBoxYVarAddress.Font = new Font("å®ä½", 8F); |
| | | groupBoxYVarAddress.ForeColor = Color.White; |
| | | groupBoxYVarAddress.Location = new Point(193, 48); |
| | | groupBoxYVarAddress.Name = "groupBoxYVarAddress"; |
| | | groupBoxYVarAddress.Size = new Size(122, 39); |
| | | groupBoxYVarAddress.TabIndex = 29; |
| | | groupBoxYVarAddress.TabStop = false; |
| | | groupBoxYVarAddress.Text = "Yè½´åéå°å"; |
| | | // |
| | | // textBoxYVarAddress |
| | | // |
| | | textBoxYVarAddress.Dock = DockStyle.Bottom; |
| | | textBoxYVarAddress.Font = new Font("å®ä½", 10F); |
| | | textBoxYVarAddress.Location = new Point(3, 16); |
| | | textBoxYVarAddress.Multiline = true; |
| | | textBoxYVarAddress.Name = "textBoxYVarAddress"; |
| | | textBoxYVarAddress.Size = new Size(116, 20); |
| | | textBoxYVarAddress.TabIndex = 12; |
| | | textBoxYVarAddress.Text = "1"; |
| | | // |
| | | // groupBoxXVarAddress |
| | | // |
| | | groupBoxXVarAddress.Controls.Add(textBoxXVarAddress); |
| | | groupBoxXVarAddress.Dock = DockStyle.Fill; |
| | | groupBoxXVarAddress.Font = new Font("å®ä½", 8F); |
| | | groupBoxXVarAddress.ForeColor = Color.White; |
| | | groupBoxXVarAddress.Location = new Point(193, 3); |
| | | groupBoxXVarAddress.Name = "groupBoxXVarAddress"; |
| | | groupBoxXVarAddress.Size = new Size(122, 39); |
| | | groupBoxXVarAddress.TabIndex = 28; |
| | | groupBoxXVarAddress.TabStop = false; |
| | | groupBoxXVarAddress.Text = "Xè½´åéå°å"; |
| | | // |
| | | // textBoxXVarAddress |
| | | // |
| | | textBoxXVarAddress.Dock = DockStyle.Bottom; |
| | | textBoxXVarAddress.Font = new Font("å®ä½", 10F); |
| | | textBoxXVarAddress.Location = new Point(3, 16); |
| | | textBoxXVarAddress.Multiline = true; |
| | | textBoxXVarAddress.Name = "textBoxXVarAddress"; |
| | | textBoxXVarAddress.Size = new Size(116, 20); |
| | | textBoxXVarAddress.TabIndex = 12; |
| | | textBoxXVarAddress.Text = "1"; |
| | | // |
| | | // groupBoxZVarAddress |
| | | // |
| | | groupBoxZVarAddress.Controls.Add(textBoxZVarAddress); |
| | | groupBoxZVarAddress.Dock = DockStyle.Fill; |
| | | groupBoxZVarAddress.Font = new Font("å®ä½", 8F); |
| | | groupBoxZVarAddress.ForeColor = Color.White; |
| | | groupBoxZVarAddress.Location = new Point(193, 93); |
| | | groupBoxZVarAddress.Name = "groupBoxZVarAddress"; |
| | | groupBoxZVarAddress.Size = new Size(122, 39); |
| | | groupBoxZVarAddress.TabIndex = 29; |
| | | groupBoxZVarAddress.TabStop = false; |
| | | groupBoxZVarAddress.Text = "Zè½´åéå°å"; |
| | | // |
| | | // textBoxZVarAddress |
| | | // |
| | | textBoxZVarAddress.Dock = DockStyle.Bottom; |
| | | textBoxZVarAddress.Font = new Font("å®ä½", 10F); |
| | | textBoxZVarAddress.Location = new Point(3, 16); |
| | | textBoxZVarAddress.Multiline = true; |
| | | textBoxZVarAddress.Name = "textBoxZVarAddress"; |
| | | textBoxZVarAddress.Size = new Size(116, 20); |
| | | textBoxZVarAddress.TabIndex = 12; |
| | | textBoxZVarAddress.Text = "1"; |
| | | // |
| | | // groupBoxWVarAddress |
| | | // |
| | | groupBoxWVarAddress.Controls.Add(textBoxWVarAddress); |
| | | groupBoxWVarAddress.Dock = DockStyle.Fill; |
| | | groupBoxWVarAddress.Font = new Font("å®ä½", 8F); |
| | | groupBoxWVarAddress.ForeColor = Color.White; |
| | | groupBoxWVarAddress.Location = new Point(193, 138); |
| | | groupBoxWVarAddress.Name = "groupBoxWVarAddress"; |
| | | groupBoxWVarAddress.Size = new Size(122, 41); |
| | | groupBoxWVarAddress.TabIndex = 29; |
| | | groupBoxWVarAddress.TabStop = false; |
| | | groupBoxWVarAddress.Text = "Wè½´åéå°å"; |
| | | // |
| | | // textBoxWVarAddress |
| | | // |
| | | textBoxWVarAddress.Dock = DockStyle.Bottom; |
| | | textBoxWVarAddress.Font = new Font("å®ä½", 10F); |
| | | textBoxWVarAddress.Location = new Point(3, 18); |
| | | textBoxWVarAddress.Multiline = true; |
| | | textBoxWVarAddress.Name = "textBoxWVarAddress"; |
| | | textBoxWVarAddress.Size = new Size(116, 20); |
| | | textBoxWVarAddress.TabIndex = 12; |
| | | textBoxWVarAddress.Text = "1"; |
| | | // |
| | | // groupBoxYDetectLocation |
| | | // |
| | | groupBoxYDetectLocation.Controls.Add(textBoxYDetectLocation); |
| | | groupBoxYDetectLocation.Dock = DockStyle.Fill; |
| | | groupBoxYDetectLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxYDetectLocation.ForeColor = Color.White; |
| | | groupBoxYDetectLocation.Location = new Point(321, 48); |
| | | groupBoxYDetectLocation.Name = "groupBoxYDetectLocation"; |
| | | groupBoxYDetectLocation.Size = new Size(122, 39); |
| | | groupBoxYDetectLocation.TabIndex = 30; |
| | | groupBoxYDetectLocation.TabStop = false; |
| | | groupBoxYDetectLocation.Text = "Yè½´æ£æµä½ç½®"; |
| | | // |
| | | // textBoxYDetectLocation |
| | | // |
| | | textBoxYDetectLocation.Dock = DockStyle.Bottom; |
| | | textBoxYDetectLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxYDetectLocation.Location = new Point(3, 16); |
| | | textBoxYDetectLocation.Multiline = true; |
| | | textBoxYDetectLocation.Name = "textBoxYDetectLocation"; |
| | | textBoxYDetectLocation.Size = new Size(116, 20); |
| | | textBoxYDetectLocation.TabIndex = 12; |
| | | textBoxYDetectLocation.Text = "1"; |
| | | // |
| | | // groupBoxZDetectLocation |
| | | // |
| | | groupBoxZDetectLocation.Controls.Add(textBoxZDetectLocation); |
| | | groupBoxZDetectLocation.Dock = DockStyle.Fill; |
| | | groupBoxZDetectLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxZDetectLocation.ForeColor = Color.White; |
| | | groupBoxZDetectLocation.Location = new Point(321, 93); |
| | | groupBoxZDetectLocation.Name = "groupBoxZDetectLocation"; |
| | | groupBoxZDetectLocation.Size = new Size(122, 39); |
| | | groupBoxZDetectLocation.TabIndex = 30; |
| | | groupBoxZDetectLocation.TabStop = false; |
| | | groupBoxZDetectLocation.Text = "Zè½´æ£æµä½ç½®"; |
| | | // |
| | | // textBoxZDetectLocation |
| | | // |
| | | textBoxZDetectLocation.Dock = DockStyle.Bottom; |
| | | textBoxZDetectLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxZDetectLocation.Location = new Point(3, 16); |
| | | textBoxZDetectLocation.Multiline = true; |
| | | textBoxZDetectLocation.Name = "textBoxZDetectLocation"; |
| | | textBoxZDetectLocation.Size = new Size(116, 20); |
| | | textBoxZDetectLocation.TabIndex = 12; |
| | | textBoxZDetectLocation.Text = "1"; |
| | | // |
| | | // groupBoxWDetectLocation |
| | | // |
| | | groupBoxWDetectLocation.Controls.Add(textBoxWDetectLocation); |
| | | groupBoxWDetectLocation.Dock = DockStyle.Fill; |
| | | groupBoxWDetectLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxWDetectLocation.ForeColor = Color.White; |
| | | groupBoxWDetectLocation.Location = new Point(321, 138); |
| | | groupBoxWDetectLocation.Name = "groupBoxWDetectLocation"; |
| | | groupBoxWDetectLocation.Size = new Size(122, 41); |
| | | groupBoxWDetectLocation.TabIndex = 30; |
| | | groupBoxWDetectLocation.TabStop = false; |
| | | groupBoxWDetectLocation.Text = "Wè½´æ£æµä½ç½®"; |
| | | // |
| | | // textBoxWDetectLocation |
| | | // |
| | | textBoxWDetectLocation.Dock = DockStyle.Bottom; |
| | | textBoxWDetectLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxWDetectLocation.Location = new Point(3, 18); |
| | | textBoxWDetectLocation.Multiline = true; |
| | | textBoxWDetectLocation.Name = "textBoxWDetectLocation"; |
| | | textBoxWDetectLocation.Size = new Size(116, 20); |
| | | textBoxWDetectLocation.TabIndex = 12; |
| | | textBoxWDetectLocation.Text = "1"; |
| | | // |
| | | // groupBoxXDetectLocation |
| | | // |
| | | groupBoxXDetectLocation.Controls.Add(textBoxXDetectLocation); |
| | | groupBoxXDetectLocation.Dock = DockStyle.Fill; |
| | | groupBoxXDetectLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxXDetectLocation.ForeColor = Color.White; |
| | | groupBoxXDetectLocation.Location = new Point(321, 3); |
| | | groupBoxXDetectLocation.Name = "groupBoxXDetectLocation"; |
| | | groupBoxXDetectLocation.Size = new Size(122, 39); |
| | | groupBoxXDetectLocation.TabIndex = 30; |
| | | groupBoxXDetectLocation.TabStop = false; |
| | | groupBoxXDetectLocation.Text = "Xè½´æ£æµä½ç½®"; |
| | | // |
| | | // textBoxXDetectLocation |
| | | // |
| | | textBoxXDetectLocation.Dock = DockStyle.Bottom; |
| | | textBoxXDetectLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxXDetectLocation.Location = new Point(3, 16); |
| | | textBoxXDetectLocation.Multiline = true; |
| | | textBoxXDetectLocation.Name = "textBoxXDetectLocation"; |
| | | textBoxXDetectLocation.Size = new Size(116, 20); |
| | | textBoxXDetectLocation.TabIndex = 12; |
| | | textBoxXDetectLocation.Text = "1"; |
| | | // |
| | | // groupBoxXOriginalLocation |
| | | // |
| | | groupBoxXOriginalLocation.Controls.Add(textBoxXOriginalLocation); |
| | | groupBoxXOriginalLocation.Dock = DockStyle.Fill; |
| | | groupBoxXOriginalLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxXOriginalLocation.ForeColor = Color.White; |
| | | groupBoxXOriginalLocation.Location = new Point(449, 3); |
| | | groupBoxXOriginalLocation.Name = "groupBoxXOriginalLocation"; |
| | | groupBoxXOriginalLocation.Size = new Size(122, 39); |
| | | groupBoxXOriginalLocation.TabIndex = 30; |
| | | groupBoxXOriginalLocation.TabStop = false; |
| | | groupBoxXOriginalLocation.Text = "Xè½´åç¹ä½ç½®"; |
| | | // |
| | | // textBoxXOriginalLocation |
| | | // |
| | | textBoxXOriginalLocation.Dock = DockStyle.Bottom; |
| | | textBoxXOriginalLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxXOriginalLocation.Location = new Point(3, 16); |
| | | textBoxXOriginalLocation.Multiline = true; |
| | | textBoxXOriginalLocation.Name = "textBoxXOriginalLocation"; |
| | | textBoxXOriginalLocation.Size = new Size(116, 20); |
| | | textBoxXOriginalLocation.TabIndex = 12; |
| | | textBoxXOriginalLocation.Text = "1"; |
| | | // |
| | | // groupBoxYOriginalLocation |
| | | // |
| | | groupBoxYOriginalLocation.Controls.Add(textBoxYOriginalLocation); |
| | | groupBoxYOriginalLocation.Dock = DockStyle.Fill; |
| | | groupBoxYOriginalLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxYOriginalLocation.ForeColor = Color.White; |
| | | groupBoxYOriginalLocation.Location = new Point(449, 48); |
| | | groupBoxYOriginalLocation.Name = "groupBoxYOriginalLocation"; |
| | | groupBoxYOriginalLocation.Size = new Size(122, 39); |
| | | groupBoxYOriginalLocation.TabIndex = 30; |
| | | groupBoxYOriginalLocation.TabStop = false; |
| | | groupBoxYOriginalLocation.Text = "Yè½´åç¹ä½ç½®"; |
| | | // |
| | | // textBoxYOriginalLocation |
| | | // |
| | | textBoxYOriginalLocation.Dock = DockStyle.Bottom; |
| | | textBoxYOriginalLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxYOriginalLocation.Location = new Point(3, 16); |
| | | textBoxYOriginalLocation.Multiline = true; |
| | | textBoxYOriginalLocation.Name = "textBoxYOriginalLocation"; |
| | | textBoxYOriginalLocation.Size = new Size(116, 20); |
| | | textBoxYOriginalLocation.TabIndex = 12; |
| | | textBoxYOriginalLocation.Text = "1"; |
| | | // |
| | | // groupBoxZOriginalLocation |
| | | // |
| | | groupBoxZOriginalLocation.Controls.Add(textBoxZOriginalLocation); |
| | | groupBoxZOriginalLocation.Dock = DockStyle.Fill; |
| | | groupBoxZOriginalLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxZOriginalLocation.ForeColor = Color.White; |
| | | groupBoxZOriginalLocation.Location = new Point(449, 93); |
| | | groupBoxZOriginalLocation.Name = "groupBoxZOriginalLocation"; |
| | | groupBoxZOriginalLocation.Size = new Size(122, 39); |
| | | groupBoxZOriginalLocation.TabIndex = 30; |
| | | groupBoxZOriginalLocation.TabStop = false; |
| | | groupBoxZOriginalLocation.Text = "Zè½´åç¹ä½ç½®"; |
| | | // |
| | | // textBoxZOriginalLocation |
| | | // |
| | | textBoxZOriginalLocation.Dock = DockStyle.Bottom; |
| | | textBoxZOriginalLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxZOriginalLocation.Location = new Point(3, 16); |
| | | textBoxZOriginalLocation.Multiline = true; |
| | | textBoxZOriginalLocation.Name = "textBoxZOriginalLocation"; |
| | | textBoxZOriginalLocation.Size = new Size(116, 20); |
| | | textBoxZOriginalLocation.TabIndex = 12; |
| | | textBoxZOriginalLocation.Text = "1"; |
| | | // |
| | | // groupBoxWOriginalLocation |
| | | // |
| | | groupBoxWOriginalLocation.Controls.Add(textBoxWOriginalLocation); |
| | | groupBoxWOriginalLocation.Dock = DockStyle.Fill; |
| | | groupBoxWOriginalLocation.Font = new Font("å®ä½", 8F); |
| | | groupBoxWOriginalLocation.ForeColor = Color.White; |
| | | groupBoxWOriginalLocation.Location = new Point(449, 138); |
| | | groupBoxWOriginalLocation.Name = "groupBoxWOriginalLocation"; |
| | | groupBoxWOriginalLocation.Size = new Size(122, 41); |
| | | groupBoxWOriginalLocation.TabIndex = 30; |
| | | groupBoxWOriginalLocation.TabStop = false; |
| | | groupBoxWOriginalLocation.Text = "Wè½´åç¹ä½ç½®"; |
| | | // |
| | | // textBoxWOriginalLocation |
| | | // |
| | | textBoxWOriginalLocation.Dock = DockStyle.Bottom; |
| | | textBoxWOriginalLocation.Font = new Font("å®ä½", 10F); |
| | | textBoxWOriginalLocation.Location = new Point(3, 18); |
| | | textBoxWOriginalLocation.Multiline = true; |
| | | textBoxWOriginalLocation.Name = "textBoxWOriginalLocation"; |
| | | textBoxWOriginalLocation.Size = new Size(116, 20); |
| | | textBoxWOriginalLocation.TabIndex = 12; |
| | | textBoxWOriginalLocation.Text = "1"; |
| | | // |
| | | // tableLayoutPanel1 |
| | | // |
| | | tableLayoutPanel1.ColumnCount = 2; |
| | | tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 75F)); |
| | | tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Controls.Add(textBox1, 1, 0); |
| | | tableLayoutPanel1.Controls.Add(textBoxSN, 1, 0); |
| | | tableLayoutPanel1.Controls.Add(uiMarkLabelSN, 0, 0); |
| | | tableLayoutPanel1.Dock = DockStyle.Fill; |
| | | tableLayoutPanel1.Location = new Point(3, 3); |
| | | tableLayoutPanel1.Name = "tableLayoutPanel1"; |
| | | tableLayoutPanel1.RowCount = 1; |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Size = new Size(368, 39); |
| | | tableLayoutPanel1.Size = new Size(574, 39); |
| | | tableLayoutPanel1.TabIndex = 4; |
| | | tableLayoutPanel1.Paint += tableLayoutPanel1_Paint; |
| | | // |
| | | // textBox1 |
| | | // textBoxSN |
| | | // |
| | | textBox1.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBox1.Enabled = false; |
| | | textBox1.Location = new Point(78, 4); |
| | | textBox1.Name = "textBox1"; |
| | | textBox1.Size = new Size(287, 30); |
| | | textBox1.TabIndex = 20; |
| | | textBoxSN.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBoxSN.Enabled = false; |
| | | textBoxSN.Location = new Point(78, 4); |
| | | textBoxSN.Name = "textBoxSN"; |
| | | textBoxSN.Size = new Size(493, 30); |
| | | textBoxSN.TabIndex = 20; |
| | | // |
| | | // uiMarkLabelSN |
| | | // |
| | |
| | | tableLayoutPanel7.ColumnCount = 2; |
| | | tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 75F)); |
| | | tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel7.Controls.Add(textBox2, 1, 0); |
| | | tableLayoutPanel7.Controls.Add(textBoxName, 1, 0); |
| | | tableLayoutPanel7.Controls.Add(uiMarkLabelName, 0, 0); |
| | | tableLayoutPanel7.Dock = DockStyle.Fill; |
| | | tableLayoutPanel7.Location = new Point(3, 48); |
| | | tableLayoutPanel7.Name = "tableLayoutPanel7"; |
| | | tableLayoutPanel7.RowCount = 1; |
| | | tableLayoutPanel7.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel7.Size = new Size(368, 39); |
| | | tableLayoutPanel7.Size = new Size(574, 39); |
| | | tableLayoutPanel7.TabIndex = 7; |
| | | // |
| | | // textBox2 |
| | | // textBoxName |
| | | // |
| | | textBox2.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBox2.Enabled = false; |
| | | textBox2.Location = new Point(78, 4); |
| | | textBox2.Name = "textBox2"; |
| | | textBox2.Size = new Size(287, 30); |
| | | textBox2.TabIndex = 21; |
| | | textBoxName.Anchor = AnchorStyles.Left | AnchorStyles.Right; |
| | | textBoxName.Enabled = false; |
| | | textBoxName.Location = new Point(78, 4); |
| | | textBoxName.Name = "textBoxName"; |
| | | textBoxName.Size = new Size(493, 30); |
| | | textBoxName.TabIndex = 21; |
| | | // |
| | | // uiMarkLabelName |
| | | // |
| | |
| | | uiGroupBoxImage.MinimumSize = new Size(1, 1); |
| | | uiGroupBoxImage.Name = "uiGroupBoxImage"; |
| | | uiGroupBoxImage.Padding = new Padding(0, 32, 0, 0); |
| | | uiGroupBoxImage.Size = new Size(495, 684); |
| | | uiGroupBoxImage.Size = new Size(589, 684); |
| | | uiGroupBoxImage.TabIndex = 17; |
| | | uiGroupBoxImage.TabStop = false; |
| | | uiGroupBoxImage.Text = "宿¶éé"; |
| | |
| | | // uiSplitContainer1.Panel2 |
| | | // |
| | | uiSplitContainer1.Panel2.Controls.Add(uiGroupBoxImage); |
| | | uiSplitContainer1.Size = new Size(880, 684); |
| | | uiSplitContainer1.SplitterDistance = 374; |
| | | uiSplitContainer1.Size = new Size(1180, 684); |
| | | uiSplitContainer1.SplitterDistance = 580; |
| | | uiSplitContainer1.SplitterWidth = 11; |
| | | uiSplitContainer1.TabIndex = 20; |
| | | // |
| | |
| | | themeForm1.Padding = new Padding(10, 70, 10, 9); |
| | | themeForm1.RoundCorners = true; |
| | | themeForm1.Sizable = true; |
| | | themeForm1.Size = new Size(900, 763); |
| | | themeForm1.Size = new Size(1200, 763); |
| | | themeForm1.SmartBounds = true; |
| | | themeForm1.StartPosition = FormStartPosition.WindowsDefaultLocation; |
| | | themeForm1.TabIndex = 21; |
| | |
| | | controlBox1.EnableMaximizeButton = true; |
| | | controlBox1.EnableMinimizeButton = true; |
| | | controlBox1.ForeColor = Color.FromArgb(155, 155, 155); |
| | | controlBox1.Location = new Point(800, 18); |
| | | controlBox1.Location = new Point(1100, 18); |
| | | controlBox1.MaximizeHoverColor = Color.FromArgb(74, 74, 74); |
| | | controlBox1.MinimizeHoverColor = Color.FromArgb(63, 63, 65); |
| | | controlBox1.Name = "controlBox1"; |
| | |
| | | AutoScaleDimensions = new SizeF(120F, 120F); |
| | | AutoScaleMode = AutoScaleMode.Dpi; |
| | | AutoSize = true; |
| | | ClientSize = new Size(900, 763); |
| | | ClientSize = new Size(1200, 763); |
| | | Controls.Add(themeForm1); |
| | | FormBorderStyle = FormBorderStyle.None; |
| | | MinimumSize = new Size(261, 61); |
| | |
| | | Text = "è¿å¨æ§å¶è®¾ç½®"; |
| | | TransparencyKey = Color.Fuchsia; |
| | | uiGroupBoxMotionControl.ResumeLayout(false); |
| | | panel1.ResumeLayout(false); |
| | | tableLayoutPanel3.ResumeLayout(false); |
| | | tableLayoutPanel6.ResumeLayout(false); |
| | | tableLayoutPanel5.ResumeLayout(false); |
| | | tableLayoutPanel4.ResumeLayout(false); |
| | | tableLayoutPanel4.PerformLayout(); |
| | | groupBoxPulseMotionSpeedAddress.ResumeLayout(false); |
| | | groupBoxPulseMotionSpeedAddress.PerformLayout(); |
| | | groupBoxAngularVelocityAddress.ResumeLayout(false); |
| | | groupBoxAngularVelocityAddress.PerformLayout(); |
| | | groupBoxCom.ResumeLayout(false); |
| | | tableLayoutPanel2.ResumeLayout(false); |
| | | groupBoxPitchAnglePosition.ResumeLayout(false); |
| | | groupBoxPitchAnglePosition.PerformLayout(); |
| | |
| | | groupBoxYPosition.PerformLayout(); |
| | | groupBoxXPosition.ResumeLayout(false); |
| | | groupBoxXPosition.PerformLayout(); |
| | | groupBoxYVarAddress.ResumeLayout(false); |
| | | groupBoxYVarAddress.PerformLayout(); |
| | | groupBoxXVarAddress.ResumeLayout(false); |
| | | groupBoxXVarAddress.PerformLayout(); |
| | | groupBoxZVarAddress.ResumeLayout(false); |
| | | groupBoxZVarAddress.PerformLayout(); |
| | | groupBoxWVarAddress.ResumeLayout(false); |
| | | groupBoxWVarAddress.PerformLayout(); |
| | | groupBoxYDetectLocation.ResumeLayout(false); |
| | | groupBoxYDetectLocation.PerformLayout(); |
| | | groupBoxZDetectLocation.ResumeLayout(false); |
| | | groupBoxZDetectLocation.PerformLayout(); |
| | | groupBoxWDetectLocation.ResumeLayout(false); |
| | | groupBoxWDetectLocation.PerformLayout(); |
| | | groupBoxXDetectLocation.ResumeLayout(false); |
| | | groupBoxXDetectLocation.PerformLayout(); |
| | | groupBoxXOriginalLocation.ResumeLayout(false); |
| | | groupBoxXOriginalLocation.PerformLayout(); |
| | | groupBoxYOriginalLocation.ResumeLayout(false); |
| | | groupBoxYOriginalLocation.PerformLayout(); |
| | | groupBoxZOriginalLocation.ResumeLayout(false); |
| | | groupBoxZOriginalLocation.PerformLayout(); |
| | | groupBoxWOriginalLocation.ResumeLayout(false); |
| | | groupBoxWOriginalLocation.PerformLayout(); |
| | | tableLayoutPanel1.ResumeLayout(false); |
| | | tableLayoutPanel1.PerformLayout(); |
| | | tableLayoutPanel7.ResumeLayout(false); |
| | |
| | | private TableLayoutPanel tableLayoutPanel5; |
| | | private Button uiButtonGrabOnce; |
| | | private TableLayoutPanel tableLayoutPanel1; |
| | | private TextBox textBox1; |
| | | private TextBox textBoxSN; |
| | | private Label uiMarkLabelSN; |
| | | private Button uiButtonCloseSoftGrab; |
| | | private Label uiMarkLabelName; |
| | | private TextBox textBox2; |
| | | private TextBox textBoxName; |
| | | private Panel panel1; |
| | | private GroupBox groupBoxYVarAddress; |
| | | private TextBox textBoxYVarAddress; |
| | | private GroupBox groupBoxXVarAddress; |
| | | private TextBox textBoxXVarAddress; |
| | | private GroupBox groupBoxZVarAddress; |
| | | private TextBox textBoxZVarAddress; |
| | | private GroupBox groupBoxWVarAddress; |
| | | private TextBox textBoxWVarAddress; |
| | | private GroupBox groupBoxYDetectLocation; |
| | | private TextBox textBoxYDetectLocation; |
| | | private GroupBox groupBoxZDetectLocation; |
| | | private TextBox textBoxZDetectLocation; |
| | | private GroupBox groupBoxWDetectLocation; |
| | | private TextBox textBoxWDetectLocation; |
| | | private GroupBox groupBoxXDetectLocation; |
| | | private TextBox textBoxXDetectLocation; |
| | | private GroupBox groupBoxXOriginalLocation; |
| | | private TextBox textBoxXOriginalLocation; |
| | | private GroupBox groupBoxYOriginalLocation; |
| | | private TextBox textBoxYOriginalLocation; |
| | | private GroupBox groupBoxZOriginalLocation; |
| | | private TextBox textBoxZOriginalLocation; |
| | | private GroupBox groupBoxWOriginalLocation; |
| | | private TextBox textBoxWOriginalLocation; |
| | | private GroupBox groupBoxPulseMotionSpeedAddress; |
| | | private TextBox textBoxPulseMotionSpeedAddress; |
| | | private GroupBox groupBoxAngularVelocityAddress; |
| | | private TextBox textBoxAngularVelocityAddress; |
| | | private GroupBox groupBoxCom; |
| | | private Sunny.UI.UIComboBox cmbCom; |
| | | } |
| | | } |
| | |
| | | using LB_VisionControl; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionControl; |
| | | using LB_VisionProcesses.Cameras; |
| | | using System; |
| | | using System.Collections.Concurrent; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | |
| | | using System.Threading.Tasks; |
| | | using System.Windows; |
| | | using System.Windows.Forms; |
| | | using System.Windows.Media.Media3D; |
| | | using static ZXing.QrCode.Internal.Mode; |
| | | |
| | | namespace LB_SmartVision.Forms.Pages.MotionControlPage |
| | |
| | | { |
| | | BaseCamera camera { get; set; } |
| | | UserPictureBox onlinePictureBox { get; set; } |
| | | string communicatorsName { get; set; } |
| | | public MotionControlForm() |
| | | { |
| | | InitializeComponent(); |
| | | } |
| | | string cameraSN = string.Empty; |
| | | |
| | | public MotionControlForm(BaseCamera camera) |
| | | { |
| | |
| | | |
| | | this.camera = camera; |
| | | this.Text = camera.SN; |
| | | textBox1.Text = camera.SN; |
| | | |
| | | textBoxSN.Text = camera.SN; |
| | | cameraSN = camera.SN; |
| | | onlinePictureBox = new UserPictureBox(uiGroupBoxImage); |
| | | this.uiGroupBoxImage.Controls.Clear(); |
| | | this.uiGroupBoxImage.Controls.Add(onlinePictureBox); |
| | |
| | | |
| | | //å è½½åè°å½æ° |
| | | Subscribe(); |
| | | foreach (var name in GlobalVar.dicCommunicators.Items.Keys) |
| | | { |
| | | cmbCom.Items.Add(name); |
| | | } |
| | | } |
| | | |
| | | ConcurrentDictionary<string, RecordMotionControlData> concurrentDictionary = new ConcurrentDictionary<string, RecordMotionControlData>(); |
| | | private void CameraForm_FormClosing(object sender, FormClosingEventArgs e) |
| | | { |
| | | if (camera == null) |
| | |
| | | camera.StopGrabbing(); |
| | | |
| | | camera.StartGrabbing(); |
| | | |
| | | if (GlobalVar.dicMotionControlData.Keys.Contains(GlobalVar.strProductName)) |
| | | { |
| | | concurrentDictionary = GlobalVar.dicMotionControlData[GlobalVar.strProductName]; |
| | | double xAxisDetectLocationValue, xAxisOriginalLocationValue, yAxisDetectLocationValue, yAxisOriginalLocationValue, zAxisDetectLocationValue, zAxisOriginalLocationValue, wAxisDetectLocationValue, wAxisOriginalLocationValue, pulseMotionSpeedValue, angularVelocityValue; |
| | | xAxisDetectLocationValue = double.Parse(this.textBoxXDetectLocation.Text); |
| | | xAxisOriginalLocationValue = double.Parse(this.textBoxXOriginalLocation.Text); |
| | | yAxisDetectLocationValue = double.Parse(this.textBoxYDetectLocation.Text); |
| | | yAxisOriginalLocationValue = double.Parse(this.textBoxYOriginalLocation.Text); |
| | | zAxisDetectLocationValue = double.Parse(this.textBoxZDetectLocation.Text); |
| | | zAxisOriginalLocationValue = double.Parse(this.textBoxZOriginalLocation.Text); |
| | | wAxisDetectLocationValue = double.Parse(this.textBoxWDetectLocation.Text); |
| | | wAxisOriginalLocationValue = double.Parse(this.textBoxWOriginalLocation.Text); |
| | | pulseMotionSpeedValue = double.Parse(this.textBoxPointSpeed.Text); |
| | | angularVelocityValue = double.Parse(this.textBoxPointSpeed.Text); |
| | | if (concurrentDictionary.Keys.Contains(cameraSN)) |
| | | { |
| | | RecordMotionControlData recordMotionControlData = new RecordMotionControlData |
| | | { |
| | | ProductName = GlobalVar.strProductName, |
| | | CommunicatorsName = communicatorsName, |
| | | CameraSN = cameraSN, |
| | | XAxisAddress = this.textBoxXVarAddress.Text, |
| | | XAxisDetectLocationValue = xAxisDetectLocationValue, |
| | | XAxisOriginalLocationValue = xAxisOriginalLocationValue, |
| | | YAxisAddress = this.textBoxYVarAddress.Text, |
| | | YAxisDetectLocationValue = yAxisDetectLocationValue, |
| | | YAxisOriginalLocationValue = yAxisOriginalLocationValue, |
| | | ZAxisAddress = this.textBoxZVarAddress.Text, |
| | | ZAxisDetectLocationValue = zAxisDetectLocationValue, |
| | | ZAxisOriginalLocationValue = zAxisOriginalLocationValue, |
| | | WAxisAddress = this.textBoxWVarAddress.Text, |
| | | WAxisDetectLocationValue = wAxisDetectLocationValue, |
| | | WAxisOriginalLocationValue = wAxisOriginalLocationValue, |
| | | PulseMotionSpeedAddress = this.textBoxPulseMotionSpeedAddress.Text, |
| | | PulseMotionSpeedValue = pulseMotionSpeedValue, |
| | | AngularVelocityAddress = this.textBoxAngularVelocityAddress.Text, |
| | | AngularVelocityValue = angularVelocityValue |
| | | }; |
| | | concurrentDictionary.TryAdd(cameraSN, recordMotionControlData); |
| | | } |
| | | else |
| | | { |
| | | RecordMotionControlData recordMotionControlData = new RecordMotionControlData |
| | | { |
| | | ProductName = GlobalVar.strProductName, |
| | | CommunicatorsName = communicatorsName, |
| | | CameraSN = cameraSN, |
| | | XAxisAddress = this.textBoxXVarAddress.Text, |
| | | XAxisDetectLocationValue = xAxisDetectLocationValue, |
| | | XAxisOriginalLocationValue = xAxisOriginalLocationValue, |
| | | YAxisAddress = this.textBoxYVarAddress.Text, |
| | | YAxisDetectLocationValue = yAxisDetectLocationValue, |
| | | YAxisOriginalLocationValue = yAxisOriginalLocationValue, |
| | | ZAxisAddress = this.textBoxZVarAddress.Text, |
| | | ZAxisDetectLocationValue = zAxisDetectLocationValue, |
| | | ZAxisOriginalLocationValue = zAxisOriginalLocationValue, |
| | | WAxisAddress = this.textBoxWVarAddress.Text, |
| | | WAxisDetectLocationValue = wAxisDetectLocationValue, |
| | | WAxisOriginalLocationValue = wAxisOriginalLocationValue, |
| | | PulseMotionSpeedAddress = this.textBoxPulseMotionSpeedAddress.Text, |
| | | PulseMotionSpeedValue = pulseMotionSpeedValue, |
| | | AngularVelocityAddress = this.textBoxAngularVelocityAddress.Text, |
| | | AngularVelocityValue = angularVelocityValue |
| | | }; |
| | | concurrentDictionary.TryAdd(cameraSN, recordMotionControlData); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | double xAxisDetectLocationValue, xAxisOriginalLocationValue, yAxisDetectLocationValue, yAxisOriginalLocationValue, zAxisDetectLocationValue, zAxisOriginalLocationValue, wAxisDetectLocationValue, wAxisOriginalLocationValue, pulseMotionSpeedValue, angularVelocityValue; |
| | | xAxisDetectLocationValue = double.Parse(this.textBoxXDetectLocation.Text); |
| | | xAxisOriginalLocationValue = double.Parse(this.textBoxXOriginalLocation.Text); |
| | | yAxisDetectLocationValue = double.Parse(this.textBoxYDetectLocation.Text); |
| | | yAxisOriginalLocationValue = double.Parse(this.textBoxYOriginalLocation.Text); |
| | | zAxisDetectLocationValue = double.Parse(this.textBoxZDetectLocation.Text); |
| | | zAxisOriginalLocationValue = double.Parse(this.textBoxZOriginalLocation.Text); |
| | | wAxisDetectLocationValue = double.Parse(this.textBoxWDetectLocation.Text); |
| | | wAxisOriginalLocationValue = double.Parse(this.textBoxWOriginalLocation.Text); |
| | | pulseMotionSpeedValue = double.Parse(this.textBoxPointSpeed.Text); |
| | | angularVelocityValue = double.Parse(this.textBoxPointSpeed.Text); |
| | | if (concurrentDictionary.Keys.Contains(cameraSN)) |
| | | { |
| | | RecordMotionControlData recordMotionControlData = new RecordMotionControlData |
| | | { |
| | | ProductName = GlobalVar.strProductName, |
| | | CommunicatorsName = communicatorsName, |
| | | CameraSN = cameraSN, |
| | | XAxisAddress = this.textBoxXVarAddress.Text, |
| | | XAxisDetectLocationValue = xAxisDetectLocationValue, |
| | | XAxisOriginalLocationValue = xAxisOriginalLocationValue, |
| | | YAxisAddress = this.textBoxYVarAddress.Text, |
| | | YAxisDetectLocationValue = yAxisDetectLocationValue, |
| | | YAxisOriginalLocationValue = yAxisOriginalLocationValue, |
| | | ZAxisAddress = this.textBoxZVarAddress.Text, |
| | | ZAxisDetectLocationValue = zAxisDetectLocationValue, |
| | | ZAxisOriginalLocationValue = zAxisOriginalLocationValue, |
| | | WAxisAddress = this.textBoxWVarAddress.Text, |
| | | WAxisDetectLocationValue = wAxisDetectLocationValue, |
| | | WAxisOriginalLocationValue = wAxisOriginalLocationValue, |
| | | PulseMotionSpeedAddress = this.textBoxPulseMotionSpeedAddress.Text, |
| | | PulseMotionSpeedValue = pulseMotionSpeedValue, |
| | | AngularVelocityAddress = this.textBoxAngularVelocityAddress.Text, |
| | | AngularVelocityValue = angularVelocityValue |
| | | }; |
| | | concurrentDictionary.TryAdd(cameraSN, recordMotionControlData); |
| | | } |
| | | else |
| | | { |
| | | RecordMotionControlData recordMotionControlData = new RecordMotionControlData |
| | | { |
| | | ProductName = GlobalVar.strProductName, |
| | | CommunicatorsName = communicatorsName, |
| | | CameraSN = cameraSN, |
| | | XAxisAddress = this.textBoxXVarAddress.Text, |
| | | XAxisDetectLocationValue = xAxisDetectLocationValue, |
| | | XAxisOriginalLocationValue = xAxisOriginalLocationValue, |
| | | YAxisAddress = this.textBoxYVarAddress.Text, |
| | | YAxisDetectLocationValue = yAxisDetectLocationValue, |
| | | YAxisOriginalLocationValue = yAxisOriginalLocationValue, |
| | | ZAxisAddress = this.textBoxZVarAddress.Text, |
| | | ZAxisDetectLocationValue = zAxisDetectLocationValue, |
| | | ZAxisOriginalLocationValue = zAxisOriginalLocationValue, |
| | | WAxisAddress = this.textBoxWVarAddress.Text, |
| | | WAxisDetectLocationValue = wAxisDetectLocationValue, |
| | | WAxisOriginalLocationValue = wAxisOriginalLocationValue, |
| | | PulseMotionSpeedAddress = this.textBoxPulseMotionSpeedAddress.Text, |
| | | PulseMotionSpeedValue = pulseMotionSpeedValue, |
| | | AngularVelocityAddress = this.textBoxAngularVelocityAddress.Text, |
| | | AngularVelocityValue = angularVelocityValue |
| | | }; |
| | | concurrentDictionary.TryAdd(cameraSN, recordMotionControlData); |
| | | } |
| | | } |
| | | GlobalVar.dicMotionControlData.TryAdd(GlobalVar.strProductName, concurrentDictionary); |
| | | ConfigManager<ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>>.SaveConfig<ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>>(GlobalVar.dicMotionControlData, GlobalVar.allMotionControlDataPath); |
| | | Unsubscribe(); |
| | | } |
| | | |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | private void cmbCom_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | communicatorsName = cmbCom.Text; |
| | | } |
| | | } |
| | | } |
| | |
| | | <data name="themeForm1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO |
| | | wgAADsIBFShKgAAAA+JJREFUWEftVkuIHGUQbt34iMEoq2S2q3p3yTJsuqpnJ+L6WBRdwaigohfFgEou |
| | | vwAADr8BOAVTJAAAA+JJREFUWEftVkuIHGUQbt34iMEoq2S2q3p3yTJsuqpnJ+L6WBRdwaigohfFgEou |
| | | BkVBUPCBCEG8BXNQ48GLeImCehIJxMsqhsSZruod46K4HtSIGjU+4iOr0c1I9fSsM3/PLNtCPO0H36m/ |
| | | evz/X11VnreKVRTAHPOZumkY6lFwqURws3BwZ8ywTQnuiCP/+iTCzY1qaUPzdm/Atf3PaHre6XPsjyQM |
| | | 2xLGV4XwIyX4QRj+UMK/lPFvJTyhBMeV8IgQvmRJuH4Ko+l5p9UjGBbCJ5RxTgj+VMZmXxKcSAjekHE/ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_SmartVision.Forms.Pages.MotionControlPage |
| | | { |
| | | /// <summary> |
| | | /// è®°å½è¿å¨æ§å¶ç¸å
³åæ° |
| | | /// </summary> |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | public class RecordMotionControlData |
| | | { |
| | | /// <summary> |
| | | /// 产ååç§° |
| | | /// </summary> |
| | | public required string ProductName { get; set; } |
| | | /// <summary> |
| | | /// é讯åç§° |
| | | /// </summary> |
| | | public required string CommunicatorsName { get; set; } |
| | | /// <summary> |
| | | /// ç¸æºåºåå· |
| | | /// </summary> |
| | | public required string CameraSN { get; set; } |
| | | /// <summary> |
| | | /// Xè½´PLCå°å |
| | | /// </summary> |
| | | public required string XAxisAddress { get; set; } |
| | | /// <summary> |
| | | /// Xè½´PLCæ£æµä½ç½®å¼ |
| | | /// </summary> |
| | | public required double XAxisDetectLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Xè½´PLCåç¹ä½ç½®å¼ |
| | | /// </summary> |
| | | public required double XAxisOriginalLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Yè½´PLCå°å |
| | | /// </summary> |
| | | public required string YAxisAddress { get; set; } |
| | | /// <summary> |
| | | /// Yè½´PLCæ£æµä½ç½®å¼ |
| | | /// </summary> |
| | | public required double YAxisDetectLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Yè½´PLCåç¹ä½ç½®å¼ |
| | | /// </summary> |
| | | public required double YAxisOriginalLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Zè½´PLCå°å |
| | | /// </summary> |
| | | public required string ZAxisAddress { get; set; } |
| | | /// <summary> |
| | | /// Zè½´PLCæ£æµä½ç½®å¼ |
| | | /// </summary> |
| | | public required double ZAxisDetectLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Zè½´PLCåç¹ä½ç½®å¼ |
| | | /// </summary> |
| | | public required double ZAxisOriginalLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Wè½´PLCå°å |
| | | /// </summary> |
| | | public required string WAxisAddress { get; set; } |
| | | /// <summary> |
| | | /// Wè½´PLCæ£æµä½ç½®å¼ |
| | | /// </summary> |
| | | public required double WAxisDetectLocationValue { get; set; } |
| | | /// <summary> |
| | | /// Wè½´PLCåç¹ä½ç½®å¼ |
| | | /// </summary> |
| | | public required double WAxisOriginalLocationValue { get; set; } |
| | | /// <summary> |
| | | /// ç¹å¨é度å°å |
| | | /// </summary> |
| | | public required string PulseMotionSpeedAddress { get; set; } |
| | | /// <summary> |
| | | /// ç¹å¨éåº¦å¼ |
| | | /// </summary> |
| | | public required double PulseMotionSpeedValue { get; set; } |
| | | /// <summary> |
| | | /// è§é度å°å |
| | | /// </summary> |
| | | public required string AngularVelocityAddress { get; set; } |
| | | /// <summary> |
| | | /// è§éåº¦å¼ |
| | | /// </summary> |
| | | public required double AngularVelocityValue { get; set; } |
| | | } |
| | | } |
| | |
| | | public partial class AllProcessesPage : TabPage |
| | | { |
| | | public ObservableConcurrentDictionary<string, ProcessControl> dicProcessControls = new ObservableConcurrentDictionary<string, ProcessControl>(); |
| | | |
| | | // ä¿åæ§ä»¶åå§å¸å±ï¼å°ºå¯¸+ä½ç½®ï¼ï¼ç¨äºæ¢å¤ç©éµå¸å± |
| | | private Dictionary<string, (Size Size, Point Location)> _originalControlLayouts = new Dictionary<string, (Size, Point)>(); |
| | | // æ è®°æ¯å¦å¤äºå
¨å±ç¶æ |
| | | private bool _isFullScreen = false; |
| | | // è®°å½å½åå
¨å±çæ§ä»¶æ é¢ |
| | | private string _fullScreenControlTitle = string.Empty; |
| | | /// <summary> |
| | | /// å®ä¾åæµç¨çé¢ |
| | | /// </summary> |
| | |
| | | { |
| | | if (dicProcessControls.ContainsKey(title)) |
| | | { |
| | | // ç§»é¤åå
è§£ç»äºä»¶ï¼é¿å
å
åæ³æ¼ |
| | | var control = dicProcessControls[title]; |
| | | control.event_MouseDoubleClick -= ProcessControl_DoubleClick; |
| | | |
| | | this.controlsPanel.Controls.Remove(dicProcessControls[title]); |
| | | dicProcessControls.TryRemove(title, out _); |
| | | |
| | | // ç§»é¤åå§å¸å±è®°å½ |
| | | if (_originalControlLayouts.ContainsKey(title)) |
| | | _originalControlLayouts.Remove(title); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (GlobalVar.dicProcesses.ContainsKey(layout.ProcessName)) |
| | | enableLayout++; |
| | | } |
| | | |
| | | //æ»è¡æ°ï¼åä¸åæ´ |
| | | int matrixRows = (int)Math.Floor(Math.Sqrt(enableLayout)); |
| | | if (enableLayout == 0 || matrixRows == 0) |
| | | { |
| | | _originalControlLayouts.Clear(); |
| | | _isFullScreen = false; |
| | | _fullScreenControlTitle = string.Empty; |
| | | // æ å¯ç¨å¸å±æ¶ç´æ¥è¿åï¼é¿å
é¤é¶é误 |
| | | return; |
| | | } |
| | | //æ»åæ°ï¼åä¸åæ´ |
| | | int matrixColumns = (int)Math.Ceiling((double)enableLayout / matrixRows); |
| | | int index = 0; |
| | | // è®¡ç®æ¯ä¸ªProcessControlçå°ºå¯¸ï¼æè¡ååå颿¿å¤§å°ï¼ |
| | | int controlWidth = this.controlsPanel.Width / matrixColumns; |
| | | int controlHeight = this.controlsPanel.Height / matrixRows; |
| | | // æ¯æ¬¡éæå¸å±æ¶æ¸
空åå§è®°å½ |
| | | _originalControlLayouts.Clear(); |
| | | for (int i = 0; i < GlobalVar.dicLayout.Count; i++) |
| | | { |
| | | string name = GlobalVar.dicLayout[i].ProcessName; |
| | | string title = GlobalVar.dicLayout[i].Title; |
| | | |
| | | if (GlobalVar.dicProcesses.ContainsKey(name)) |
| | | { |
| | | // 计ç®å½åæ§ä»¶çè¡åç´¢å¼ |
| | | int colIndex = index % matrixColumns; // åç´¢å¼ï¼0,1,0,1...ï¼ |
| | | int rowIndex = index / matrixColumns; // è¡ç´¢å¼ï¼0,0,1,1...ï¼ |
| | | // 计ç®åå§ä½ç½®å尺寸ï¼ç©éµå¸å±ï¼ |
| | | Size originalSize = new Size(controlWidth, controlHeight); |
| | | Point originalLocation = new Point(colIndex * controlWidth, rowIndex * controlHeight); |
| | | ProcessControl processControl; |
| | | if (dicProcessControls.ContainsKey(title)) |
| | | { |
| | | ProcessControl processControl = dicProcessControls[title]; |
| | | processControl.Size |
| | | = new Size(this.controlsPanel.Size.Width / enableLayout |
| | | , this.controlsPanel.Size.Height); |
| | | processControl.Location |
| | | = new Point(processControl.Size.Width * index, 0); |
| | | |
| | | if (GlobalVar.dicProcesses[name].GetImage(GlobalVar.dicLayout[i], out _, out HObject RecordImage)) |
| | | dicProcessControls[title].ShowHoImage(RecordImage); |
| | | // å¤ç¨å·²ææ§ä»¶ï¼æ´æ°å°ºå¯¸åä½ç½® |
| | | processControl = dicProcessControls[title]; |
| | | processControl.Size = originalSize; |
| | | processControl.Location = originalLocation; |
| | | processControl.Visible = true; |
| | | // è§£ç»æ§äºä»¶ï¼é¿å
éå¤ç»å® |
| | | processControl.event_MouseDoubleClick -= ProcessControl_DoubleClick; |
| | | } |
| | | else |
| | | { |
| | | ProcessControl processControl = new ProcessControl(GlobalVar.dicLayout[i]); |
| | | processControl.Size |
| | | = new Size(this.controlsPanel.Size.Width / enableLayout |
| | | , this.controlsPanel.Size.Height); |
| | | processControl.Location |
| | | = new Point(processControl.Size.Width * index, 0); |
| | | // æ°å»ºæ§ä»¶ï¼æç©éµå¸å±èµå¼å°ºå¯¸åä½ç½® |
| | | processControl = new ProcessControl(GlobalVar.dicLayout[i]); |
| | | processControl.Size = originalSize; |
| | | processControl.Location = originalLocation; |
| | | processControl.SetTitle(title); |
| | | |
| | | // æ·»å å°åå
¸å颿¿ |
| | | dicProcessControls.TryAdd(title, processControl); |
| | | this.controlsPanel.Controls.Add(processControl); |
| | | |
| | | if (GlobalVar.dicProcesses[name].GetImage(GlobalVar.dicLayout[i], out _, out HObject RecordImage)) |
| | | dicProcessControls[title].ShowHoImage(RecordImage); |
| | | } |
| | | index++; |
| | | |
| | | // ç»å®åå»äºä»¶ï¼å·¦é®ï¼åé¼ æ æä¸äºä»¶ï¼å³é®åå»ï¼ |
| | | processControl.event_MouseDoubleClick += ProcessControl_DoubleClick; |
| | | |
| | | // ä¿ååå§å¸å±ï¼ç©éµç¶æï¼ |
| | | _originalControlLayouts[title] = (originalSize, originalLocation); |
| | | |
| | | // æ´æ°å¾ç |
| | | if (GlobalVar.dicProcesses[name].GetImage(GlobalVar.dicLayout[i], out _, out HObject recordImage)) |
| | | dicProcessControls[title].ShowHoImage(recordImage); |
| | | |
| | | index++; // ä»
å¯ç¨çå¸å±ç´¢å¼éå¢ |
| | | } |
| | | } |
| | | // 妿å½åæ¯å
¨å±ç¶æï¼æ¢å¤ç©éµå¸å±åéç½®ç¶æ |
| | | if (_isFullScreen) |
| | | { |
| | | _isFullScreen = false; |
| | | _fullScreenControlTitle = string.Empty; |
| | | } |
| | | } |
| | | #region åå»äºä»¶å¤çï¼å
¨å±/æ¢å¤å¸å±ï¼ |
| | | /// <summary> |
| | | /// å·¦é®åå»äºä»¶ï¼å
¨å±æ¾ç¤ºå½åProcessControl |
| | | /// </summary> |
| | | private void ProcessControl_DoubleClick(object sender, EventArgs e) |
| | | { |
| | | if (_isFullScreen) |
| | | { |
| | | RestoreMatrixLayout(); |
| | | return; |
| | | } |
| | | |
| | | var targetControl = sender as ProcessControl; |
| | | if (targetControl == null || string.IsNullOrEmpty(targetControl.Title)) return; |
| | | |
| | | // è®°å½å
¨å±çæ§ä»¶æ é¢ |
| | | _fullScreenControlTitle = targetControl.Title; |
| | | _isFullScreen = true; |
| | | |
| | | // éèææå
¶ä»ProcessControlï¼ä»
æ¾ç¤ºç®æ æ§ä»¶ |
| | | foreach (var kvp in dicProcessControls) |
| | | { |
| | | if (kvp.Key != _fullScreenControlTitle) |
| | | { |
| | | kvp.Value.Visible = false; |
| | | } |
| | | else |
| | | { |
| | | // ç®æ æ§ä»¶è®¾ä¸ºé¢æ¿å¤§å°ï¼ä½ç½®(0,0)ï¼å
¨å±ï¼ |
| | | kvp.Value.Size = this.controlsPanel.Size; |
| | | kvp.Value.Location = new Point(0, 0); |
| | | kvp.Value.BringToFront(); // ç¡®ä¿å¨æä¸å± |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¢å¤ç©éµå¸å±ï¼å¤ç¨InitVisionUIçæ ¸å¿é»è¾ï¼é¿å
代ç éå¤ï¼ |
| | | /// </summary> |
| | | private void RestoreMatrixLayout() |
| | | { |
| | | // 1. éç½®å
¨å±ç¶æ |
| | | _isFullScreen = false; |
| | | _fullScreenControlTitle = string.Empty; |
| | | |
| | | // 2. æ¢å¤æææ§ä»¶çåå§å°ºå¯¸ãä½ç½®åå¯è§æ§ |
| | | foreach (var kvp in dicProcessControls) |
| | | { |
| | | string title = kvp.Key; |
| | | var control = kvp.Value; |
| | | |
| | | // 3. ä»åå§å¸å±åå
¸ä¸æ¢å¤å°ºå¯¸åä½ç½® |
| | | if (_originalControlLayouts.TryGetValue(title, out var originalLayout)) |
| | | { |
| | | control.Size = originalLayout.Size; |
| | | control.Location = originalLayout.Location; |
| | | } |
| | | control.Visible = true; // æ¾ç¤ºæ§ä»¶ |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | btnRun.Size = new Size(93, 24); |
| | | btnRun.Text = "忬¡è¿è¡"; |
| | | btnRun.ToolTipText = "忬¡è¿è¡"; |
| | | btnRun.Visible = false; |
| | | btnRun.Click += btnRun_Click; |
| | | // |
| | | // btnCircleRun |
| | |
| | | btnCircleRun.Size = new Size(93, 24); |
| | | btnCircleRun.Text = "è¿ç»è¿è¡"; |
| | | btnCircleRun.ToolTipText = "è¿ç»"; |
| | | btnCircleRun.Visible = false; |
| | | btnCircleRun.Click += btnCircleRun_Click; |
| | | // |
| | | // panel1 |
| | |
| | | BackColor = Color.FromArgb(32, 41, 50); |
| | | Controls.Add(uiPanel1); |
| | | Controls.Add(toolStrip1); |
| | | Margin = new Padding(4, 4, 4, 4); |
| | | Margin = new Padding(4); |
| | | Name = "ProcessControl"; |
| | | Size = new Size(450, 287); |
| | | Load += ProcessControl_Load; |
| | |
| | | { |
| | | UserHSmartWindowControl UserHSmartWindowControl = new UserHSmartWindowControl(); |
| | | |
| | | public event ProcessRunBllRun OnProcessRunBllRun; |
| | | |
| | | private void onProcessRunBllRun() |
| | | { |
| | | if (OnProcessRunBllRun != null) |
| | | { |
| | | OnProcessRunBllRun(); |
| | | } |
| | | } |
| | | |
| | | public string Title = string.Empty; |
| | | |
| | | public event Control_MouseDown event_MouseDown; |
| | | public event Control_MouseDoubleClick event_MouseDoubleClick; |
| | | private void event_mouseDown(object sender, MouseEventArgs e) |
| | | { |
| | | if (event_MouseDown != null) |
| | | { |
| | | event_MouseDown(sender, e); |
| | | } |
| | | } |
| | | private void event_mouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | if (event_MouseDoubleClick != null) |
| | | { |
| | | event_MouseDoubleClick(this, e); |
| | | } |
| | | } |
| | | |
| | | ProcessRunBll ProcessRunBll |
| | | { |
| | | get |
| | |
| | | { |
| | | this.panel1.Controls.Add(this.UserHSmartWindowControl); |
| | | this.UserHSmartWindowControl.Dock = DockStyle.Fill; |
| | | |
| | | this.UserHSmartWindowControl.event_MouseDoubleClick += event_mouseDoubleClick; |
| | | this.UserHSmartWindowControl.event_MouseDown += event_mouseDown; |
| | | SetTitle(_Layout.ProcessName); |
| | | |
| | | Title = _Layout.Title; |
| | | if (ProcessRunBll != null) |
| | | this.label1.Text = $"æ»æ°ï¼{ProcessRunBll.total}"; |
| | | this.isClosed = false ; |
| | | this.isClosed = false; |
| | | var TaskPhotoContinue = Task.Factory.StartNew(() => |
| | | { |
| | | ThreadCircleRun(); |
| | |
| | | if (isCircleRuning || ProcessRunBll.bRuning) |
| | | ProcessRunBll.LogInfo($"{ProcessRunBll.Name}æ£å¨è¿è¡", LogInfoType.ERROR); |
| | | |
| | | ProcessRunBll.Run(); |
| | | |
| | | //ProcessRunBll.Run(); |
| | | onProcessRunBllRun(); |
| | | msg = ProcessRunBll.Msg; |
| | | return ProcessRunBll.Result; |
| | | } |
| | |
| | | LogInfo?.Invoke(string.Format("æµç¨[{0}]æ¥éª¤\"{1}\"å 载失败äº", this.Text, ProcessName), LogInfoType.ERROR); |
| | | process.strProcessName = ProcessName; |
| | | } |
| | | else if (process is LB_VisionProcesses.Processes.BarcodeReaderProcess) |
| | | { |
| | | LB_VisionProcesses.BarcodeReaders.BarcodeReaderForm barcodeForm |
| | | = new LB_VisionProcesses.BarcodeReaders.BarcodeReaderForm((LB_VisionProcesses.Processes.BarcodeReaderProcess)process, ProcessPath); |
| | | barcodeForm.ShowDialog(); |
| | | |
| | | if (!(process.Load(ProcessPath))) |
| | | LogInfo?.Invoke(string.Format("æµç¨[{0}]æ¥éª¤\"{1}\"å 载失败äº", this.Text, ProcessName), LogInfoType.ERROR); |
| | | process.strProcessName = ProcessName; |
| | | } |
| | | else if (ClassName.Contains("CommunicatorConfig") && process is CommunicatorConfig) |
| | | { |
| | | LB_VisionProcesses.Communicators.CommunicatorForm communicatorForm |
| | |
| | | |
| | | ProcessRunBll.UpdataInputsAndOutputs(ProcessName, process); |
| | | } |
| | | catch (Exception ex) { Debug.WriteLine(ex.Message); } |
| | | catch (Exception ex) |
| | | { |
| | | Debug.WriteLine(ex.Message); |
| | | MessageBox.Show($"æå¼é
ç½®çé¢å¤±è´¥: {ex.Message}\n{ex.StackTrace}", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | } |
| | | |
| | | private void AddBranch(string ProcessName) |
| | |
| | | comboBoxPermission = new ComboBox(); |
| | | dataGridViewUM = new DataGridView(); |
| | | tableLayoutPanel4 = new TableLayoutPanel(); |
| | | btnEdit = new HopeButton(); |
| | | btnFind = new HopeButton(); |
| | | btnDel = new HopeButton(); |
| | | btnEdit = new HopeButton(); |
| | | btnAdd = new ForeverButton(); |
| | | btnDel = new HopeButton(); |
| | | grpSetting.SuspendLayout(); |
| | | tableLayoutPanel1.SuspendLayout(); |
| | | tableLayoutPanel2.SuspendLayout(); |
| | |
| | | // |
| | | tableLayoutPanel4.Anchor = AnchorStyles.Top | AnchorStyles.Right; |
| | | tableLayoutPanel4.ColumnCount = 4; |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); |
| | | tableLayoutPanel4.Controls.Add(btnEdit, 1, 0); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); |
| | | tableLayoutPanel4.Controls.Add(btnFind, 0, 0); |
| | | tableLayoutPanel4.Controls.Add(btnDel, 3, 0); |
| | | tableLayoutPanel4.Controls.Add(btnEdit, 1, 0); |
| | | tableLayoutPanel4.Controls.Add(btnAdd, 2, 0); |
| | | tableLayoutPanel4.Controls.Add(btnDel, 3, 0); |
| | | tableLayoutPanel4.Location = new Point(457, 509); |
| | | tableLayoutPanel4.Name = "tableLayoutPanel4"; |
| | | tableLayoutPanel4.RowCount = 1; |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel4.Size = new Size(400, 39); |
| | | tableLayoutPanel4.TabIndex = 1; |
| | | // |
| | | // btnFind |
| | | // |
| | | btnFind.BorderColor = Color.FromArgb(220, 223, 230); |
| | | btnFind.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary; |
| | | btnFind.DangerColor = Color.FromArgb(245, 108, 108); |
| | | btnFind.DefaultColor = Color.FromArgb(255, 255, 255); |
| | | btnFind.Font = new Font("Segoe UI", 12F); |
| | | btnFind.HoverTextColor = Color.FromArgb(48, 49, 51); |
| | | btnFind.InfoColor = Color.FromArgb(144, 147, 153); |
| | | btnFind.Location = new Point(3, 3); |
| | | btnFind.Name = "btnFind"; |
| | | btnFind.PrimaryColor = Color.FromArgb(64, 158, 255); |
| | | btnFind.Size = new Size(94, 33); |
| | | btnFind.SuccessColor = Color.FromArgb(103, 194, 58); |
| | | btnFind.TabIndex = 1; |
| | | btnFind.Text = "æ¥è¯¢"; |
| | | btnFind.TextColor = Color.White; |
| | | btnFind.WarningColor = Color.FromArgb(230, 162, 60); |
| | | btnFind.Click += btnFind_Click; |
| | | // |
| | | // btnEdit |
| | | // |
| | |
| | | btnEdit.WarningColor = Color.FromArgb(230, 162, 60); |
| | | btnEdit.Click += btnEdit_Click; |
| | | // |
| | | // btnFind |
| | | // btnAdd |
| | | // |
| | | btnFind.BorderColor = Color.FromArgb(220, 223, 230); |
| | | btnFind.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary; |
| | | btnFind.DangerColor = Color.FromArgb(245, 108, 108); |
| | | btnFind.DefaultColor = Color.FromArgb(255, 255, 255); |
| | | btnFind.Font = new Font("Segoe UI", 12F); |
| | | btnFind.HoverTextColor = Color.FromArgb(48, 49, 51); |
| | | btnFind.InfoColor = Color.FromArgb(144, 147, 153); |
| | | btnFind.Location = new Point(3, 3); |
| | | btnFind.Name = "btnFind"; |
| | | btnFind.PrimaryColor = Color.FromArgb(64, 158, 255); |
| | | btnFind.Size = new Size(94, 33); |
| | | btnFind.SuccessColor = Color.FromArgb(103, 194, 58); |
| | | btnFind.TabIndex = 1; |
| | | btnFind.Text = "æ¥è¯¢"; |
| | | btnFind.TextColor = Color.White; |
| | | btnFind.WarningColor = Color.FromArgb(230, 162, 60); |
| | | btnAdd.BackColor = Color.Transparent; |
| | | btnAdd.BaseColor = Color.FromArgb(35, 168, 109); |
| | | btnAdd.Font = new Font("Segoe UI", 12F); |
| | | btnAdd.Location = new Point(203, 3); |
| | | btnAdd.Name = "btnAdd"; |
| | | btnAdd.Rounded = false; |
| | | btnAdd.Size = new Size(94, 33); |
| | | btnAdd.TabIndex = 4; |
| | | btnAdd.Text = "æ·»å "; |
| | | btnAdd.TextColor = Color.FromArgb(243, 243, 243); |
| | | btnAdd.Click += btnAdd_Click; |
| | | // |
| | | // btnDel |
| | | // |
| | |
| | | btnDel.TextColor = Color.White; |
| | | btnDel.WarningColor = Color.FromArgb(230, 162, 60); |
| | | btnDel.Click += btnDel_Click; |
| | | // |
| | | // btnAdd |
| | | // |
| | | btnAdd.BackColor = Color.Transparent; |
| | | btnAdd.BaseColor = Color.FromArgb(35, 168, 109); |
| | | btnAdd.Font = new Font("Segoe UI", 12F); |
| | | btnAdd.Location = new Point(203, 3); |
| | | btnAdd.Name = "btnAdd"; |
| | | btnAdd.Rounded = false; |
| | | btnAdd.Size = new Size(94, 33); |
| | | btnAdd.TabIndex = 4; |
| | | btnAdd.Text = "æ·»å "; |
| | | btnAdd.TextColor = Color.FromArgb(243, 243, 243); |
| | | btnAdd.Click += btnAdd_Click; |
| | | // |
| | | // UserManagementEditPage |
| | | // |
| | |
| | | using LB_SmartVision.Forms.Pages.ProcessPage; |
| | | using LB_SmartVision.Forms.Pages.CameraPage; |
| | | using LB_SmartVision.Forms.Pages.ProcessPage; |
| | | using LB_SmartVision.Forms.Pages.SettingPage; |
| | | using LB_SmartVision.ProcessRun; |
| | | using LB_SmartVision.SQL; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionControl; |
| | | using LB_VisionProcesses; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System.Collections.Concurrent; |
| | | using System.Data; |
| | | using System.Text; |
| | | using VisionControl.Forms; |
| | | using LB_SmartVision.Forms.Pages.SettingPage; |
| | | using LB_SmartVisionCommon; |
| | | using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; |
| | | using LB_SmartVision.Forms.Pages.CameraPage; |
| | | using System.Security.Principal; |
| | | using System.Text; |
| | | using System.Windows.Forms; |
| | | using VisionControl.Forms; |
| | | using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; |
| | | |
| | | namespace LB_SmartVision.Forms.Pages.UserManagementPage |
| | | { |
| | | public partial class UserManagementEditPage : UserControl |
| | | { |
| | | public Action<string, LogInfoType> LogInfo; |
| | | List<RecordUserData> recordUserDatas = new List<RecordUserData>(); |
| | | |
| | | public UserManagementEditPage() |
| | | { |
| | |
| | | Text = "ç¨æ·ç®¡ç设置"; |
| | | |
| | | InitializeComponent(); |
| | | InitializeDataGridView(); |
| | | InitializeComboBox(); |
| | | InitializeDataGridView(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | private void InitializeDataGridView() |
| | | { |
| | | this.dataGridViewUM.DataSource = recordUserDatas; |
| | | // 设置DataGridViewå宽 |
| | | dataGridViewUM.ColumnCount = 4; |
| | | |
| | | int totalWidth = dataGridViewUM.ClientSize.Width; |
| | | int columnCount = dataGridViewUM.ColumnCount; |
| | | int columnWidth = totalWidth / columnCount; |
| | | |
| | | // 设置æå°å®½åº¦ |
| | | int minWidth = 100; // æå°å®½åº¦ |
| | | if (columnWidth < minWidth) |
| | | { |
| | | columnWidth = minWidth; |
| | | } |
| | | |
| | | for (int i = 0; i < columnCount; i++) |
| | | { |
| | | dataGridViewUM.Columns[i].Width = columnWidth; |
| | | } |
| | | |
| | | // è®¾ç½®åæ é¢ |
| | | dataGridViewUM.Columns[0].Name = "ç¨æ·å"; |
| | | //dataGridViewUM.Columns[1].Name = "å¯ç "; |
| | | dataGridViewUM.Columns[1].Name = "å§å"; |
| | | dataGridViewUM.Columns[2].Name = "å·¥å·"; |
| | | dataGridViewUM.Columns[3].Name = "æé"; |
| | | |
| | | dataGridViewUM.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; |
| | | |
| | | // ç¦æ¢ç¼è¾åå
æ ¼ï¼å¯éï¼ |
| | | dataGridViewUM.ReadOnly = true; |
| | | |
| | | // å
许å¤è¡éæ©ï¼å¯éï¼ |
| | | dataGridViewUM.MultiSelect = false; |
| | | |
| | | // æ¾ç¤ºè¡æ é¢ï¼å¯éï¼ |
| | | dataGridViewUM.RowHeadersVisible = true; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | comboBoxPermission.SelectedIndex = 0; |
| | | textBoxUsername.Focus(); // å°ç¦ç¹è®¾ç½®åç¨æ·åè¾å
¥æ¡ |
| | | } |
| | | |
| | | #region æ·»å ç¨æ·æé® |
| | | private void btnAdd_Click(object sender, EventArgs e) |
| | | { |
| | | // éªè¯è¾å
¥ |
| | |
| | | return; |
| | | } |
| | | |
| | | // å建æ°è¡æ°æ® |
| | | string[] row = new string[] |
| | | RecordUserData user = new RecordUserData(); |
| | | user.EmployeeNumber = this.textBoxEmployeeID.Text; |
| | | user.EmployeeAccount = this.textBoxUsername.Text; |
| | | user.EmployeePassword = this.textBoxPassword.Text; |
| | | user.EmployeeName = this.textBoxName.Text; |
| | | user.EmployeePermission = (UserPermission)this.comboBoxPermission.SelectedIndex; |
| | | // æ·»å å° UserManager |
| | | bool success = UserManager.Instance.AddUser(user); |
| | | |
| | | if (success) |
| | | { |
| | | textBoxUsername.Text, |
| | | //textBoxPassword.Text, // å®é
åºç¨ä¸å¯ç åºè¯¥å å¯ |
| | | textBoxName.Text, |
| | | textBoxEmployeeID.Text, |
| | | comboBoxPermission.SelectedItem.ToString() |
| | | }; |
| | | recordUserDatas.Add(user); |
| | | |
| | | // 设置æ´ä¸ªDataGridViewçé»è®¤åä½åé¢è² |
| | | dataGridViewUM.DefaultCellStyle.Font = new Font("å®ä½", 12); |
| | | dataGridViewUM.DefaultCellStyle.ForeColor = Color.Black; // åä½é¢è² |
| | | dataGridViewUM.DefaultCellStyle.BackColor = Color.White; // èæ¯é¢è² |
| | | //MessageBox.Show("ç¨æ·æ·»å æåï¼", "æç¤º", |
| | | // MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | |
| | | // æ·»å æ°è¡å°DataGridView |
| | | dataGridViewUM.Rows.Add(row); |
| | | // æ¸
空è¾å
¥æ¡ |
| | | ClearInputFields(); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æ·»å ç¨æ·å¤±è´¥ï¼", "é误", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | |
| | | // æ¸
空è¾å
¥æ¡ |
| | | ClearInputFields(); |
| | | } |
| | | #endregion |
| | | |
| | | #region å é¤ç¨æ·æé® |
| | | private void btnDel_Click(object sender, EventArgs e) |
| | | { |
| | | if (dataGridViewUM.SelectedRows.Count > 0) |
| | | { |
| | | // è·åéä¸çè¡ |
| | | DataGridViewRow selectedRow = dataGridViewUM.SelectedRows[0]; |
| | | |
| | | // 确认å é¤ |
| | | DialogResult result = MessageBox.Show("ç¡®å®è¦å é¤éä¸çè¡åï¼", |
| | | "确认å é¤", MessageBoxButtons.YesNo, MessageBoxIcon.Question); |
| | | |
| | | if (result == DialogResult.Yes) |
| | | { |
| | | foreach (DataGridViewRow row in dataGridViewUM.SelectedRows) |
| | | try |
| | | { |
| | | dataGridViewUM.Rows.Remove(row); |
| | | // å
è·åè¦å é¤çæ°æ® |
| | | string employeeNumber = selectedRow.Cells[0].Value?.ToString(); |
| | | |
| | | if (!string.IsNullOrEmpty(employeeNumber)) |
| | | { |
| | | // 1. 仿°æ®æºå é¤ |
| | | var dataSource = dataGridViewUM.DataSource as List<RecordUserData>; |
| | | if (dataSource != null) |
| | | { |
| | | var itemToRemove = dataSource.FirstOrDefault(u => u.EmployeeNumber == employeeNumber); |
| | | if (itemToRemove != null) |
| | | { |
| | | dataSource.Remove(itemToRemove); |
| | | } |
| | | } |
| | | |
| | | // 2. ä»ç¨æ·ç®¡çå¨å é¤ |
| | | UserManager.Instance.DeleteUser(employeeNumber); |
| | | |
| | | // 3. å·æ°æ°æ®ç»å® |
| | | dataGridViewUM.DataSource = null; |
| | | dataGridViewUM.DataSource = dataSource; |
| | | |
| | | //MessageBox.Show("å 餿åï¼", "æç¤º", |
| | | // MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"å é¤å¤±è´¥: {ex.Message}", "é误", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | } |
| | | } |
| | |
| | | MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | } |
| | | #endregion |
| | | private int editingRowIndex = -1; |
| | | private bool isEditingMode = false; |
| | | private string originalButtonText = "ä¿®æ¹"; |
| | | #region ä¿®æ¹ç¨æ·ä¿¡æ¯ |
| | | private void btnEdit_Click(object sender, EventArgs e) |
| | | { |
| | | // åå
æ ¼å¯ç¼è¾ |
| | |
| | | // æ¸
空è¾å
¥æ¡ |
| | | ClearInputFields(); |
| | | |
| | | MessageBox.Show("ä¿®æ¹å®æï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | RecordUserData user = new RecordUserData(); |
| | | user.EmployeeNumber = this.textBoxEmployeeID.Text; |
| | | user.EmployeeAccount = this.textBoxUsername.Text; |
| | | user.EmployeePassword = this.textBoxPassword.Text; |
| | | user.EmployeeName = this.textBoxName.Text; |
| | | user.EmployeePermission = (UserPermission)this.comboBoxPermission.SelectedIndex; |
| | | UserManager.Instance.UpdateUser(user); |
| | | |
| | | //MessageBox.Show("ä¿®æ¹å®æï¼", "æç¤º", |
| | | // MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | } |
| | | |
| | |
| | | //textBoxPassword.PlaceholderText = "å¦éä¿®æ¹å¯ç 请填å"; |
| | | } |
| | | } |
| | | |
| | | private void UpdateRowData(int rowIndex) |
| | | { |
| | | if (rowIndex >= 0 && rowIndex < dataGridViewUM.Rows.Count) |
| | |
| | | row.Cells[3].Value = comboBoxPermission.SelectedItem.ToString(); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region æ¥è¯¢ç¨æ·ä¿¡æ¯ |
| | | private void btnFind_Click(object sender, EventArgs e) |
| | | { |
| | | List<RecordUserData> recordUserDatas = UserManager.Instance.GetAllUsers(); |
| | | this.dataGridViewUM.DataSource = recordUserDatas; |
| | | this.dataGridViewUM.AutoGenerateColumns = true; |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using LB_SmartVision.Forms.Pages.SettingPage; |
| | | using LB_SmartVision.Forms.Pages.MotionControlPage; |
| | | using LB_SmartVision.Forms.Pages.SettingPage; |
| | | using LB_SmartVision.ProcessRun; |
| | | using LB_SmartVision.Tool; |
| | | using LB_VisionProcesses.Cameras; |
| | | using LB_VisionProcesses.Communicators; |
| | | using LB_VisionProcesses.BarcodeReaders; |
| | | using System; |
| | | using System.Collections.Concurrent; |
| | | using System.Collections.Generic; |
| | |
| | | public static ObservableConcurrentDictionary<string, BaseCamera> dicCameras { get; set; } = new ObservableConcurrentDictionary<string, BaseCamera>(); |
| | | |
| | | /// <summary> |
| | | /// 读ç å¨éå(Key:设å¤SNï¼Value:读ç å¨å¥æ) |
| | | /// </summary> |
| | | public static ObservableConcurrentDictionary<string, BarcodeReaderBase> dicBarcodeReaders { get; set; } = new ObservableConcurrentDictionary<string, BarcodeReaderBase>(); |
| | | |
| | | /// <summary> |
| | | /// é讯éå(Key:é讯åï¼Value:éè®¯å¥æ) |
| | | /// </summary> |
| | | public static ObservableConcurrentDictionary<string, BaseCommunicator> dicCommunicators { get; set; } = new ObservableConcurrentDictionary<string, BaseCommunicator>(); |
| | |
| | | public static ConcurrentDictionary<int, ConcurrentDictionary<string, string>> dicProcessSetting { get; set; } = new ConcurrentDictionary<int, ConcurrentDictionary<string, string>>(); |
| | | |
| | | /// <summary> |
| | | /// è¿å¨æ§æ°æ®å¶éå Key:产ååç§°ï¼Value: SN,RecordMotionControlData |
| | | /// </summary> |
| | | public static ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>> dicMotionControlData { get; set; } = new ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>(); |
| | | |
| | | public static string allMotionControlDataPath |
| | | => GlobalVar.strApplicationPath + "\\ææäº§å\\" + GlobalVar.strProductName + "\\A_MotionControlDatas.json"; |
| | | |
| | | /// <summary> |
| | | /// å¸å±éå |
| | | /// </summary> |
| | | public static ConcurrentDictionary<int, Layout> dicLayout { get; set; } = new ConcurrentDictionary<int, Layout>(); |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="CsvHelper" Version="33.1.0" /> |
| | | <PackageReference Include="MaterialSkin.NET5" Version="1.0.2" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Reference Include="CLIDelegate"> |
| | | <HintPath>..\LB_VisionProcesses\ref\CLIDelegate.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="EasyIDSDK_Net"> |
| | | <HintPath>..\LB_VisionProcesses\ref\EasyIDSDK_Net.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="halcondotnet"> |
| | | <HintPath>ref\halcondotnet.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="MVSDK_Net"> |
| | | <HintPath>..\LB_VisionProcesses\ref\MVSDK_Net.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="MySql.Data"> |
| | | <HintPath>ref\MySql.Data.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ThridLibray"> |
| | | <HintPath>..\LB_VisionProcesses\ref\ThridLibray.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | [Node("ç¸æºåå¾", "ååå·¥å
·", "Basic", "ç¸æºåå¾")] |
| | | public void ç¸æºåå¾(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Dæç¹å·¥å
·", "Haclon2Då·¥å
·", "Basic", "Halcon2Dæç¹å·¥å
·")] |
| | | [Node("读ç å·¥å
·", "ååå·¥å
·", "Basic", "读ç å·¥å
·")] |
| | | public void 读ç å·¥å
·(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Dæç¹å·¥å
·", "Halcon2Då·¥å
·", "Basic", "Halcon2Dæç¹å·¥å
·")] |
| | | public void Halcon2Dæç¹å·¥å
·(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("é讯模å", "é讯工å
·", "Basic", "é讯模å")] |
| | | public void é讯模å(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Då¾åå¢å¼º", "Halcon2Då·¥å
·", "Basic", "Halcon2Då¾åå¢å¼º")] |
| | | public void Halcon2Då¾åå¢å¼º(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Då¾å滤波", "Halcon2Då·¥å
·", "Basic", "Halcon2Då¾å滤波")] |
| | | public void Halcon2Då¾å滤波(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | |
| | | namespace LB_SmartVision.ProcessRun |
| | | { |
| | | public delegate void ProcessRunBllRun(); |
| | | |
| | | public class ProcessRunBll |
| | | { |
| | | |
| | |
| | | { |
| | | dicOutputsMapping.TryAdd(name, new List<string>()); |
| | | dicOutputsMapping[name].Add(name + ".Outputs.Image"); |
| | | //dicOutputsMapping[name].Add(name + ".Outputs.Record"); |
| | | dicOutputsMapping[name].Add(name + ".Outputs.Record"); |
| | | dicOutputsMapping[name].Add(name + ".Outputs.Result"); |
| | | |
| | | foreach (var item in process.Params.Outputs) |
| | |
| | | InspectionOperator VARCHAR(255), |
| | | NGType VARCHAR(255), |
| | | NGSize VARCHAR(255), |
| | | DetectionTime VARCHAR(255)), |
| | | DetectionTime VARCHAR(255), |
| | | CameraInspection VARCHAR(255), |
| | | CreatedDate DATETIME DEFAULT CURRENT_TIMESTAMP, |
| | | INDEX idx_created_date (CreatedDate), |
| | |
| | | materialTabControl = new MaterialSkin.Controls.MaterialTabControl(); |
| | | tlp_VisionMainOperator = new Sunny.UI.UITableLayoutPanel(); |
| | | ckb_AllowRun = new Sunny.UI.UICheckBox(); |
| | | btn_Login = new ReaLTaiizor.Controls.Button(); |
| | | btn_GlobalVar = new ReaLTaiizor.Controls.Button(); |
| | | com_ProductName = new ReaLTaiizor.Controls.AloneComboBox(); |
| | | btn_SingleRun = new Sunny.UI.UIButton(); |
| | | btn_Login = new Sunny.UI.UIButton(); |
| | | btn_RunContinuously = new Sunny.UI.UIButton(); |
| | | btn_GlobalVar = new Sunny.UI.UIButton(); |
| | | materialTabSelector = new MaterialSkin.Controls.MaterialTabSelector(); |
| | | grb_Info = new Sunny.UI.UIGroupBox(); |
| | | rich_Info = new Sunny.UI.UIRichTextBox(); |
| | |
| | | theme_VisionForm.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); |
| | | theme_VisionForm.Image = (Image)resources.GetObject("theme_VisionForm.Image"); |
| | | theme_VisionForm.Location = new Point(0, 0); |
| | | theme_VisionForm.Margin = new Padding(4); |
| | | theme_VisionForm.Name = "theme_VisionForm"; |
| | | theme_VisionForm.Padding = new Padding(10, 70, 10, 9); |
| | | theme_VisionForm.Padding = new Padding(12, 88, 12, 11); |
| | | theme_VisionForm.RoundCorners = true; |
| | | theme_VisionForm.Sizable = true; |
| | | theme_VisionForm.Size = new Size(1152, 704); |
| | | theme_VisionForm.Size = new Size(1440, 880); |
| | | theme_VisionForm.SmartBounds = true; |
| | | theme_VisionForm.StartPosition = FormStartPosition.WindowsDefaultLocation; |
| | | theme_VisionForm.TabIndex = 0; |
| | |
| | | // |
| | | sc_VisionForm.Dock = DockStyle.Fill; |
| | | sc_VisionForm.FixedPanel = FixedPanel.Panel2; |
| | | sc_VisionForm.Location = new Point(10, 70); |
| | | sc_VisionForm.Location = new Point(12, 88); |
| | | sc_VisionForm.Margin = new Padding(4); |
| | | sc_VisionForm.Name = "sc_VisionForm"; |
| | | sc_VisionForm.Orientation = Orientation.Horizontal; |
| | | // |
| | |
| | | // sc_VisionForm.Panel2 |
| | | // |
| | | sc_VisionForm.Panel2.Controls.Add(grb_Info); |
| | | sc_VisionForm.Size = new Size(1132, 625); |
| | | sc_VisionForm.SplitterDistance = 476; |
| | | sc_VisionForm.Size = new Size(1416, 781); |
| | | sc_VisionForm.SplitterDistance = 593; |
| | | sc_VisionForm.SplitterWidth = 5; |
| | | sc_VisionForm.TabIndex = 1; |
| | | // |
| | | // tlp_MainView |
| | |
| | | tlp_MainView.Margin = new Padding(2); |
| | | tlp_MainView.Name = "tlp_MainView"; |
| | | tlp_MainView.RowCount = 3; |
| | | tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 48F)); |
| | | tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 31F)); |
| | | tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F)); |
| | | tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 39F)); |
| | | tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tlp_MainView.Size = new Size(1132, 476); |
| | | tlp_MainView.Size = new Size(1416, 593); |
| | | tlp_MainView.TabIndex = 1; |
| | | tlp_MainView.TagString = null; |
| | | // |
| | |
| | | materialTabControl.AccessibleRole = AccessibleRole.Sound; |
| | | materialTabControl.Depth = 0; |
| | | materialTabControl.Dock = DockStyle.Fill; |
| | | materialTabControl.Location = new Point(2, 81); |
| | | materialTabControl.Location = new Point(2, 101); |
| | | materialTabControl.Margin = new Padding(2); |
| | | materialTabControl.MouseState = MaterialSkin.MouseState.HOVER; |
| | | materialTabControl.Name = "materialTabControl"; |
| | | materialTabControl.SelectedIndex = 0; |
| | | materialTabControl.Size = new Size(1128, 393); |
| | | materialTabControl.Size = new Size(1412, 490); |
| | | materialTabControl.TabIndex = 0; |
| | | // |
| | | // tlp_VisionMainOperator |
| | |
| | | tlp_VisionMainOperator.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 11.1111107F)); |
| | | tlp_VisionMainOperator.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 11.1111107F)); |
| | | tlp_VisionMainOperator.Controls.Add(ckb_AllowRun, 0, 0); |
| | | tlp_VisionMainOperator.Controls.Add(btn_Login, 1, 0); |
| | | tlp_VisionMainOperator.Controls.Add(btn_GlobalVar, 7, 0); |
| | | tlp_VisionMainOperator.Controls.Add(com_ProductName, 8, 0); |
| | | tlp_VisionMainOperator.Controls.Add(btn_SingleRun, 2, 0); |
| | | tlp_VisionMainOperator.Controls.Add(btn_Login, 1, 0); |
| | | tlp_VisionMainOperator.Controls.Add(btn_RunContinuously, 3, 0); |
| | | tlp_VisionMainOperator.Controls.Add(btn_GlobalVar, 7, 0); |
| | | tlp_VisionMainOperator.Dock = DockStyle.Fill; |
| | | tlp_VisionMainOperator.Location = new Point(3, 51); |
| | | tlp_VisionMainOperator.Location = new Point(4, 64); |
| | | tlp_VisionMainOperator.Margin = new Padding(4); |
| | | tlp_VisionMainOperator.Name = "tlp_VisionMainOperator"; |
| | | tlp_VisionMainOperator.RowCount = 1; |
| | | tlp_VisionMainOperator.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tlp_VisionMainOperator.Size = new Size(1126, 25); |
| | | tlp_VisionMainOperator.Size = new Size(1408, 31); |
| | | tlp_VisionMainOperator.TabIndex = 0; |
| | | tlp_VisionMainOperator.TagString = null; |
| | | // |
| | |
| | | ckb_AllowRun.Dock = DockStyle.Fill; |
| | | ckb_AllowRun.Font = new Font("å®ä½", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | ckb_AllowRun.ForeColor = SystemColors.Control; |
| | | ckb_AllowRun.Location = new Point(3, 3); |
| | | ckb_AllowRun.Location = new Point(4, 4); |
| | | ckb_AllowRun.Margin = new Padding(4); |
| | | ckb_AllowRun.MinimumSize = new Size(1, 1); |
| | | ckb_AllowRun.Name = "ckb_AllowRun"; |
| | | ckb_AllowRun.Size = new Size(119, 19); |
| | | ckb_AllowRun.Size = new Size(148, 23); |
| | | ckb_AllowRun.TabIndex = 2; |
| | | ckb_AllowRun.Text = "è¿è¡æ¨¡å¼"; |
| | | // |
| | | // btn_Login |
| | | // |
| | | btn_Login.BackColor = Color.Transparent; |
| | | btn_Login.BorderColor = Color.FromArgb(32, 34, 37); |
| | | btn_Login.Dock = DockStyle.Fill; |
| | | btn_Login.EnteredBorderColor = Color.FromArgb(165, 37, 37); |
| | | btn_Login.EnteredColor = Color.FromArgb(32, 34, 37); |
| | | btn_Login.Font = new Font("å®ä½", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_Login.Image = null; |
| | | btn_Login.ImageAlign = ContentAlignment.MiddleLeft; |
| | | btn_Login.InactiveColor = Color.FromArgb(32, 34, 37); |
| | | btn_Login.Location = new Point(128, 3); |
| | | btn_Login.Name = "btn_Login"; |
| | | btn_Login.PressedBorderColor = Color.FromArgb(165, 37, 37); |
| | | btn_Login.PressedColor = Color.FromArgb(165, 37, 37); |
| | | btn_Login.Size = new Size(119, 19); |
| | | btn_Login.TabIndex = 3; |
| | | btn_Login.Text = "ç¨æ·ç»å½"; |
| | | btn_Login.TextAlignment = StringAlignment.Center; |
| | | btn_Login.Click += btn_Login_Click; |
| | | // |
| | | // btn_GlobalVar |
| | | // |
| | | btn_GlobalVar.BackColor = Color.Gray; |
| | | btn_GlobalVar.BorderColor = Color.FromArgb(32, 34, 37); |
| | | btn_GlobalVar.Dock = DockStyle.Fill; |
| | | btn_GlobalVar.EnteredBorderColor = Color.FromArgb(165, 37, 37); |
| | | btn_GlobalVar.EnteredColor = Color.FromArgb(32, 34, 37); |
| | | btn_GlobalVar.Font = new Font("å®ä½", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 0); |
| | | btn_GlobalVar.Image = null; |
| | | btn_GlobalVar.ImageAlign = ContentAlignment.MiddleLeft; |
| | | btn_GlobalVar.InactiveColor = Color.FromArgb(32, 34, 37); |
| | | btn_GlobalVar.Location = new Point(878, 3); |
| | | btn_GlobalVar.Name = "btn_GlobalVar"; |
| | | btn_GlobalVar.PressedBorderColor = Color.FromArgb(165, 37, 37); |
| | | btn_GlobalVar.PressedColor = Color.FromArgb(165, 37, 37); |
| | | btn_GlobalVar.Size = new Size(119, 19); |
| | | btn_GlobalVar.TabIndex = 4; |
| | | btn_GlobalVar.Text = "å
¨å±åé"; |
| | | btn_GlobalVar.TextAlignment = StringAlignment.Center; |
| | | btn_GlobalVar.Click += btn_GlobalVar_Click; |
| | | // |
| | | // com_ProductName |
| | | // |
| | |
| | | com_ProductName.Font = new Font("å®ä½", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | com_ProductName.FormattingEnabled = true; |
| | | com_ProductName.ItemHeight = 20; |
| | | com_ProductName.Location = new Point(1003, 3); |
| | | com_ProductName.Location = new Point(1252, 4); |
| | | com_ProductName.Margin = new Padding(4); |
| | | com_ProductName.Name = "com_ProductName"; |
| | | com_ProductName.Size = new Size(120, 26); |
| | | com_ProductName.Size = new Size(152, 26); |
| | | com_ProductName.TabIndex = 5; |
| | | com_ProductName.SelectedValueChanged += com_ProductName_SelectedValueChanged; |
| | | // |
| | | // btn_SingleRun |
| | | // |
| | | btn_SingleRun.BackColor = Color.FromArgb(39, 51, 63); |
| | | btn_SingleRun.Dock = DockStyle.Fill; |
| | | btn_SingleRun.FillColor = Color.FromArgb(39, 51, 63); |
| | | btn_SingleRun.FillColor2 = Color.FromArgb(39, 51, 63); |
| | | btn_SingleRun.FillSelectedColor = Color.FromArgb(128, 255, 128); |
| | | btn_SingleRun.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_SingleRun.Location = new Point(315, 3); |
| | | btn_SingleRun.MinimumSize = new Size(1, 1); |
| | | btn_SingleRun.Name = "btn_SingleRun"; |
| | | btn_SingleRun.Size = new Size(150, 25); |
| | | btn_SingleRun.TabIndex = 6; |
| | | btn_SingleRun.Text = "忬¡è¿è¡"; |
| | | btn_SingleRun.TipsFont = new Font("å®ä½", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_SingleRun.Click += btn_Run_Click; |
| | | // |
| | | // btn_Login |
| | | // |
| | | btn_Login.BackColor = Color.FromArgb(39, 51, 63); |
| | | btn_Login.Dock = DockStyle.Fill; |
| | | btn_Login.FillColor = Color.FromArgb(39, 51, 63); |
| | | btn_Login.FillColor2 = Color.FromArgb(39, 51, 63); |
| | | btn_Login.FillSelectedColor = Color.FromArgb(128, 255, 128); |
| | | btn_Login.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_Login.Location = new Point(159, 3); |
| | | btn_Login.MinimumSize = new Size(1, 1); |
| | | btn_Login.Name = "btn_Login"; |
| | | btn_Login.Size = new Size(150, 25); |
| | | btn_Login.TabIndex = 6; |
| | | btn_Login.Text = "ç¨æ·ç»å½"; |
| | | btn_Login.TipsFont = new Font("å®ä½", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_Login.Click += btn_Login_Click; |
| | | // |
| | | // btn_RunContinuously |
| | | // |
| | | btn_RunContinuously.BackColor = Color.FromArgb(39, 51, 63); |
| | | btn_RunContinuously.Dock = DockStyle.Fill; |
| | | btn_RunContinuously.FillColor = Color.FromArgb(39, 51, 63); |
| | | btn_RunContinuously.FillColor2 = Color.FromArgb(39, 51, 63); |
| | | btn_RunContinuously.FillSelectedColor = Color.FromArgb(128, 255, 128); |
| | | btn_RunContinuously.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_RunContinuously.Location = new Point(471, 3); |
| | | btn_RunContinuously.MinimumSize = new Size(1, 1); |
| | | btn_RunContinuously.Name = "btn_RunContinuously"; |
| | | btn_RunContinuously.Size = new Size(150, 25); |
| | | btn_RunContinuously.TabIndex = 6; |
| | | btn_RunContinuously.Text = "è¿ç»è¿è¡"; |
| | | btn_RunContinuously.TipsFont = new Font("å®ä½", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_RunContinuously.Click += btn_RunContinuously_Click; |
| | | // |
| | | // btn_GlobalVar |
| | | // |
| | | btn_GlobalVar.BackColor = Color.FromArgb(39, 51, 63); |
| | | btn_GlobalVar.Dock = DockStyle.Fill; |
| | | btn_GlobalVar.FillColor = Color.FromArgb(39, 51, 63); |
| | | btn_GlobalVar.FillColor2 = Color.FromArgb(39, 51, 63); |
| | | btn_GlobalVar.FillSelectedColor = Color.FromArgb(128, 255, 128); |
| | | btn_GlobalVar.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_GlobalVar.Location = new Point(1095, 3); |
| | | btn_GlobalVar.MinimumSize = new Size(1, 1); |
| | | btn_GlobalVar.Name = "btn_GlobalVar"; |
| | | btn_GlobalVar.Size = new Size(150, 25); |
| | | btn_GlobalVar.TabIndex = 6; |
| | | btn_GlobalVar.Text = "å
¨å±åé"; |
| | | btn_GlobalVar.TipsFont = new Font("å®ä½", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | btn_GlobalVar.Click += btn_GlobalVar_Click; |
| | | // |
| | | // materialTabSelector |
| | | // |
| | | materialTabSelector.BaseTabControl = null; |
| | | materialTabSelector.Depth = 0; |
| | | materialTabSelector.Dock = DockStyle.Fill; |
| | | materialTabSelector.Location = new Point(3, 3); |
| | | materialTabSelector.Location = new Point(4, 4); |
| | | materialTabSelector.Margin = new Padding(4); |
| | | materialTabSelector.MouseState = MaterialSkin.MouseState.HOVER; |
| | | materialTabSelector.Name = "materialTabSelector"; |
| | | materialTabSelector.Size = new Size(1126, 42); |
| | | materialTabSelector.Size = new Size(1408, 52); |
| | | materialTabSelector.TabIndex = 1; |
| | | // |
| | | // grb_Info |
| | |
| | | grb_Info.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | grb_Info.ForeColor = SystemColors.Control; |
| | | grb_Info.Location = new Point(0, 0); |
| | | grb_Info.Margin = new Padding(4, 5, 4, 5); |
| | | grb_Info.Margin = new Padding(5, 6, 5, 6); |
| | | grb_Info.MinimumSize = new Size(1, 1); |
| | | grb_Info.Name = "grb_Info"; |
| | | grb_Info.Padding = new Padding(0, 32, 0, 0); |
| | | grb_Info.Size = new Size(1132, 145); |
| | | grb_Info.Padding = new Padding(0, 40, 0, 0); |
| | | grb_Info.Size = new Size(1416, 183); |
| | | grb_Info.TabIndex = 1; |
| | | grb_Info.Text = "æ¥å¿æ¾ç¤ºåºï¼"; |
| | | grb_Info.TextAlignment = ContentAlignment.MiddleLeft; |
| | |
| | | rich_Info.Dock = DockStyle.Fill; |
| | | rich_Info.FillColor = Color.FromArgb(32, 41, 50); |
| | | rich_Info.Font = new Font("å®ä½", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | rich_Info.Location = new Point(0, 32); |
| | | rich_Info.Location = new Point(0, 40); |
| | | rich_Info.Margin = new Padding(4, 5, 4, 5); |
| | | rich_Info.MinimumSize = new Size(1, 1); |
| | | rich_Info.Name = "rich_Info"; |
| | | rich_Info.Padding = new Padding(2); |
| | | rich_Info.ShowText = false; |
| | | rich_Info.Size = new Size(1132, 113); |
| | | rich_Info.Size = new Size(1416, 143); |
| | | rich_Info.TabIndex = 0; |
| | | rich_Info.TextAlignment = ContentAlignment.MiddleLeft; |
| | | // |
| | |
| | | cb_VisionForm.EnableMaximizeButton = true; |
| | | cb_VisionForm.EnableMinimizeButton = true; |
| | | cb_VisionForm.ForeColor = Color.FromArgb(155, 155, 155); |
| | | cb_VisionForm.Location = new Point(1072, 14); |
| | | cb_VisionForm.Location = new Point(1330, 18); |
| | | cb_VisionForm.Margin = new Padding(4); |
| | | cb_VisionForm.MaximizeHoverColor = Color.FromArgb(74, 74, 74); |
| | | cb_VisionForm.MinimizeHoverColor = Color.FromArgb(63, 63, 65); |
| | | cb_VisionForm.Name = "cb_VisionForm"; |
| | |
| | | // |
| | | // VisionForm |
| | | // |
| | | AutoScaleDimensions = new SizeF(96F, 96F); |
| | | AutoScaleDimensions = new SizeF(120F, 120F); |
| | | AutoScaleMode = AutoScaleMode.Dpi; |
| | | ClientSize = new Size(1152, 704); |
| | | ClientSize = new Size(1440, 880); |
| | | Controls.Add(theme_VisionForm); |
| | | FormBorderStyle = FormBorderStyle.None; |
| | | Icon = (Icon)resources.GetObject("$this.Icon"); |
| | | MinimumSize = new Size(261, 61); |
| | | Margin = new Padding(4); |
| | | MinimumSize = new Size(326, 76); |
| | | Name = "VisionForm"; |
| | | Text = "è½®èå¤è§è§è§æ£æµç³»ç»"; |
| | | TransparencyKey = Color.Fuchsia; |
| | |
| | | private SplitContainer sc_VisionForm; |
| | | private Sunny.UI.UITableLayoutPanel tlp_VisionMainOperator; |
| | | private Sunny.UI.UICheckBox ckb_AllowRun; |
| | | private ReaLTaiizor.Controls.Button btn_Login; |
| | | private ReaLTaiizor.Controls.Button btn_GlobalVar; |
| | | private Sunny.UI.UIGroupBox grb_Info; |
| | | private Sunny.UI.UIRichTextBox rich_Info; |
| | | private MaterialSkin.Controls.MaterialTabControl materialTabControl; |
| | | private ReaLTaiizor.Controls.AloneComboBox com_ProductName; |
| | | private MaterialSkin.Controls.MaterialTabSelector materialTabSelector; |
| | | private Sunny.UI.UITableLayoutPanel tlp_MainView; |
| | | private Sunny.UI.UIButton btn_SingleRun; |
| | | private Sunny.UI.UIButton btn_Login; |
| | | private Sunny.UI.UIButton btn_RunContinuously; |
| | | private Sunny.UI.UIButton btn_GlobalVar; |
| | | } |
| | | } |
| | |
| | | using LB_SmartVision.Forms.Pages.SettingPage; |
| | | using LB_SmartVision.Forms.Pages.UserManagementPage; |
| | | using LB_SmartVision.ProcessRun; |
| | | using LB_SmartVision.SQL; |
| | | using LB_SmartVision.Tool; |
| | | using LB_SmartVisionCommon; |
| | | using LB_SmartVisionLoginUI; |
| | |
| | | { |
| | | LogInfo("å
¨å±åéå 载失败", LogInfoType.ERROR); |
| | | } |
| | | |
| | | GlobalVar.dicMotionControlData.Clear(); |
| | | if (LoadMotionControlDatas(GlobalVar.allMotionControlDataPath)) |
| | | { |
| | | LogInfo("è¿å¨æ§å¶åæ°å è½½æå", LogInfoType.PASS); |
| | | } |
| | | else |
| | | { |
| | | LogInfo("è¿å¨æ§å¶åæ°å 载失败", LogInfoType.ERROR); |
| | | } |
| | | //å è½½æµç¨ |
| | | GlobalVar.dicProcesses.Clear(); |
| | | if (LoadAllProcess(GlobalVar.allProcessConnectionStringPath)) |
| | |
| | | com_ProductName.Items.Add("æ°å¢"); |
| | | com_ProductName.Text = GlobalVar.strProductName; |
| | | this.WindowState = FormWindowState.Maximized; |
| | | DatabaseRecordProductDataHelper.InitializeDatabase(); |
| | | } |
| | | |
| | | public void SaveAllSetting() |
| | |
| | | SaveAllProcessSetting(); |
| | | SaveAllLayout(); |
| | | SaveAllCsv(); |
| | | SaveMotionControlDatas(); |
| | | } |
| | | public bool LoadMotionControlDatas(string alMotionControlDataPath) |
| | | { |
| | | try |
| | | { |
| | | GlobalVar.dicMotionControlData = ConfigManager<ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>>.LoadConfig<ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>>(alMotionControlDataPath); |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | public bool SaveMotionControlDatas() |
| | | { |
| | | try |
| | | { |
| | | ConcurrentDictionary<string, List<string>> removeCameraSN = new ConcurrentDictionary<string, List<string>>(); |
| | | foreach (var item in GlobalVar.dicMotionControlData.Keys) |
| | | { |
| | | List<string> list = new List<string>(); |
| | | foreach (var itemSN in GlobalVar.dicMotionControlData[item].Keys) |
| | | { |
| | | if (!GlobalVar.dicCameras.Keys.Contains(itemSN)) |
| | | { |
| | | list.Add(itemSN); |
| | | } |
| | | } |
| | | if (list.Count > 0) |
| | | { |
| | | removeCameraSN.TryAdd(item, list); |
| | | } |
| | | } |
| | | foreach (var item in removeCameraSN.Keys) |
| | | { |
| | | foreach (var itemSN in removeCameraSN[item]) |
| | | { |
| | | GlobalVar.dicMotionControlData[item].Keys.Remove(itemSN); |
| | | } |
| | | } |
| | | ConfigManager<ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>>.SaveConfig<ConcurrentDictionary<string, ConcurrentDictionary<string, RecordMotionControlData>>>(GlobalVar.dicMotionControlData, GlobalVar.allMotionControlDataPath); |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public bool LoadAllCameras(string allCamerasConnectionStringPath) |
| | |
| | | string ClassName = match.Groups["ClassName"].Value; // "TCP" |
| | | string IP = match.Groups["IP"].Value; // "127.0.0.1" |
| | | string Slot = match.Groups["Slot"].Value; // "1111" |
| | | string CpuType= match.Groups["CpuType"].Value; |
| | | string CpuType = match.Groups["CpuType"].Value; |
| | | string PlcAddress = match.Groups["PlcAddress"].Value; |
| | | string DataType = match.Groups["DataType"].Success ? match.Groups["DataType"].Value : "String"; |
| | | |
| | |
| | | { |
| | | string strJson = string.Empty; |
| | | GlobalVar.allCommunicatorsConnectionString = new ConcurrentDictionary<string, string>(); |
| | | |
| | | foreach (var item in GlobalVar.dicCommunicators) |
| | | { |
| | | string ClassName = item.Value.GetType().FullName;// "TCP" |
| | |
| | | string CommunicatorConnectionString = $"({ClassName})[{IP}][{PORT}]"; |
| | | GlobalVar.allCommunicatorsConnectionString.TryAdd(item.Key, CommunicatorConnectionString); |
| | | } |
| | | GlobalVar.dicCommunicators[item.Key].ClassName = ClassName; |
| | | } |
| | | var settings = new JsonSerializerSettings |
| | | { |
| | |
| | | { } |
| | | } |
| | | File.WriteAllText(GlobalVar.allCommunicatorsConnectionStringPath, strJson, Encoding.UTF8); |
| | | foreach (var item in GlobalVar.dicCommunicators) |
| | | { |
| | | string ClassName = item.Value.GetType().FullName;// "TCP" |
| | | } |
| | | ConfigManager<ObservableConcurrentDictionary<string, BaseCommunicator>>.SaveConfig<ObservableConcurrentDictionary<string, BaseCommunicator>>(GlobalVar.dicCommunicators, GlobalVar.strApplicationPath + "\\ææäº§å\\" + GlobalVar.strProductName + "\\dicCommunicators.json"); |
| | | return true; |
| | | } |
| | | catch { return false; } |
| | |
| | | GlobalVar.strProductName = com_ProductName.SelectedItem?.ToString(); |
| | | foreach (BaseCamera camera in GlobalVar.dicCameras.Values) |
| | | { |
| | | camera.TriggerRunMessageReceived -= TriggerRunMessageReceived; |
| | | camera.Dispose(); |
| | | } |
| | | GlobalVar.dicCameras.Clear(); |
| | |
| | | communicator.Disconnect(); |
| | | } |
| | | FormClosing -= VisionForm_FormClosing; |
| | | |
| | | //try |
| | | //{ |
| | | // Process[] processes = System.Diagnostics.Process.GetProcesses(); //è·å¾ææè¿ç¨ |
| | | // foreach (Process p in processes) |
| | | // { |
| | | // if (p.ProcessName == "LB_SmartVision" && p.StartTime < DateTime.Now.AddMilliseconds(-300)) |
| | | // { |
| | | // p.Kill(); |
| | | // } |
| | | // } |
| | | //} |
| | | //catch { } |
| | | |
| | | KillAllTargetProcesses(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æè¿ç¨é»è¾ |
| | | /// </summary> |
| | | private void KillAllTargetProcesses() |
| | | { |
| | | try |
| | | { |
| | | // 1. è·åå½åè¿ç¨IDï¼é¿å
ææ»èªå·± |
| | | int currentProcessId = Process.GetCurrentProcess().Id; |
| | | // 2. 模ç³å¹é
è¿ç¨åï¼å¿½ç¥å¤§å°åï¼ï¼è¦çvshost/åç¼çæ
åµ |
| | | var targetProcesses = Process.GetProcesses() |
| | | .Where(p => |
| | | p.ProcessName.IndexOf("LB_SmartVision", StringComparison.OrdinalIgnoreCase) >= 0 |
| | | && p.Id == currentProcessId); |
| | | |
| | | foreach (var p in targetProcesses) |
| | | { |
| | | try |
| | | { |
| | | if (!p.HasExited) |
| | | { |
| | | // å
å°è¯ä¼é
å
³éWinFormç¨åºï¼æ¯ç´æ¥Killæ´åå¥½ï¼ |
| | | p.CloseMainWindow(); |
| | | // çå¾
500msï¼çæ¯å¦æ£å¸¸éåº |
| | | if (!p.WaitForExit(500)) |
| | | { |
| | | p.Kill(); // å¼ºå¶ææ» |
| | | p.WaitForExit(1000); // çå¾
è¿ç¨å®å
¨ç»æ¢ |
| | | } |
| | | } |
| | | p.Dispose(); // éæ¾è¿ç¨èµæºï¼é¿å
å¥ææ³æ¼ |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // è®°å½å¼å¸¸ä½ä¸ä¸æï¼æ¯å¦æéä¸è¶³çæ
åµ |
| | | System.IO.File.AppendAllText("kill_process_log.txt", $"[{DateTime.Now}] ææ»è¿ç¨å¤±è´¥: {ex.Message}\r\n"); |
| | | } |
| | | } |
| | | |
| | | // é¢å¤å»¶è¿ï¼ç¡®ä¿æä»¶å¥æå®å
¨éæ¾ |
| | | Thread.Sleep(1000); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | // éé»å¤±è´¥ï¼ä¸å½±åç¨åºéåº |
| | | } |
| | | } |
| | | |
| | | private void btn_Run_Click(object sender, EventArgs e) |
| | | { |
| | | var matchedItems = GlobalVar.dicProcessSetting |
| | | .Where(item => |
| | | { |
| | | var value = item.Value; |
| | | var triggerComm = value["触åé讯"]; |
| | | var triggerChar = value["触åå符"]; |
| | | return triggerComm != null; |
| | | //return triggerComm != null && triggerComm.Equals(name) && |
| | | // (string.IsNullOrEmpty(triggerChar?.ToString()) || |
| | | // msg.StartsWith(triggerChar.ToString())); |
| | | }) |
| | | .ToList(); // é¿å
éå¤åå
¸è®¿é®åè£
ç®±æä½ |
| | | if (matchedItems.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | TriggerRunMessageReceived(matchedItems[0].Value["触åé讯"], matchedItems[0].Value["触åå符"]); |
| | | } |
| | | |
| | | private void btn_RunContinuously_Click(object sender, EventArgs e) |
| | | { |
| | | if (btn_RunContinuously.Text.Equals("è¿ç»è¿è¡")) |
| | | { |
| | | btn_RunContinuously.Text = "æåè¿è¡"; |
| | | Task.Factory.StartNew(() => |
| | | { |
| | | var matchedItems = GlobalVar.dicProcessSetting |
| | | .Where(item => |
| | | { |
| | | var value = item.Value; |
| | | var triggerComm = value["触åé讯"]; |
| | | var triggerChar = value["触åå符"]; |
| | | return triggerComm != null; |
| | | //return triggerComm != null && triggerComm.Equals(name) && |
| | | // (string.IsNullOrEmpty(triggerChar?.ToString()) || |
| | | // msg.StartsWith(triggerChar.ToString())); |
| | | }) |
| | | .ToList(); // é¿å
éå¤åå
¸è®¿é®åè£
ç®±æä½ |
| | | while (btn_RunContinuously.Text.Equals("æåè¿è¡")) |
| | | { |
| | | |
| | | TriggerRunMessageReceived(matchedItems[0].Value["触åé讯"], matchedItems[0].Value["触åå符"]); |
| | | Thread.Sleep(500); |
| | | } |
| | | //this.Invoke(() => |
| | | //{ |
| | | //}); |
| | | }); |
| | | } |
| | | else if (btn_RunContinuously.Text.Equals("æåè¿è¡")) |
| | | { |
| | | btn_RunContinuously.Text = "è¿ç»è¿è¡"; |
| | | Thread.Sleep(100); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | <data name="theme_VisionForm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO |
| | | vAAADrwBlbxySQAAA+JJREFUWEftVkuIHGUQbt34iMEoq2S2q3p3yTJsuqpnJ+L6WBRdwaigohfFgEou |
| | | BkVBUPCBCEG8BXNQ48GLeImCehIJxMsqhsSZruod46K4HtSIGjU+4iOr0c1I9fSsM3/PLNtCPO0H36m/ |
| | | evz/X11VnreKVRTAHPOZumkY6lFwqURws3BwZ8ywTQnuiCP/+iTCzY1qaUPzdm/Atf3PaHre6XPsjyQM |
| | | 2xLGV4XwIyX4QRj+UMK/lPFvJTyhBMeV8IgQvmRJuH4Ko+l5p9UjGBbCJ5RxTgj+VMZmXxKcSAjekHE/ |
| | | NNs5DgaTKLinEQYVO4Trf1mkV81wixLUslPmA3bzF2XcKeP+hWY/u3n0fCXcrQwLyjAvjNsb1dI6N05P |
| | | mFAIHlHG73sEypPgGwnhfpn0zzH7jzddcK4Q7kqfKNMI4a9K+MwBDgbdeF04MBWsFYYdQvhbLlBvfhKT |
| | | f+vMtLfG7C0JJXxKGY67WnvCmPAFGRs7z42boul5AzHBfdK6TjdQtzPGk8oos5F/5Y7sfVvPhg+lp+1h |
| | | 0yIsxARPmtaN78WEl8eEX+SNclxUhne0glUrNrN9zfMGlPAuZTzaQ99FYfwuDv3ruoLvq5bWaQSvZCfL |
| | | GXUYLwrj240Qxtu2lkSN4FpdWfKZH9jb9RQ1Cq62f9sVOlxUxn3KQXnJ0PO8QxU/jBm1h74v7ZniEG9K |
| | | Hdg/quzvXO709k0Y3u08ucGqWgheX862H4XgxbR47SqU8D1X0EXC2VmGizqDz0xPr0kYH9eO360gNe0b |
| | | jWppozB+1kOQEb5MCLa0C64NoeGrhOGrvH6lhK81GiIvnggmrDLzgvTkvwvDA+5wsU4nhG/m9AUoBD/F |
| | | HFzWN4H0XQn2vF8eXN8Z3FAPYasl59oUYjuB+sTImDB+nhfgYQ39STf4fmu1DHtz+oIUgiM1KkWtwcFw |
| | | sOujVT3hrnaL7UQc+hcL5W+sKIXhw0OVjaW0iwnBc47gqIQ45QY32PKRzv8eTguRYM9SS5YouEEZjv37 |
| | | EffbzbjBDdZyxZYQ12EB2qS0bWrJqRVazPDWkojwZbuZrsgZtDJ0iY1g12khEtTicMTvclwn2CKE32YJ |
| | | 7G5PORfZ1HtMCH7MOV4BrQ3XCe92+4onk5Nn2PolDAvWXnuOzAwzo6Nnx4Q3SrojwqfKeMxWMpsXWVs+ |
| | | 2WrfKRdbW1W6Hf0shM/33Y7my4PrleFZIfhAaWjU/e5ivlw+y3S2FySMtynjvcrwsFiLJv/RhPBB2ws1 |
| | | hK2WcBLBFf1qawlplwvxaQlxe786OOU4PBWsjSO85mBlQ8n99r/BisSdAas4FfgHpdEUZpwUX7sAAAAA |
| | | SUVORK5CYII= |
| | | vAAADrwBlbxySQAAA+xJREFUWEftV0loFUkYbvcNFzJi0lWdBEPQruqXKEYdcRgz4AYqeplBwYiXEUVB |
| | | UHAhCEG8iR509OBlmIsOjJ5EBvQSRVHzuvslxjAy8eCG+75GozF+f716L6873fqe2ykffDR59e9/1V8V |
| | | ow99KARtUg72J5aypGNN8xy2yJPWcleylb5gS13HnJdy+KSW6uJx3b8ZA7TKl6PbMPq3SbMsBUcpyf/2 |
| | | BP8PDh96kr32BX/rS/4O30789grfO1j/k4LQ6p8POO6XdFgpDNbDSZsn2Bt8u2MpWGdKsCPeBNMm3TZp |
| | | FaUc6/cW20pQEtpsflCllmwxjDbpLKOd9vAZuBPOx5J+86TyMdDbBxsdYLsn+SpUZYQy/imQILLdBIP3 |
| | | cxzEU7Dbns3WejXmcNK/NPGHkajabtUiLYO/nyOgXWdRFeUkDmdnWMOg2ACFFwEn8fzfFeaSxlpjIOlT |
| | | EHC0HVm/CstSC13B93sVFaOVszDQpwGuYGtQLipnQDlMyLzH12t2zJ8adH/TbeMbVLYROmmyDvjYRrLK |
| | | aS4Q3Y/gtWjFALtg6KSf4NW02Uj3HwSPzOuw9iAk24sI/p5rm3OV0wyOo+++ww7pzCIViVjvAk+02GyC |
| | | VlWnpUmw2Qggn+AV0eZ/A61oEtYsOttRwjlE5vy4L61KrabQmjBtV3I/JPtRUptcmy9UBuiM+tLc+bHs |
| | | aQ1Rn8rNnEC7Gpvr8KcqF0XoHVCbl0qB8p2OEspS8OZmySZrvwqNtbUDMRm3Yj9kj1uB9NXcwLkfjwyu |
| | | RAhoshuYcHMyGy4DT5T+jKrcjNbJh+yW75QIw62yqhDAvUghwV/Cybrw5UKTDn08GqmTJ9GCx660pscG |
| | | oPoq2MHzlUWjtN8skjZbRsGFdQpiJoBkVVkFnF3tLcCv+7ZZo31mcYZGLY5RL/kCiQrcaRLFTvrikOxc |
| | | YJF2PeZ5ZsTmAkNkCtaiW1YAkcTF1sT4YjXFEM3ekMADz+YztM8AULqlqE5nSL5wor3Zkew51nxU4WnP |
| | | Ij9DlVGLIWCtDhV6FzBWIJH9a3pNaZOGQRsNT6tjWSHB/6LK6OUA/ETJVER/O9dgwcQ7w7XLTG0yjSTO |
| | | Onp7Ny3A92VuuTD0rbcFbXsUMJonaQwnBV8Rniu4y2sGYbEe5emA8cORV6ZGY3n5UNycC9AKvBHZZRh+ |
| | | iqxoX9BlRWMZozvLLiSEV5V6HT2Bjz9iX0ftaAWE9sDoBV+UlOufY9FeWTmE5OhdgLH8Kxyvhv5GON3q |
| | | C3NzSvD19C70MTco4JTDZsbtrSzUlLP5DnBV3D745riOp5nr8F/OJcYV65++P2iTfNV/MPoQCcP4AKXR |
| | | FGYxo/VGAAAAAElFTkSuQmCC |
| | | </value> |
| | | </data> |
| | | <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | |
| | | /// <param name="filePath">æä»¶åå¨è·¯å¾ä»¥ååç§°</param> |
| | | public static void SaveConfig<T>(T config, string filePath) |
| | | { |
| | | if (config == null) |
| | | { |
| | | AsyncLogHelper.Error(nameof(config)); |
| | | throw new ArgumentNullException(nameof(config)); |
| | | } |
| | | if (filePath == null) |
| | | { |
| | | AsyncLogHelper.Error(nameof(filePath)); |
| | | AsyncLogHelper.Error(nameof(filePath)); |
| | | } |
| | | var json = JsonConvert.SerializeObject(config, Newtonsoft.Json.Formatting.Indented); |
| | | File.WriteAllText(filePath, json); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_SmartVisionCommon |
| | | { |
| | | /// <summary> |
| | | /// è®°å½å¾åå¢å¼ºç®ååæ° |
| | | /// </summary> |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | [TypeConverter(typeof(PropertySorter))] |
| | | public class RecordFilterData |
| | | { |
| | | /// <summary> |
| | | /// ç®åç±»å |
| | | /// </summary> |
| | | [Category("RecordFilterData"), PropertyOrder(1)] |
| | | [DisplayName("滤波类å")] |
| | | [Browsable(true)] |
| | | public FilterType FilterName { get; set; } = FilterType.å弿»¤æ³¢_MeanImage; |
| | | /// <summary> |
| | | /// æ©è宽度 |
| | | /// </summary> |
| | | [Category("RecordFilterData"), PropertyOrder(2)] |
| | | [DisplayName("æ©è宽度")] |
| | | [Browsable(true)] |
| | | public string MaskWidth { get; set; } |
| | | /// <summary> |
| | | /// æ©èé«åº¦ |
| | | /// </summary> |
| | | [Category("RecordFilterData"), PropertyOrder(3)] |
| | | [DisplayName("æ©èé«åº¦")] |
| | | [Browsable(true)] |
| | | public string MaskHight { get; set; } |
| | | /// <summary> |
| | | /// å¢å¼ºå å |
| | | /// </summary> |
| | | [Category("RecordFilterData"), PropertyOrder(4)] |
| | | [DisplayName("髿¯æ ¸å°ºå¯¸")] |
| | | [Browsable(true)] |
| | | public string GaussSize { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¤å¶ç¨æ·æ°æ® |
| | | /// </summary> |
| | | public RecordFilterData Clone() |
| | | { |
| | | return new RecordFilterData |
| | | { |
| | | MaskWidth = this.MaskWidth, |
| | | MaskHight = this.MaskHight, |
| | | GaussSize = this.GaussSize, |
| | | FilterName = this.FilterName |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// OperatorType |
| | | /// </summary> |
| | | public enum FilterType |
| | | { |
| | | /// <summary> |
| | | /// FilterTypeï¼MeanImage |
| | | /// </summary> |
| | | å弿»¤æ³¢_MeanImage, |
| | | /// <summary> |
| | | /// FilterTypeï¼GaussFilter |
| | | /// </summary> |
| | | 髿¯æ»¤æ³¢_GaussFilter, |
| | | /// <summary> |
| | | /// FilterTypeï¼MedianRect |
| | | /// </summary> |
| | | ä¸å¼æ»¤æ³¢_MedianRect |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_SmartVisionCommon |
| | | { |
| | | public class FilterManager |
| | | { |
| | | private Dictionary<FilterType, RecordFilterData> _filters; |
| | | private readonly string _dataFilePath; |
| | | private RecordFilterData _currentFilter; |
| | | private static FilterManager _instance; |
| | | /// <summary> |
| | | /// 线ç¨é |
| | | /// </summary> |
| | | private static readonly object _lock = new object(); |
| | | private FilterManager(string dataFilePath = "filters.json") |
| | | { |
| | | _dataFilePath = dataFilePath; |
| | | _filters = new Dictionary<FilterType, RecordFilterData>(); |
| | | _currentFilter = null; |
| | | LoadUsers(); |
| | | } |
| | | public static FilterManager Instance |
| | | { |
| | | get |
| | | { |
| | | // å鿣æ¥éå®ç¡®ä¿çº¿ç¨å®å
¨ |
| | | if (_instance == null) |
| | | { |
| | | lock (_lock) |
| | | { |
| | | if (_instance == null) |
| | | { |
| | | _instance = new FilterManager(); |
| | | } |
| | | } |
| | | } |
| | | return _instance; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å æ»¤æ³¢ç®å |
| | | /// </summary> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | public bool AddFilter(RecordFilterData filter) |
| | | { |
| | | if (_currentFilter == null) |
| | | { |
| | | _currentFilter = filter; |
| | | } |
| | | try |
| | | { |
| | | RecordFilterData recordFilterData = new RecordFilterData(); |
| | | recordFilterData.MaskWidth = filter.MaskWidth; |
| | | recordFilterData.MaskHight = filter.MaskHight; |
| | | recordFilterData.GaussSize = filter.GaussSize; |
| | | recordFilterData.FilterName = filter.FilterName; |
| | | _filters.Add(recordFilterData.FilterName, recordFilterData); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show("该ç®åå·²åå¨"); |
| | | } |
| | | SaveUsers(); |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤å¾åå¢å¼ºç®å |
| | | /// </summary> |
| | | /// <param name="filterName"></param> |
| | | /// <returns></returns> |
| | | public bool DeleteUser(RecordFilterData filter) |
| | | { |
| | | try |
| | | { |
| | | // 1. ä»åå
¸ä¸å é¤ |
| | | if (_filters.ContainsKey(filter.FilterName)) |
| | | { |
| | | _filters.Remove(filter.FilterName); |
| | | } |
| | | |
| | | // 2. 妿å é¤çæ¯å½åæ»¤æ³¢ï¼æ¸
空_currentFilter |
| | | if (_currentFilter != null && _currentFilter.FilterName == filter.FilterName) |
| | | { |
| | | _currentFilter = null; |
| | | } |
| | | |
| | | // 3. ä¿åæ´æ¹ |
| | | SaveUsers(); |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // è®°å½æ¥å¿ |
| | | Console.WriteLine($"å 餿»¤æ³¢å¤±è´¥: {ex.Message}"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åææç¨æ·å表 |
| | | /// </summary> |
| | | /// <returns>List<RecordUserData></returns> |
| | | public List<RecordFilterData> GetAllUsers() |
| | | { |
| | | return _filters.Select(u => u.Value.Clone()).ToList(); |
| | | } |
| | | |
| | | #region jsonæä»¶ä¿åå è½½ |
| | | /// <summary> |
| | | /// ä¿åç¨æ·æ°æ®å°JSONæä»¶ |
| | | /// </summary> |
| | | private void SaveUsers() |
| | | { |
| | | try |
| | | { |
| | | ConfigManager<Dictionary<FilterType, RecordFilterData>>.SaveConfig<Dictionary<FilterType, RecordFilterData>>(_filters, _dataFilePath); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"ä¿åå¾åå¢å¼ºç®å失败ï¼{ex.Message}", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»JSONæä»¶å è½½ç¨æ·æ°æ® |
| | | /// </summary> |
| | | private void LoadUsers() |
| | | { |
| | | try |
| | | { |
| | | if (File.Exists(_dataFilePath)) |
| | | { |
| | | _filters = ConfigManager<Dictionary<FilterType, RecordFilterData>>.LoadConfig<Dictionary<FilterType, RecordFilterData>>(_dataFilePath) ?? new Dictionary<FilterType, RecordFilterData>(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"å è½½å¾åå¢å¼ºç®å失败ï¼{ex.Message}", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | _filters = new Dictionary<FilterType, RecordFilterData>(); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_SmartVisionCommon |
| | | { |
| | | /// <summary> |
| | | /// è®°å½å¾åå¢å¼ºç®ååæ° |
| | | /// </summary> |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | [TypeConverter(typeof(PropertySorter))] |
| | | public class RecordImageEnhancementData |
| | | { |
| | | /// <summary> |
| | | /// ç®åç±»å |
| | | /// </summary> |
| | | [Category("RecordImageEnhancementData"), PropertyOrder(1)] |
| | | [DisplayName("ç®åç±»å")] |
| | | [Browsable(true)] |
| | | public ImageEnhancementDataType FilterName { get; set; } = ImageEnhancementDataType.æ¯ä¾å¢å¼º_ScaleImageMax; |
| | | /// <summary> |
| | | /// æ©è宽度 |
| | | /// </summary> |
| | | [Category("RecordImageEnhancementData"), PropertyOrder(2)] |
| | | [DisplayName("æ©è宽度")] |
| | | [Browsable(true)] |
| | | public string MaskWidth { get; set; } |
| | | /// <summary> |
| | | /// æ©èé«åº¦ |
| | | /// </summary> |
| | | [Category("RecordImageEnhancementData"), PropertyOrder(3)] |
| | | [DisplayName("æ©èé«åº¦")] |
| | | [Browsable(true)] |
| | | public string MaskHight { get; set; } |
| | | /// <summary> |
| | | /// å¢å¼ºå å |
| | | /// </summary> |
| | | [Category("RecordImageEnhancementData"), PropertyOrder(4)] |
| | | [DisplayName("å¢å¼ºå å")] |
| | | [Browsable(true)] |
| | | public string Factor { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤å¶ç¨æ·æ°æ® |
| | | /// </summary> |
| | | public RecordImageEnhancementData Clone() |
| | | { |
| | | return new RecordImageEnhancementData |
| | | { |
| | | MaskWidth = this.MaskWidth, |
| | | MaskHight = this.MaskHight, |
| | | Factor = this.Factor, |
| | | FilterName = this.FilterName |
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// OperatorType |
| | | /// </summary> |
| | | public enum ImageEnhancementDataType |
| | | { |
| | | /// </summary> |
| | | è¾¹ç¼å¢å¼º_ImageEmphasize, |
| | | |
| | | /// </summary> |
| | | ç´æ¹å¾åè¡¡å_EquHistoImage, |
| | | |
| | | /// </summary> |
| | | æ¯ä¾å¢å¼º_ScaleImageMax |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.VisualBasic.ApplicationServices; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_SmartVisionCommon |
| | | { |
| | | public class ImageEnhancementManager |
| | | { |
| | | private Dictionary<ImageEnhancementDataType, RecordImageEnhancementData> _filters; |
| | | private readonly string _dataFilePath; |
| | | private RecordImageEnhancementData _currentFilter; |
| | | private static ImageEnhancementManager _instance; |
| | | /// <summary> |
| | | /// 线ç¨é |
| | | /// </summary> |
| | | private static readonly object _lock = new object(); |
| | | private ImageEnhancementManager(string dataFilePath = "imageEnhancements.json") |
| | | { |
| | | _dataFilePath = dataFilePath; |
| | | _filters = new Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>(); |
| | | _currentFilter = null; |
| | | LoadUsers(); |
| | | } |
| | | public static ImageEnhancementManager Instance |
| | | { |
| | | get |
| | | { |
| | | // å鿣æ¥éå®ç¡®ä¿çº¿ç¨å®å
¨ |
| | | if (_instance == null) |
| | | { |
| | | lock (_lock) |
| | | { |
| | | if (_instance == null) |
| | | { |
| | | _instance = new ImageEnhancementManager(); |
| | | } |
| | | } |
| | | } |
| | | return _instance; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å å¾åå¢å¼ºç®å |
| | | /// </summary> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | public bool AddUser(RecordImageEnhancementData filter) |
| | | { |
| | | if (_currentFilter == null) |
| | | { |
| | | _currentFilter = filter; |
| | | } |
| | | |
| | | try |
| | | { |
| | | RecordImageEnhancementData recordImageEnhancementData = new RecordImageEnhancementData(); |
| | | recordImageEnhancementData.MaskWidth = filter.MaskWidth; |
| | | recordImageEnhancementData.MaskHight = filter.MaskHight; |
| | | recordImageEnhancementData.Factor = filter.Factor; |
| | | recordImageEnhancementData.FilterName = filter.FilterName; |
| | | _filters.Add(recordImageEnhancementData.FilterName, recordImageEnhancementData); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show("该ç®åå·²åå¨"); |
| | | } |
| | | SaveUsers(); |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤å¾åå¢å¼ºç®å |
| | | /// </summary> |
| | | /// <param name="filter"></param> |
| | | /// <returns></returns> |
| | | public bool DeleteUser(RecordImageEnhancementData filter) |
| | | { |
| | | try |
| | | { |
| | | // 1. ä»åå
¸ä¸å é¤ |
| | | if (_filters.ContainsKey(filter.FilterName)) |
| | | { |
| | | _filters.Remove(filter.FilterName); |
| | | } |
| | | |
| | | // 2. 妿å é¤çæ¯å½åæ»¤æ³¢ï¼æ¸
空_currentFilter |
| | | if (_currentFilter != null && _currentFilter.FilterName == filter.FilterName) |
| | | { |
| | | _currentFilter = null; |
| | | } |
| | | |
| | | // 3. ä¿åæ´æ¹ |
| | | SaveUsers(); |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // è®°å½æ¥å¿ |
| | | Console.WriteLine($"å 餿»¤æ³¢å¤±è´¥: {ex.Message}"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åææç¨æ·å表 |
| | | /// </summary> |
| | | /// <returns>List<RecordUserData></returns> |
| | | public List<RecordImageEnhancementData> GetAllUsers() |
| | | { |
| | | return _filters.Select(u => u.Value.Clone()).ToList(); |
| | | } |
| | | |
| | | #region jsonæä»¶ä¿åå è½½ |
| | | /// <summary> |
| | | /// ä¿åç¨æ·æ°æ®å°JSONæä»¶ |
| | | /// </summary> |
| | | private void SaveUsers() |
| | | { |
| | | try |
| | | { |
| | | ConfigManager<Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>>.SaveConfig<Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>>(_filters, _dataFilePath); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"ä¿åå¾åå¢å¼ºç®å失败ï¼{ex.Message}", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»JSONæä»¶å è½½ç¨æ·æ°æ® |
| | | /// </summary> |
| | | private void LoadUsers() |
| | | { |
| | | try |
| | | { |
| | | if (File.Exists(_dataFilePath)) |
| | | { |
| | | _filters = ConfigManager<Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>>.LoadConfig<Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>>(_dataFilePath) ?? new Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"å è½½å¾åå¢å¼ºç®å失败ï¼{ex.Message}", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | _filters = new Dictionary<ImageEnhancementDataType, RecordImageEnhancementData>(); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | { |
| | | _currentUser = user; |
| | | } |
| | | if (!CheckPermission(true)) |
| | | { |
| | | MessageBox.Show("éè¦ç®¡çåæéæè½æ·»å ç¨æ·ï¼", "æéä¸è¶³", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return false; |
| | | } |
| | | //if (!CheckPermission(true)) |
| | | //{ |
| | | // MessageBox.Show("éè¦ç®¡çåæéæè½æ·»å ç¨æ·ï¼", "æéä¸è¶³", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | // return false; |
| | | //} |
| | | |
| | | if (_users.Any(u => u.Value.EmployeeNumber == user.EmployeeNumber || |
| | | u.Value.EmployeeAccount == user.EmployeeAccount)) |
| | |
| | | MessageBox.Show("åå·¥å·æè´¦å·å·²åå¨ï¼", "æ·»å 失败", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return false; |
| | | } |
| | | |
| | | RecordUserData recordUserData = new RecordUserData(); |
| | | recordUserData.EmployeeNumber = user.EmployeeNumber; |
| | | recordUserData.EmployeeAccount = user.EmployeeAccount; |
| | |
| | | /// <returns>æ¯å¦å 餿å</returns> |
| | | public bool DeleteUser(string employeeNumber) |
| | | { |
| | | if (!CheckPermission(true)) |
| | | { |
| | | MessageBox.Show("éè¦ç®¡çåæéæè½å é¤ç¨æ·ï¼", "æéä¸è¶³", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return false; |
| | | } |
| | | //if (!CheckPermission(true)) |
| | | //{ |
| | | // MessageBox.Show("éè¦ç®¡çåæéæè½å é¤ç¨æ·ï¼", "æéä¸è¶³", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | // return false; |
| | | //} |
| | | |
| | | // 管çåä¸è½å é¤èªå·± |
| | | if (_currentUser.EmployeeNumber == employeeNumber) |
| | | { |
| | | MessageBox.Show("ä¸è½å é¤å½åç»å½çç¨æ·ï¼", "å é¤å¤±è´¥", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return false; |
| | | } |
| | | //// 管çåä¸è½å é¤èªå·± |
| | | //if (_currentUser.EmployeeNumber == employeeNumber) |
| | | //{ |
| | | // MessageBox.Show("ä¸è½å é¤å½åç»å½çç¨æ·ï¼", "å é¤å¤±è´¥", MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | // return false; |
| | | //} |
| | | |
| | | var user = _users.FirstOrDefault(u => u.Value.EmployeeNumber == employeeNumber); |
| | | if (user.Value != null) |
| | |
| | | // |
| | | // RightContextMenuStrip |
| | | // |
| | | RightContextMenuStrip.ImageScalingSize = new Size(20, 20); |
| | | RightContextMenuStrip.Items.AddRange(new ToolStripItem[] { resizeImageStripMenuItem, autoSizeStripMenuItem, mouseIndexStripMenuItem }); |
| | | RightContextMenuStrip.Name = "RightContextMenuStrip"; |
| | | RightContextMenuStrip.Size = new Size(149, 70); |
| | | RightContextMenuStrip.Size = new Size(169, 82); |
| | | // |
| | | // resizeImageStripMenuItem |
| | | // |
| | | resizeImageStripMenuItem.Name = "resizeImageStripMenuItem"; |
| | | resizeImageStripMenuItem.Size = new Size(148, 22); |
| | | resizeImageStripMenuItem.Size = new Size(168, 26); |
| | | resizeImageStripMenuItem.Text = "éæ°ç¼©æ¾å¾å"; |
| | | resizeImageStripMenuItem.Click += resizeImageStripMenuItem_Click; |
| | | // |
| | |
| | | autoSizeStripMenuItem.Checked = true; |
| | | autoSizeStripMenuItem.CheckState = CheckState.Checked; |
| | | autoSizeStripMenuItem.Name = "autoSizeStripMenuItem"; |
| | | autoSizeStripMenuItem.Size = new Size(148, 22); |
| | | autoSizeStripMenuItem.Size = new Size(168, 26); |
| | | autoSizeStripMenuItem.Text = "å¾åèªå¨éåº"; |
| | | autoSizeStripMenuItem.Click += autoSizeStripMenuItem_Click; |
| | | // |
| | | // mouseIndexStripMenuItem |
| | | // |
| | | mouseIndexStripMenuItem.Name = "mouseIndexStripMenuItem"; |
| | | mouseIndexStripMenuItem.Size = new Size(148, 22); |
| | | mouseIndexStripMenuItem.Size = new Size(168, 26); |
| | | mouseIndexStripMenuItem.Text = "é¼ æ ç´¢å¼åç´ "; |
| | | mouseIndexStripMenuItem.Click += mouseIndexStripMenuItem_Click; |
| | | // |
| | | // BtmStatusStrip |
| | | // |
| | | BtmStatusStrip.ImageScalingSize = new Size(20, 20); |
| | | BtmStatusStrip.Items.AddRange(new ToolStripItem[] { StatusLabel }); |
| | | BtmStatusStrip.Location = new Point(0, 220); |
| | | BtmStatusStrip.Location = new Point(0, 280); |
| | | BtmStatusStrip.Name = "BtmStatusStrip"; |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 16, 0); |
| | | BtmStatusStrip.Size = new Size(274, 22); |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 20, 0); |
| | | BtmStatusStrip.Size = new Size(342, 22); |
| | | BtmStatusStrip.TabIndex = 44; |
| | | BtmStatusStrip.Text = "statusStrip1"; |
| | | // |
| | | // StatusLabel |
| | | // |
| | | StatusLabel.Name = "StatusLabel"; |
| | | StatusLabel.Size = new Size(0, 17); |
| | | StatusLabel.Size = new Size(0, 16); |
| | | // |
| | | // pnl |
| | | // |
| | | pnl.Controls.Add(hWindowControl); |
| | | pnl.Dock = DockStyle.Fill; |
| | | pnl.Location = new Point(0, 0); |
| | | pnl.Margin = new Padding(4); |
| | | pnl.Name = "pnl"; |
| | | pnl.Size = new Size(274, 220); |
| | | pnl.Size = new Size(342, 280); |
| | | pnl.TabIndex = 45; |
| | | // |
| | | // hWindowControl |
| | |
| | | hWindowControl.Dock = DockStyle.Fill; |
| | | hWindowControl.HDoubleClickToFitContent = true; |
| | | hWindowControl.HDrawingObjectsModifier = HalconDotNet.HSmartWindowControl.DrawingObjectsModifier.None; |
| | | hWindowControl.HImagePart = new Rectangle(0, 88, 2591, 1767); |
| | | hWindowControl.HImagePart = new Rectangle(-321, -152, 3233, 2247); |
| | | hWindowControl.HKeepAspectRatio = true; |
| | | hWindowControl.HMoveContent = true; |
| | | hWindowControl.HZoomContent = HalconDotNet.HSmartWindowControl.ZoomContent.WheelForwardZoomsIn; |
| | | hWindowControl.Location = new Point(0, 0); |
| | | hWindowControl.Margin = new Padding(4); |
| | | hWindowControl.Margin = new Padding(5); |
| | | hWindowControl.Name = "hWindowControl"; |
| | | hWindowControl.Size = new Size(274, 220); |
| | | hWindowControl.Size = new Size(342, 280); |
| | | hWindowControl.TabIndex = 43; |
| | | hWindowControl.WindowSize = new Size(274, 220); |
| | | hWindowControl.WindowSize = new Size(342, 280); |
| | | hWindowControl.HMouseMove += hWindowControl_HMouseMove; |
| | | hWindowControl.HMouseDown += hWindowControl_HMouseDown; |
| | | hWindowControl.HMouseUp += hWindowControl_HMouseUp; |
| | | hWindowControl.HMouseDoubleClick += hWindowControl_HMouseDoubleClick; |
| | | // |
| | | // UserHSmartWindowControl |
| | | // |
| | | AutoScaleDimensions = new SizeF(96F, 96F); |
| | | AutoScaleDimensions = new SizeF(120F, 120F); |
| | | AutoScaleMode = AutoScaleMode.Dpi; |
| | | Controls.Add(pnl); |
| | | Controls.Add(BtmStatusStrip); |
| | | Margin = new Padding(4); |
| | | Margin = new Padding(5); |
| | | Name = "UserHSmartWindowControl"; |
| | | Size = new Size(274, 242); |
| | | Size = new Size(342, 302); |
| | | Load += UserHSmartWindowControl_Load; |
| | | SizeChanged += UserHSmartWindowControl_SizeChanged; |
| | | MouseWheel += UserHSmartWindowControl_HMouseWheel; |
| | |
| | | using HalconDotNet; |
| | | using Sunny.UI.Win32; |
| | | using System.Diagnostics; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace LB_VisionControl |
| | | { |
| | | public delegate void Control_MouseDown(object sender, MouseEventArgs e); |
| | | public delegate void Control_MouseDoubleClick(object sender, MouseEventArgs e); |
| | | public partial class UserHSmartWindowControl : UserControl |
| | | { |
| | | public UserHSmartWindowControl() |
| | |
| | | // 设置é»è®¤åä½ä¸º 20å· monoåä½å ç² |
| | | set_display_font(this.hWindowControl.HalconWindow, 20, "mono", "true", "false"); |
| | | } |
| | | |
| | | public event Control_MouseDown event_MouseDown; |
| | | public event Control_MouseDoubleClick event_MouseDoubleClick; |
| | | private void event_mouseDown(object sender, MouseEventArgs e) |
| | | { |
| | | if (event_MouseDown != null) |
| | | { |
| | | event_MouseDown(sender, e); |
| | | } |
| | | } |
| | | private void event_mouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | if (event_MouseDoubleClick != null) |
| | | { |
| | | event_MouseDoubleClick(sender, e); |
| | | } |
| | | } |
| | | private void UserHSmartWindowControl_Load(object sender, EventArgs e) |
| | | { |
| | | // å¯ç¨åç¼å²åå°éªç |
| | |
| | | default: |
| | | break; |
| | | } |
| | | MouseEventArgs mouseEventArgs = new MouseEventArgs(e.Button, e.Clicks, (int)e.X, (int)e.Y, e.Delta); |
| | | event_mouseDown(sender, mouseEventArgs); |
| | | } |
| | | catch { } |
| | | } |
| | |
| | | { |
| | | ShowHoImage(hImage); |
| | | } |
| | | |
| | | private void hWindowControl_HMouseDoubleClick(object sender, HMouseEventArgs e) |
| | | { |
| | | MouseEventArgs mouseEventArgs = new MouseEventArgs(e.Button, e.Clicks, (int)e.X, (int)e.Y, e.Delta); |
| | | event_mouseDoubleClick(sender, mouseEventArgs); |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Collections.Concurrent; |
| | | using LB_SmartVisionCommon; |
| | | using System.Collections.Concurrent; |
| | | using System.Diagnostics; |
| | | using System.Xml.Linq; |
| | | |
| | |
| | | bool result = Context.ExecuteNode(currentNode); |
| | | #if DEBUG |
| | | Debug.WriteLine(DateTime.Now.ToString("[yyyy:MM:dd:HH:mm:ss:fff] ") + $"æ§è¡èç¹[{currentNode.Text}],ç»æä¸º{result}"); |
| | | AsyncLogHelper.Debug(DateTime.Now.ToString("[yyyy:MM:dd:HH:mm:ss:fff] ") + $"æ§è¡èç¹[{currentNode.Text}],ç»æä¸º{result}"); |
| | | #endif |
| | | context.BranchResults.TryAdd(context.CurrentBranchName, currentNode.Result); |
| | | currentNode.Result = result; |
| | |
| | | [Node("ç¸æºåå¾", "ååå·¥å
·", "Basic", "ç¸æºåå¾")] |
| | | public void ç¸æºåå¾(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Dæç¹å·¥å
·", "Haclon2Då·¥å
·", "Basic", "Halcon2Dæç¹å·¥å
·")] |
| | | [Node("读ç å·¥å
·", "ååå·¥å
·", "Basic", "读ç å·¥å
·")] |
| | | public void 读ç å·¥å
·(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Dæç¹å·¥å
·", "Halcon2Då·¥å
·", "Basic", "Halcon2Dæç¹å·¥å
·")] |
| | | public void Halcon2Dæç¹å·¥å
·(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("é讯模å", "é讯模åå·¥å
·", "Basic", "é讯模å")] |
| | | public void é讯模å(FlowNode node) { RunNodeAsync(node); } |
| | | // [Process("Halconå¾åå¢å¼º", Category = "Halcon2Då·¥å
·", Description = "å建å¾åå¢å¼ºå·¥å
·")] |
| | | |
| | | [Node("Halcon2Då¾åå¢å¼º", "Halcon2Då·¥å
·", "Basic", "Halcon2Då¾åå¢å¼º")] |
| | | public void Halcon2Då¾åå¢å¼º(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | [Node("Halcon2Då¾å滤波", "Halcon2Då·¥å
·", "Basic", "Halcon2Då¾å滤波")] |
| | | public void Halcon2Då¾å滤波(FlowNode node) { RunNodeAsync(node); } |
| | | |
| | | #endregion |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¾åå¢å¼ºç®æ³-è¾¹ç¼å¢å¼º |
| | | /// </summary> |
| | | /// <param name="ho_Image">å¾
æµå¾ç</param> |
| | | /// <param name="hv_ImageEnhancementType">滤波å¨ç±»å(mean/gauss/median)</param> |
| | | /// <param name="hv_Wid">æ©è宽</param> |
| | | /// <param name="hv_High">æ©èé«</param> |
| | | /// <param name="hv_Fac">å¢å¼ºå å</param> |
| | | |
| | | public static void ImageEnhancement(HObject ho_Image, out HObject ho_OutImage, string hv_ImageEnhancementType, int hv_Wid, int hv_High, double hv_Fac) |
| | | { |
| | | HOperatorSet.GenEmptyObj(out ho_OutImage); |
| | | |
| | | try |
| | | { |
| | | // æ ¹æ®æ»¤æ³¢å¨ç±»åæ§è¡ç¸åºæä½ |
| | | switch (hv_ImageEnhancementType.ToLower()) |
| | | { |
| | | case "emphasize": |
| | | HOperatorSet.Emphasize(ho_Image, out ho_OutImage, hv_Wid, hv_High, hv_Fac); |
| | | break; |
| | | |
| | | case "scaleimagemax": |
| | | HOperatorSet.ScaleImageMax(ho_Image, out ho_OutImage); |
| | | break; |
| | | |
| | | case "equhisto": |
| | | HOperatorSet.EquHistoImage(ho_Image, out ho_OutImage); |
| | | break; |
| | | |
| | | default: |
| | | throw new ArgumentException($"䏿¯æç滤波å¨ç±»å: {hv_ImageEnhancementType}"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // ç¡®ä¿å¼å¸¸æ¶éæ¾èµæº |
| | | ho_OutImage?.Dispose(); |
| | | throw new Exception($"å¾å滤波失败: {ex.Message}", ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¾å滤波 |
| | | /// </summary> |
| | | /// <param name="ho_Image">å¾
æµå¾ç</param> |
| | | /// <param name="ho_OutImage">è¾åºå¾ç</param> |
| | | /// <param name="hv_FilterType">滤波å¨ç±»å(mean/gauss/median)</param> |
| | | /// <param name="hv_Wid">æ©è宽</param> |
| | | /// <param name="hv_High">æ©èé«</param> |
| | | /// <param name="hv_Size">髿¯æ ¸å°ºå¯¸</param> |
| | | public static void Filter(HObject ho_Image, out HObject ho_OutImage, string hv_FilterType, int hv_Wid, int hv_High, int hv_Size) |
| | | { |
| | | // åå§åè¾åºå¯¹è±¡ |
| | | HOperatorSet.GenEmptyObj(out ho_OutImage); |
| | | |
| | | try |
| | | { |
| | | // æ ¹æ®æ»¤æ³¢å¨ç±»åæ§è¡ç¸åºæä½ |
| | | switch (hv_FilterType.ToLower()) |
| | | { |
| | | case "mean": |
| | | HOperatorSet.MeanImage(ho_Image, out ho_OutImage, hv_Wid, hv_High); |
| | | break; |
| | | |
| | | case "gauss": |
| | | case "guass": // å
¼å®¹æ¼åé误 |
| | | HOperatorSet.GaussFilter(ho_Image, out ho_OutImage, hv_Size); |
| | | break; |
| | | |
| | | case "median": |
| | | HOperatorSet.MedianRect(ho_Image, out ho_OutImage, hv_Wid, hv_High); |
| | | break; |
| | | |
| | | default: |
| | | throw new ArgumentException($"䏿¯æç滤波å¨ç±»å: {hv_FilterType}"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // ç¡®ä¿å¼å¸¸æ¶éæ¾èµæº |
| | | ho_OutImage?.Dispose(); |
| | | throw new Exception($"å¾å滤波失败: {ex.Message}", ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¡å°ºç®æ³ |
| | | /// </summary> |
| | | /// <param name="ho_Image">å¾
æµå¾ç</param> |
| | |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)InputImage).Width, ((Bitmap)InputImage).Height); |
| | | BitmapData srcBmpData = ((Bitmap)InputImage).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)InputImage).Width, ((Bitmap)InputImage).Height, 0, "byte", ((Bitmap)InputImage).Width, ((Bitmap)InputImage).Height, 0, 0, -1, 0); |
| | | ((Bitmap)InputImage).UnlockBits(srcBmpData); |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | |
| | | // tablePanelParas |
| | | // |
| | | tablePanelParas.ColumnCount = 4; |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 90F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 116F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 90F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 116F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tablePanelParas.Controls.Add(dtxtMaxDistDeviation, 3, 7); |
| | | tablePanelParas.Controls.Add(dtxtMinDistDeviation, 1, 7); |
| | |
| | | tablePanelParas.Controls.Add(label32, 2, 7); |
| | | tablePanelParas.Controls.Add(dtxtMinContlength, 1, 4); |
| | | tablePanelParas.Dock = DockStyle.Fill; |
| | | tablePanelParas.Location = new Point(3, 3); |
| | | tablePanelParas.Margin = new Padding(2, 3, 2, 3); |
| | | tablePanelParas.Location = new Point(4, 4); |
| | | tablePanelParas.Margin = new Padding(3, 4, 3, 4); |
| | | tablePanelParas.Name = "tablePanelParas"; |
| | | tablePanelParas.RowCount = 12; |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 8.333333F)); |
| | |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 8.333333F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 8.333333F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 8.333333F)); |
| | | tablePanelParas.Size = new Size(386, 516); |
| | | tablePanelParas.Size = new Size(498, 611); |
| | | tablePanelParas.TabIndex = 0; |
| | | // |
| | | // dtxtMaxDistDeviation |
| | | // |
| | | dtxtMaxDistDeviation.Location = new Point(286, 297); |
| | | dtxtMaxDistDeviation.Location = new Point(369, 354); |
| | | dtxtMaxDistDeviation.Margin = new Padding(4); |
| | | dtxtMaxDistDeviation.Name = "dtxtMaxDistDeviation"; |
| | | dtxtMaxDistDeviation.Size = new Size(97, 23); |
| | | dtxtMaxDistDeviation.Size = new Size(124, 27); |
| | | dtxtMaxDistDeviation.TabIndex = 36; |
| | | dtxtMaxDistDeviation.Text = "0"; |
| | | // |
| | | // dtxtMinDistDeviation |
| | | // |
| | | dtxtMinDistDeviation.Location = new Point(93, 297); |
| | | dtxtMinDistDeviation.Location = new Point(120, 354); |
| | | dtxtMinDistDeviation.Margin = new Padding(4); |
| | | dtxtMinDistDeviation.Name = "dtxtMinDistDeviation"; |
| | | dtxtMinDistDeviation.Size = new Size(97, 23); |
| | | dtxtMinDistDeviation.Size = new Size(124, 27); |
| | | dtxtMinDistDeviation.TabIndex = 35; |
| | | dtxtMinDistDeviation.Text = "0"; |
| | | // |
| | | // dtxtMaxDistMean |
| | | // |
| | | dtxtMaxDistMean.Location = new Point(286, 255); |
| | | dtxtMaxDistMean.Location = new Point(369, 304); |
| | | dtxtMaxDistMean.Margin = new Padding(4); |
| | | dtxtMaxDistMean.Name = "dtxtMaxDistMean"; |
| | | dtxtMaxDistMean.Size = new Size(97, 23); |
| | | dtxtMaxDistMean.Size = new Size(124, 27); |
| | | dtxtMaxDistMean.TabIndex = 34; |
| | | dtxtMaxDistMean.Text = "0"; |
| | | // |
| | | // dtxtMinDistMean |
| | | // |
| | | dtxtMinDistMean.Location = new Point(93, 255); |
| | | dtxtMinDistMean.Location = new Point(120, 304); |
| | | dtxtMinDistMean.Margin = new Padding(4); |
| | | dtxtMinDistMean.Name = "dtxtMinDistMean"; |
| | | dtxtMinDistMean.Size = new Size(97, 23); |
| | | dtxtMinDistMean.Size = new Size(124, 27); |
| | | dtxtMinDistMean.TabIndex = 33; |
| | | dtxtMinDistMean.Text = "0"; |
| | | // |
| | | // dtxtMaxAnisometry |
| | | // |
| | | dtxtMaxAnisometry.Location = new Point(286, 213); |
| | | dtxtMaxAnisometry.Location = new Point(369, 254); |
| | | dtxtMaxAnisometry.Margin = new Padding(4); |
| | | dtxtMaxAnisometry.Name = "dtxtMaxAnisometry"; |
| | | dtxtMaxAnisometry.Size = new Size(97, 23); |
| | | dtxtMaxAnisometry.Size = new Size(124, 27); |
| | | dtxtMaxAnisometry.TabIndex = 32; |
| | | dtxtMaxAnisometry.Text = "0"; |
| | | // |
| | | // dtxtMinAnisometry |
| | | // |
| | | dtxtMinAnisometry.Location = new Point(93, 213); |
| | | dtxtMinAnisometry.Location = new Point(120, 254); |
| | | dtxtMinAnisometry.Margin = new Padding(4); |
| | | dtxtMinAnisometry.Name = "dtxtMinAnisometry"; |
| | | dtxtMinAnisometry.Size = new Size(97, 23); |
| | | dtxtMinAnisometry.Size = new Size(124, 27); |
| | | dtxtMinAnisometry.TabIndex = 31; |
| | | dtxtMinAnisometry.Text = "0"; |
| | | // |
| | | // dtxtMaxContlength |
| | | // |
| | | dtxtMaxContlength.Location = new Point(286, 171); |
| | | dtxtMaxContlength.Location = new Point(369, 204); |
| | | dtxtMaxContlength.Margin = new Padding(4); |
| | | dtxtMaxContlength.Name = "dtxtMaxContlength"; |
| | | dtxtMaxContlength.Size = new Size(97, 23); |
| | | dtxtMaxContlength.Size = new Size(124, 27); |
| | | dtxtMaxContlength.TabIndex = 30; |
| | | dtxtMaxContlength.Text = "0"; |
| | | // |
| | | // label1 |
| | | // |
| | | label1.AutoSize = true; |
| | | label1.Location = new Point(2, 0); |
| | | label1.Margin = new Padding(2, 0, 2, 0); |
| | | label1.MaximumSize = new Size(0, 28); |
| | | label1.MinimumSize = new Size(0, 28); |
| | | label1.Location = new Point(3, 0); |
| | | label1.MaximumSize = new Size(0, 33); |
| | | label1.MinimumSize = new Size(0, 33); |
| | | label1.Name = "label1"; |
| | | label1.Size = new Size(68, 28); |
| | | label1.Size = new Size(84, 33); |
| | | label1.TabIndex = 0; |
| | | label1.Text = "æå°ç°åº¦å¼"; |
| | | label1.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMinThreshold |
| | | // |
| | | dtxtMinThreshold.Location = new Point(92, 3); |
| | | dtxtMinThreshold.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinThreshold.Location = new Point(119, 4); |
| | | dtxtMinThreshold.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinThreshold.Name = "dtxtMinThreshold"; |
| | | dtxtMinThreshold.Size = new Size(99, 23); |
| | | dtxtMinThreshold.Size = new Size(126, 27); |
| | | dtxtMinThreshold.TabIndex = 5; |
| | | dtxtMinThreshold.Text = "0"; |
| | | // |
| | | // label2 |
| | | // |
| | | label2.AutoSize = true; |
| | | label2.Location = new Point(195, 0); |
| | | label2.Margin = new Padding(2, 0, 2, 0); |
| | | label2.MaximumSize = new Size(0, 28); |
| | | label2.MinimumSize = new Size(0, 28); |
| | | label2.Location = new Point(252, 0); |
| | | label2.MaximumSize = new Size(0, 33); |
| | | label2.MinimumSize = new Size(0, 33); |
| | | label2.Name = "label2"; |
| | | label2.Size = new Size(68, 28); |
| | | label2.Size = new Size(84, 33); |
| | | label2.TabIndex = 1; |
| | | label2.Text = "æå¤§ç°åº¦å¼"; |
| | | label2.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMaxThreshold |
| | | // |
| | | dtxtMaxThreshold.Location = new Point(285, 3); |
| | | dtxtMaxThreshold.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxThreshold.Location = new Point(368, 4); |
| | | dtxtMaxThreshold.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxThreshold.Name = "dtxtMaxThreshold"; |
| | | dtxtMaxThreshold.Size = new Size(98, 23); |
| | | dtxtMaxThreshold.Size = new Size(125, 27); |
| | | dtxtMaxThreshold.TabIndex = 6; |
| | | dtxtMaxThreshold.Text = "255"; |
| | | // |
| | | // label3 |
| | | // |
| | | label3.AutoSize = true; |
| | | label3.Location = new Point(2, 42); |
| | | label3.Margin = new Padding(2, 0, 2, 0); |
| | | label3.MaximumSize = new Size(0, 28); |
| | | label3.MinimumSize = new Size(0, 28); |
| | | label3.Location = new Point(3, 50); |
| | | label3.MaximumSize = new Size(0, 33); |
| | | label3.MinimumSize = new Size(0, 33); |
| | | label3.Name = "label3"; |
| | | label3.Size = new Size(56, 28); |
| | | label3.Size = new Size(69, 33); |
| | | label3.TabIndex = 2; |
| | | label3.Text = "æå°é¢ç§¯"; |
| | | label3.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMinArea |
| | | // |
| | | dtxtMinArea.Location = new Point(92, 45); |
| | | dtxtMinArea.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinArea.Location = new Point(119, 54); |
| | | dtxtMinArea.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinArea.Name = "dtxtMinArea"; |
| | | dtxtMinArea.Size = new Size(99, 23); |
| | | dtxtMinArea.Size = new Size(126, 27); |
| | | dtxtMinArea.TabIndex = 7; |
| | | dtxtMinArea.Text = "0"; |
| | | // |
| | | // label4 |
| | | // |
| | | label4.AutoSize = true; |
| | | label4.Location = new Point(195, 42); |
| | | label4.Margin = new Padding(2, 0, 2, 0); |
| | | label4.MaximumSize = new Size(0, 28); |
| | | label4.MinimumSize = new Size(0, 28); |
| | | label4.Location = new Point(252, 50); |
| | | label4.MaximumSize = new Size(0, 33); |
| | | label4.MinimumSize = new Size(0, 33); |
| | | label4.Name = "label4"; |
| | | label4.Size = new Size(56, 28); |
| | | label4.Size = new Size(69, 33); |
| | | label4.TabIndex = 3; |
| | | label4.Text = "æå¤§é¢ç§¯"; |
| | | label4.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMaxArea |
| | | // |
| | | dtxtMaxArea.Location = new Point(285, 45); |
| | | dtxtMaxArea.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxArea.Location = new Point(368, 54); |
| | | dtxtMaxArea.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxArea.Name = "dtxtMaxArea"; |
| | | dtxtMaxArea.Size = new Size(98, 23); |
| | | dtxtMaxArea.Size = new Size(125, 27); |
| | | dtxtMaxArea.TabIndex = 8; |
| | | dtxtMaxArea.Text = "0"; |
| | | // |
| | | // label10 |
| | | // |
| | | label10.AutoSize = true; |
| | | label10.Location = new Point(2, 84); |
| | | label10.Margin = new Padding(2, 0, 2, 0); |
| | | label10.MaximumSize = new Size(0, 28); |
| | | label10.MinimumSize = new Size(0, 28); |
| | | label10.Location = new Point(3, 100); |
| | | label10.MaximumSize = new Size(0, 33); |
| | | label10.MinimumSize = new Size(0, 33); |
| | | label10.Name = "label10"; |
| | | label10.Size = new Size(75, 28); |
| | | label10.Size = new Size(93, 33); |
| | | label10.TabIndex = 9; |
| | | label10.Text = "æå°çºµåæ Y"; |
| | | label10.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMinRow |
| | | // |
| | | dtxtMinRow.Location = new Point(92, 87); |
| | | dtxtMinRow.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinRow.Location = new Point(119, 104); |
| | | dtxtMinRow.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinRow.Name = "dtxtMinRow"; |
| | | dtxtMinRow.Size = new Size(99, 23); |
| | | dtxtMinRow.Size = new Size(126, 27); |
| | | dtxtMinRow.TabIndex = 9; |
| | | dtxtMinRow.Text = "0"; |
| | | // |
| | | // label11 |
| | | // |
| | | label11.AutoSize = true; |
| | | label11.Location = new Point(195, 84); |
| | | label11.Margin = new Padding(2, 0, 2, 0); |
| | | label11.MaximumSize = new Size(0, 28); |
| | | label11.MinimumSize = new Size(0, 28); |
| | | label11.Location = new Point(252, 100); |
| | | label11.MaximumSize = new Size(0, 33); |
| | | label11.MinimumSize = new Size(0, 33); |
| | | label11.Name = "label11"; |
| | | label11.Size = new Size(75, 28); |
| | | label11.Size = new Size(93, 33); |
| | | label11.TabIndex = 10; |
| | | label11.Text = "æå¤§çºµåæ Y"; |
| | | label11.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMaxRow |
| | | // |
| | | dtxtMaxRow.Location = new Point(285, 87); |
| | | dtxtMaxRow.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxRow.Location = new Point(368, 104); |
| | | dtxtMaxRow.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxRow.Name = "dtxtMaxRow"; |
| | | dtxtMaxRow.Size = new Size(98, 23); |
| | | dtxtMaxRow.Size = new Size(125, 27); |
| | | dtxtMaxRow.TabIndex = 9; |
| | | dtxtMaxRow.Text = "0"; |
| | | // |
| | | // label12 |
| | | // |
| | | label12.AutoSize = true; |
| | | label12.Location = new Point(2, 126); |
| | | label12.Margin = new Padding(2, 0, 2, 0); |
| | | label12.MaximumSize = new Size(0, 28); |
| | | label12.MinimumSize = new Size(0, 28); |
| | | label12.Location = new Point(3, 150); |
| | | label12.MaximumSize = new Size(0, 33); |
| | | label12.MinimumSize = new Size(0, 33); |
| | | label12.Name = "label12"; |
| | | label12.Size = new Size(76, 28); |
| | | label12.Size = new Size(94, 33); |
| | | label12.TabIndex = 11; |
| | | label12.Text = "æå°æ¨ªåæ X"; |
| | | label12.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMinColumn |
| | | // |
| | | dtxtMinColumn.Location = new Point(92, 129); |
| | | dtxtMinColumn.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinColumn.Location = new Point(119, 154); |
| | | dtxtMinColumn.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinColumn.Name = "dtxtMinColumn"; |
| | | dtxtMinColumn.Size = new Size(99, 23); |
| | | dtxtMinColumn.Size = new Size(126, 27); |
| | | dtxtMinColumn.TabIndex = 9; |
| | | dtxtMinColumn.Text = "0"; |
| | | // |
| | | // label13 |
| | | // |
| | | label13.AutoSize = true; |
| | | label13.Location = new Point(195, 126); |
| | | label13.Margin = new Padding(2, 0, 2, 0); |
| | | label13.MaximumSize = new Size(0, 28); |
| | | label13.MinimumSize = new Size(0, 28); |
| | | label13.Location = new Point(252, 150); |
| | | label13.MaximumSize = new Size(0, 33); |
| | | label13.MinimumSize = new Size(0, 33); |
| | | label13.Name = "label13"; |
| | | label13.Size = new Size(76, 28); |
| | | label13.Size = new Size(94, 33); |
| | | label13.TabIndex = 12; |
| | | label13.Text = "æå¤§æ¨ªåæ X"; |
| | | label13.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMaxColumn |
| | | // |
| | | dtxtMaxColumn.Location = new Point(285, 129); |
| | | dtxtMaxColumn.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxColumn.Location = new Point(368, 154); |
| | | dtxtMaxColumn.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxColumn.Name = "dtxtMaxColumn"; |
| | | dtxtMaxColumn.Size = new Size(98, 23); |
| | | dtxtMaxColumn.Size = new Size(125, 27); |
| | | dtxtMaxColumn.TabIndex = 9; |
| | | dtxtMaxColumn.Text = "0"; |
| | | // |
| | | // label19 |
| | | // |
| | | label19.AutoSize = true; |
| | | label19.Location = new Point(3, 462); |
| | | label19.Location = new Point(4, 550); |
| | | label19.Margin = new Padding(4, 0, 4, 0); |
| | | label19.Name = "label19"; |
| | | label19.Size = new Size(56, 17); |
| | | label19.Size = new Size(69, 20); |
| | | label19.TabIndex = 19; |
| | | label19.Text = "æå°æ°é"; |
| | | // |
| | | // dtxtMinCount |
| | | // |
| | | dtxtMinCount.Location = new Point(93, 465); |
| | | dtxtMinCount.Location = new Point(120, 554); |
| | | dtxtMinCount.Margin = new Padding(4); |
| | | dtxtMinCount.Name = "dtxtMinCount"; |
| | | dtxtMinCount.Size = new Size(97, 23); |
| | | dtxtMinCount.Size = new Size(124, 27); |
| | | dtxtMinCount.TabIndex = 17; |
| | | dtxtMinCount.Text = "0"; |
| | | // |
| | | // label20 |
| | | // |
| | | label20.AutoSize = true; |
| | | label20.Location = new Point(196, 462); |
| | | label20.Location = new Point(253, 550); |
| | | label20.Margin = new Padding(4, 0, 4, 0); |
| | | label20.Name = "label20"; |
| | | label20.Size = new Size(56, 17); |
| | | label20.Size = new Size(69, 20); |
| | | label20.TabIndex = 20; |
| | | label20.Text = "æå¤§æ°é"; |
| | | // |
| | | // dtxtMaxCount |
| | | // |
| | | dtxtMaxCount.Location = new Point(286, 465); |
| | | dtxtMaxCount.Location = new Point(369, 554); |
| | | dtxtMaxCount.Margin = new Padding(4); |
| | | dtxtMaxCount.Name = "dtxtMaxCount"; |
| | | dtxtMaxCount.Size = new Size(97, 23); |
| | | dtxtMaxCount.Size = new Size(124, 27); |
| | | dtxtMaxCount.TabIndex = 18; |
| | | dtxtMaxCount.Text = "9999"; |
| | | // |
| | | // label16 |
| | | // |
| | | label16.AutoSize = true; |
| | | label16.Location = new Point(2, 378); |
| | | label16.Margin = new Padding(2, 0, 2, 0); |
| | | label16.MaximumSize = new Size(0, 28); |
| | | label16.MinimumSize = new Size(0, 28); |
| | | label16.Location = new Point(3, 450); |
| | | label16.MaximumSize = new Size(0, 33); |
| | | label16.MinimumSize = new Size(0, 33); |
| | | label16.Name = "label16"; |
| | | label16.Size = new Size(68, 28); |
| | | label16.Size = new Size(84, 33); |
| | | label16.TabIndex = 15; |
| | | label16.Text = "æå°ç©å½¢åº¦"; |
| | | label16.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // label14 |
| | | // |
| | | label14.AutoSize = true; |
| | | label14.Location = new Point(2, 336); |
| | | label14.Margin = new Padding(2, 0, 2, 0); |
| | | label14.MaximumSize = new Size(0, 28); |
| | | label14.MinimumSize = new Size(0, 28); |
| | | label14.Location = new Point(3, 400); |
| | | label14.MaximumSize = new Size(0, 33); |
| | | label14.MinimumSize = new Size(0, 33); |
| | | label14.Name = "label14"; |
| | | label14.Size = new Size(56, 28); |
| | | label14.Size = new Size(69, 33); |
| | | label14.TabIndex = 13; |
| | | label14.Text = "æå°å度"; |
| | | label14.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMinRectangularity |
| | | // |
| | | dtxtMinRectangularity.Location = new Point(92, 381); |
| | | dtxtMinRectangularity.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinRectangularity.Location = new Point(119, 454); |
| | | dtxtMinRectangularity.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinRectangularity.Name = "dtxtMinRectangularity"; |
| | | dtxtMinRectangularity.Size = new Size(98, 23); |
| | | dtxtMinRectangularity.Size = new Size(125, 27); |
| | | dtxtMinRectangularity.TabIndex = 9; |
| | | dtxtMinRectangularity.Text = "0"; |
| | | // |
| | | // dtxtMinCircularity |
| | | // |
| | | dtxtMinCircularity.Location = new Point(92, 339); |
| | | dtxtMinCircularity.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinCircularity.Location = new Point(119, 404); |
| | | dtxtMinCircularity.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinCircularity.Name = "dtxtMinCircularity"; |
| | | dtxtMinCircularity.Size = new Size(98, 23); |
| | | dtxtMinCircularity.Size = new Size(125, 27); |
| | | dtxtMinCircularity.TabIndex = 9; |
| | | dtxtMinCircularity.Text = "0"; |
| | | // |
| | | // label17 |
| | | // |
| | | label17.AutoSize = true; |
| | | label17.Location = new Point(195, 378); |
| | | label17.Margin = new Padding(2, 0, 2, 0); |
| | | label17.MaximumSize = new Size(0, 28); |
| | | label17.MinimumSize = new Size(0, 28); |
| | | label17.Location = new Point(252, 450); |
| | | label17.MaximumSize = new Size(0, 33); |
| | | label17.MinimumSize = new Size(0, 33); |
| | | label17.Name = "label17"; |
| | | label17.Size = new Size(68, 28); |
| | | label17.Size = new Size(84, 33); |
| | | label17.TabIndex = 16; |
| | | label17.Text = "æå¤§ç©å½¢åº¦"; |
| | | label17.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMaxRectangularity |
| | | // |
| | | dtxtMaxRectangularity.Location = new Point(285, 381); |
| | | dtxtMaxRectangularity.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxRectangularity.Location = new Point(368, 454); |
| | | dtxtMaxRectangularity.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxRectangularity.Name = "dtxtMaxRectangularity"; |
| | | dtxtMaxRectangularity.Size = new Size(98, 23); |
| | | dtxtMaxRectangularity.Size = new Size(125, 27); |
| | | dtxtMaxRectangularity.TabIndex = 10; |
| | | dtxtMaxRectangularity.Text = "1"; |
| | | // |
| | | // label15 |
| | | // |
| | | label15.AutoSize = true; |
| | | label15.Location = new Point(195, 336); |
| | | label15.Margin = new Padding(2, 0, 2, 0); |
| | | label15.MaximumSize = new Size(0, 28); |
| | | label15.MinimumSize = new Size(0, 28); |
| | | label15.Location = new Point(252, 400); |
| | | label15.MaximumSize = new Size(0, 33); |
| | | label15.MinimumSize = new Size(0, 33); |
| | | label15.Name = "label15"; |
| | | label15.Size = new Size(56, 28); |
| | | label15.Size = new Size(69, 33); |
| | | label15.TabIndex = 14; |
| | | label15.Text = "æå¤§å度"; |
| | | label15.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMaxCircularity |
| | | // |
| | | dtxtMaxCircularity.Location = new Point(285, 339); |
| | | dtxtMaxCircularity.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxCircularity.Location = new Point(368, 404); |
| | | dtxtMaxCircularity.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxCircularity.Name = "dtxtMaxCircularity"; |
| | | dtxtMaxCircularity.Size = new Size(98, 23); |
| | | dtxtMaxCircularity.Size = new Size(125, 27); |
| | | dtxtMaxCircularity.TabIndex = 9; |
| | | dtxtMaxCircularity.Text = "1"; |
| | | // |
| | | // label25 |
| | | // |
| | | label25.AutoSize = true; |
| | | label25.Location = new Point(3, 168); |
| | | label25.Location = new Point(4, 200); |
| | | label25.Margin = new Padding(4, 0, 4, 0); |
| | | label25.Name = "label25"; |
| | | label25.Size = new Size(56, 17); |
| | | label25.Size = new Size(69, 20); |
| | | label25.TabIndex = 21; |
| | | label25.Text = "æå°å¨é¿"; |
| | | // |
| | | // label26 |
| | | // |
| | | label26.AutoSize = true; |
| | | label26.Location = new Point(3, 210); |
| | | label26.Location = new Point(4, 250); |
| | | label26.Margin = new Padding(4, 0, 4, 0); |
| | | label26.Name = "label26"; |
| | | label26.Size = new Size(68, 17); |
| | | label26.Size = new Size(84, 20); |
| | | label26.TabIndex = 22; |
| | | label26.Text = "æå°å®½é«æ¯"; |
| | | // |
| | | // label27 |
| | | // |
| | | label27.AutoSize = true; |
| | | label27.Location = new Point(3, 252); |
| | | label27.Location = new Point(4, 300); |
| | | label27.Margin = new Padding(4, 0, 4, 0); |
| | | label27.Name = "label27"; |
| | | label27.Size = new Size(80, 17); |
| | | label27.Size = new Size(99, 20); |
| | | label27.TabIndex = 23; |
| | | label27.Text = "è¾¹è·æå°å¹³å"; |
| | | // |
| | | // label28 |
| | | // |
| | | label28.AutoSize = true; |
| | | label28.Location = new Point(3, 294); |
| | | label28.Location = new Point(4, 350); |
| | | label28.Margin = new Padding(4, 0, 4, 0); |
| | | label28.Name = "label28"; |
| | | label28.Size = new Size(80, 17); |
| | | label28.Size = new Size(99, 20); |
| | | label28.TabIndex = 24; |
| | | label28.Text = "è¾¹è·æå°æ¹å·®"; |
| | | // |
| | | // label29 |
| | | // |
| | | label29.AutoSize = true; |
| | | label29.Location = new Point(196, 168); |
| | | label29.Location = new Point(253, 200); |
| | | label29.Margin = new Padding(4, 0, 4, 0); |
| | | label29.Name = "label29"; |
| | | label29.Size = new Size(56, 17); |
| | | label29.Size = new Size(69, 20); |
| | | label29.TabIndex = 25; |
| | | label29.Text = "æå¤§å¨é¿"; |
| | | // |
| | | // label30 |
| | | // |
| | | label30.AutoSize = true; |
| | | label30.Location = new Point(196, 210); |
| | | label30.Location = new Point(253, 250); |
| | | label30.Margin = new Padding(4, 0, 4, 0); |
| | | label30.Name = "label30"; |
| | | label30.Size = new Size(68, 17); |
| | | label30.Size = new Size(84, 20); |
| | | label30.TabIndex = 26; |
| | | label30.Text = "æå¤§å®½é«æ¯"; |
| | | // |
| | | // label31 |
| | | // |
| | | label31.AutoSize = true; |
| | | label31.Location = new Point(196, 252); |
| | | label31.Location = new Point(253, 300); |
| | | label31.Margin = new Padding(4, 0, 4, 0); |
| | | label31.Name = "label31"; |
| | | label31.Size = new Size(80, 17); |
| | | label31.Size = new Size(99, 20); |
| | | label31.TabIndex = 27; |
| | | label31.Text = "è¾¹è·æå¤§å¹³å"; |
| | | // |
| | | // label32 |
| | | // |
| | | label32.AutoSize = true; |
| | | label32.Location = new Point(196, 294); |
| | | label32.Location = new Point(253, 350); |
| | | label32.Margin = new Padding(4, 0, 4, 0); |
| | | label32.Name = "label32"; |
| | | label32.Size = new Size(80, 17); |
| | | label32.Size = new Size(99, 20); |
| | | label32.TabIndex = 28; |
| | | label32.Text = "è¾¹è·æå¤§æ¹å·®"; |
| | | // |
| | | // dtxtMinContlength |
| | | // |
| | | dtxtMinContlength.Location = new Point(93, 171); |
| | | dtxtMinContlength.Location = new Point(120, 204); |
| | | dtxtMinContlength.Margin = new Padding(4); |
| | | dtxtMinContlength.Name = "dtxtMinContlength"; |
| | | dtxtMinContlength.Size = new Size(97, 23); |
| | | dtxtMinContlength.Size = new Size(124, 27); |
| | | dtxtMinContlength.TabIndex = 29; |
| | | dtxtMinContlength.Text = "0"; |
| | | // |
| | | // pnlInputImage |
| | | // |
| | | pnlInputImage.Dock = DockStyle.Fill; |
| | | pnlInputImage.Location = new Point(3, 3); |
| | | pnlInputImage.Margin = new Padding(4); |
| | | pnlInputImage.Location = new Point(4, 4); |
| | | pnlInputImage.Margin = new Padding(5); |
| | | pnlInputImage.Name = "pnlInputImage"; |
| | | pnlInputImage.Size = new Size(626, 516); |
| | | pnlInputImage.Size = new Size(807, 611); |
| | | pnlInputImage.TabIndex = 44; |
| | | // |
| | | // TopToolStrip |
| | | // |
| | | TopToolStrip.ImageScalingSize = new Size(20, 20); |
| | | TopToolStrip.Items.AddRange(new ToolStripItem[] { btnRun, btnLoadImage, btnSaveParas, btnLoadParas }); |
| | | TopToolStrip.Location = new Point(0, 0); |
| | | TopToolStrip.Name = "TopToolStrip"; |
| | | TopToolStrip.Size = new Size(1044, 25); |
| | | TopToolStrip.Size = new Size(1342, 27); |
| | | TopToolStrip.TabIndex = 45; |
| | | TopToolStrip.Text = "toolStrip1"; |
| | | // |
| | |
| | | btnRun.BackgroundImageLayout = ImageLayout.Zoom; |
| | | btnRun.ImageTransparentColor = Color.Magenta; |
| | | btnRun.Name = "btnRun"; |
| | | btnRun.Size = new Size(36, 22); |
| | | btnRun.Size = new Size(43, 24); |
| | | btnRun.Text = "è¿è¡"; |
| | | btnRun.Click += btnRun_Click; |
| | | // |
| | |
| | | // |
| | | btnLoadImage.ImageTransparentColor = Color.Magenta; |
| | | btnLoadImage.Name = "btnLoadImage"; |
| | | btnLoadImage.Size = new Size(36, 22); |
| | | btnLoadImage.Size = new Size(43, 24); |
| | | btnLoadImage.Text = "导å¾"; |
| | | btnLoadImage.Click += btnLoadImage_Click; |
| | | // |
| | |
| | | // |
| | | btnSaveParas.ImageTransparentColor = Color.Magenta; |
| | | btnSaveParas.Name = "btnSaveParas"; |
| | | btnSaveParas.Size = new Size(36, 22); |
| | | btnSaveParas.Size = new Size(43, 24); |
| | | btnSaveParas.Text = "ä¿å"; |
| | | btnSaveParas.Click += btnSaveParas_Click; |
| | | // |
| | |
| | | // |
| | | btnLoadParas.ImageTransparentColor = Color.Magenta; |
| | | btnLoadParas.Name = "btnLoadParas"; |
| | | btnLoadParas.Size = new Size(36, 22); |
| | | btnLoadParas.Size = new Size(43, 24); |
| | | btnLoadParas.Text = "å è½½"; |
| | | btnLoadParas.Click += btnLoadParas_Click; |
| | | // |
| | | // BtmStatusStrip |
| | | // |
| | | BtmStatusStrip.ImageScalingSize = new Size(20, 20); |
| | | BtmStatusStrip.Items.AddRange(new ToolStripItem[] { lblResult, lblMsg, lblRunTime }); |
| | | BtmStatusStrip.Location = new Point(0, 577); |
| | | BtmStatusStrip.Location = new Point(0, 679); |
| | | BtmStatusStrip.Name = "BtmStatusStrip"; |
| | | BtmStatusStrip.Size = new Size(1044, 22); |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 18, 0); |
| | | BtmStatusStrip.Size = new Size(1342, 26); |
| | | BtmStatusStrip.TabIndex = 46; |
| | | BtmStatusStrip.Text = "statusStrip1"; |
| | | // |
| | | // lblResult |
| | | // |
| | | lblResult.Name = "lblResult"; |
| | | lblResult.Size = new Size(34, 17); |
| | | lblResult.Size = new Size(42, 20); |
| | | lblResult.Text = "True"; |
| | | // |
| | | // lblMsg |
| | | // |
| | | lblMsg.Name = "lblMsg"; |
| | | lblMsg.Size = new Size(56, 17); |
| | | lblMsg.Size = new Size(69, 20); |
| | | lblMsg.Text = "è¿è¡æå"; |
| | | // |
| | | // lblRunTime |
| | | // |
| | | lblRunTime.Name = "lblRunTime"; |
| | | lblRunTime.Size = new Size(32, 17); |
| | | lblRunTime.Size = new Size(39, 20); |
| | | lblRunTime.Text = "0ms"; |
| | | // |
| | | // parasTabControl |
| | |
| | | parasTabControl.Controls.Add(tabPage2); |
| | | parasTabControl.Dock = DockStyle.Fill; |
| | | parasTabControl.Location = new Point(0, 0); |
| | | parasTabControl.Margin = new Padding(4); |
| | | parasTabControl.Name = "parasTabControl"; |
| | | parasTabControl.SelectedIndex = 0; |
| | | parasTabControl.Size = new Size(400, 552); |
| | | parasTabControl.Size = new Size(514, 652); |
| | | parasTabControl.TabIndex = 48; |
| | | // |
| | | // tabPage1 |
| | | // |
| | | tabPage1.Controls.Add(tablePanelParas); |
| | | tabPage1.Location = new Point(4, 26); |
| | | tabPage1.Location = new Point(4, 29); |
| | | tabPage1.Margin = new Padding(4); |
| | | tabPage1.Name = "tabPage1"; |
| | | tabPage1.Padding = new Padding(3); |
| | | tabPage1.Size = new Size(392, 522); |
| | | tabPage1.Padding = new Padding(4); |
| | | tabPage1.Size = new Size(506, 619); |
| | | tabPage1.TabIndex = 0; |
| | | tabPage1.Text = "è¾å
¥åæ°"; |
| | | tabPage1.UseVisualStyleBackColor = true; |
| | |
| | | // tabPage5 |
| | | // |
| | | tabPage5.Controls.Add(tableLayoutPanel2); |
| | | tabPage5.Location = new Point(4, 26); |
| | | tabPage5.Location = new Point(4, 29); |
| | | tabPage5.Margin = new Padding(4); |
| | | tabPage5.Name = "tabPage5"; |
| | | tabPage5.Size = new Size(392, 522); |
| | | tabPage5.Size = new Size(506, 619); |
| | | tabPage5.TabIndex = 2; |
| | | tabPage5.Text = "è¿è¡åæ°"; |
| | | tabPage5.UseVisualStyleBackColor = true; |
| | |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 4; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 150F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 40F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 77F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 193F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 51F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Controls.Add(cmbTypeRoi, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(label21, 0, 0); |
| | |
| | | tableLayoutPanel2.Controls.Add(tableLayoutPanel3, 3, 2); |
| | | tableLayoutPanel2.Dock = DockStyle.Fill; |
| | | tableLayoutPanel2.Location = new Point(0, 0); |
| | | tableLayoutPanel2.Margin = new Padding(4); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | | tableLayoutPanel2.RowCount = 3; |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Size = new Size(392, 522); |
| | | tableLayoutPanel2.Size = new Size(506, 619); |
| | | tableLayoutPanel2.TabIndex = 4; |
| | | // |
| | | // cmbTypeRoi |
| | | // |
| | | cmbTypeRoi.Dock = DockStyle.Fill; |
| | | cmbTypeRoi.FormattingEnabled = true; |
| | | cmbTypeRoi.Location = new Point(63, 3); |
| | | cmbTypeRoi.Location = new Point(81, 4); |
| | | cmbTypeRoi.Margin = new Padding(4); |
| | | cmbTypeRoi.Name = "cmbTypeRoi"; |
| | | cmbTypeRoi.Size = new Size(144, 25); |
| | | cmbTypeRoi.Size = new Size(185, 28); |
| | | cmbTypeRoi.TabIndex = 1; |
| | | cmbTypeRoi.SelectedIndexChanged += cmbTypeRoi_SelectedIndexChanged; |
| | | // |
| | |
| | | // |
| | | label21.AutoSize = true; |
| | | label21.Dock = DockStyle.Fill; |
| | | label21.Location = new Point(3, 0); |
| | | label21.Location = new Point(4, 0); |
| | | label21.Margin = new Padding(4, 0, 4, 0); |
| | | label21.Name = "label21"; |
| | | label21.Size = new Size(54, 30); |
| | | label21.Size = new Size(69, 35); |
| | | label21.TabIndex = 3; |
| | | label21.Text = "ROI"; |
| | | label21.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // |
| | | label22.AutoSize = true; |
| | | label22.Dock = DockStyle.Fill; |
| | | label22.Location = new Point(3, 30); |
| | | label22.Location = new Point(4, 35); |
| | | label22.Margin = new Padding(4, 0, 4, 0); |
| | | label22.Name = "label22"; |
| | | label22.Size = new Size(54, 30); |
| | | label22.Size = new Size(69, 35); |
| | | label22.TabIndex = 4; |
| | | label22.Text = "Fixture"; |
| | | label22.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // |
| | | cmbFixture.Dock = DockStyle.Fill; |
| | | cmbFixture.FormattingEnabled = true; |
| | | cmbFixture.Location = new Point(63, 33); |
| | | cmbFixture.Location = new Point(81, 39); |
| | | cmbFixture.Margin = new Padding(4); |
| | | cmbFixture.Name = "cmbFixture"; |
| | | cmbFixture.Size = new Size(144, 25); |
| | | cmbFixture.Size = new Size(185, 28); |
| | | cmbFixture.TabIndex = 5; |
| | | cmbFixture.SelectedIndexChanged += cmbFixture_SelectedIndexChanged; |
| | | // |
| | |
| | | // |
| | | ckbDrawRoi.AutoSize = true; |
| | | ckbDrawRoi.CheckAlign = ContentAlignment.MiddleCenter; |
| | | ckbDrawRoi.Location = new Point(213, 3); |
| | | ckbDrawRoi.Location = new Point(274, 4); |
| | | ckbDrawRoi.Margin = new Padding(4); |
| | | ckbDrawRoi.Name = "ckbDrawRoi"; |
| | | ckbDrawRoi.Size = new Size(15, 14); |
| | | ckbDrawRoi.Size = new Size(18, 17); |
| | | ckbDrawRoi.TabIndex = 2; |
| | | ckbDrawRoi.UseVisualStyleBackColor = true; |
| | | ckbDrawRoi.CheckedChanged += ckbDrawRoi_CheckedChanged; |
| | |
| | | // |
| | | ckbListAfter.Dock = DockStyle.Fill; |
| | | ckbListAfter.FormattingEnabled = true; |
| | | ckbListAfter.Location = new Point(63, 63); |
| | | ckbListAfter.Location = new Point(81, 74); |
| | | ckbListAfter.Margin = new Padding(4); |
| | | ckbListAfter.Name = "ckbListAfter"; |
| | | ckbListAfter.Size = new Size(144, 456); |
| | | ckbListAfter.Size = new Size(185, 541); |
| | | ckbListAfter.TabIndex = 6; |
| | | // |
| | | // tableLayoutPanel1 |
| | |
| | | tableLayoutPanel1.Controls.Add(btnUp, 0, 2); |
| | | tableLayoutPanel1.Controls.Add(btnDown, 0, 3); |
| | | tableLayoutPanel1.Dock = DockStyle.Fill; |
| | | tableLayoutPanel1.Location = new Point(213, 63); |
| | | tableLayoutPanel1.Location = new Point(274, 74); |
| | | tableLayoutPanel1.Margin = new Padding(4); |
| | | tableLayoutPanel1.Name = "tableLayoutPanel1"; |
| | | tableLayoutPanel1.RowCount = 5; |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Size = new Size(34, 456); |
| | | tableLayoutPanel1.Size = new Size(43, 541); |
| | | tableLayoutPanel1.TabIndex = 7; |
| | | // |
| | | // btnAdd |
| | | // |
| | | btnAdd.Dock = DockStyle.Fill; |
| | | btnAdd.Location = new Point(3, 3); |
| | | btnAdd.Location = new Point(4, 4); |
| | | btnAdd.Margin = new Padding(4); |
| | | btnAdd.Name = "btnAdd"; |
| | | btnAdd.Size = new Size(28, 24); |
| | | btnAdd.Size = new Size(35, 27); |
| | | btnAdd.TabIndex = 0; |
| | | btnAdd.Text = "+"; |
| | | btnAdd.UseVisualStyleBackColor = true; |
| | |
| | | // btnDel |
| | | // |
| | | btnDel.Dock = DockStyle.Fill; |
| | | btnDel.Location = new Point(3, 33); |
| | | btnDel.Location = new Point(4, 39); |
| | | btnDel.Margin = new Padding(4); |
| | | btnDel.Name = "btnDel"; |
| | | btnDel.Size = new Size(28, 24); |
| | | btnDel.Size = new Size(35, 27); |
| | | btnDel.TabIndex = 1; |
| | | btnDel.Text = "-"; |
| | | btnDel.UseVisualStyleBackColor = true; |
| | |
| | | // btnUp |
| | | // |
| | | btnUp.Dock = DockStyle.Fill; |
| | | btnUp.Location = new Point(3, 63); |
| | | btnUp.Location = new Point(4, 74); |
| | | btnUp.Margin = new Padding(4); |
| | | btnUp.Name = "btnUp"; |
| | | btnUp.Size = new Size(28, 24); |
| | | btnUp.Size = new Size(35, 27); |
| | | btnUp.TabIndex = 2; |
| | | btnUp.Text = "â"; |
| | | btnUp.UseVisualStyleBackColor = true; |
| | |
| | | // btnDown |
| | | // |
| | | btnDown.Dock = DockStyle.Fill; |
| | | btnDown.Location = new Point(3, 93); |
| | | btnDown.Location = new Point(4, 109); |
| | | btnDown.Margin = new Padding(4); |
| | | btnDown.Name = "btnDown"; |
| | | btnDown.Size = new Size(28, 24); |
| | | btnDown.Size = new Size(35, 27); |
| | | btnDown.TabIndex = 3; |
| | | btnDown.Text = "â"; |
| | | btnDown.UseVisualStyleBackColor = true; |
| | |
| | | // |
| | | label24.AutoSize = true; |
| | | label24.Dock = DockStyle.Fill; |
| | | label24.Location = new Point(3, 60); |
| | | label24.Location = new Point(4, 70); |
| | | label24.Margin = new Padding(4, 0, 4, 0); |
| | | label24.Name = "label24"; |
| | | label24.Size = new Size(54, 462); |
| | | label24.Size = new Size(69, 549); |
| | | label24.TabIndex = 8; |
| | | label24.Text = "å½¢æå¦"; |
| | | label24.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // tableLayoutPanel3 |
| | | // |
| | | tableLayoutPanel3.ColumnCount = 1; |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 175F)); |
| | | tableLayoutPanel3.Controls.Add(cmbProcessType, 0, 1); |
| | | tableLayoutPanel3.Controls.Add(cmbShapeType, 0, 2); |
| | | tableLayoutPanel3.Controls.Add(lblTips, 0, 3); |
| | | tableLayoutPanel3.Controls.Add(tableLayoutPanel4, 0, 0); |
| | | tableLayoutPanel3.Dock = DockStyle.Fill; |
| | | tableLayoutPanel3.Location = new Point(253, 63); |
| | | tableLayoutPanel3.Location = new Point(325, 74); |
| | | tableLayoutPanel3.Margin = new Padding(4); |
| | | tableLayoutPanel3.Name = "tableLayoutPanel3"; |
| | | tableLayoutPanel3.RowCount = 4; |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 41F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel3.Size = new Size(136, 456); |
| | | tableLayoutPanel3.Size = new Size(177, 541); |
| | | tableLayoutPanel3.TabIndex = 9; |
| | | // |
| | | // cmbProcessType |
| | | // |
| | | cmbProcessType.Dock = DockStyle.Fill; |
| | | cmbProcessType.FormattingEnabled = true; |
| | | cmbProcessType.Location = new Point(3, 38); |
| | | cmbProcessType.Location = new Point(4, 45); |
| | | cmbProcessType.Margin = new Padding(4); |
| | | cmbProcessType.Name = "cmbProcessType"; |
| | | cmbProcessType.Size = new Size(130, 25); |
| | | cmbProcessType.Size = new Size(169, 28); |
| | | cmbProcessType.TabIndex = 3; |
| | | // |
| | | // cmbShapeType |
| | | // |
| | | cmbShapeType.Dock = DockStyle.Fill; |
| | | cmbShapeType.FormattingEnabled = true; |
| | | cmbShapeType.Location = new Point(3, 68); |
| | | cmbShapeType.Location = new Point(4, 80); |
| | | cmbShapeType.Margin = new Padding(4); |
| | | cmbShapeType.Name = "cmbShapeType"; |
| | | cmbShapeType.Size = new Size(130, 25); |
| | | cmbShapeType.Size = new Size(169, 28); |
| | | cmbShapeType.TabIndex = 5; |
| | | // |
| | | // lblTips |
| | | // |
| | | lblTips.AutoSize = true; |
| | | lblTips.Location = new Point(3, 95); |
| | | lblTips.Location = new Point(4, 111); |
| | | lblTips.Margin = new Padding(4, 0, 4, 0); |
| | | lblTips.Name = "lblTips"; |
| | | lblTips.Size = new Size(32, 17); |
| | | lblTips.Size = new Size(39, 20); |
| | | lblTips.TabIndex = 6; |
| | | lblTips.Text = "æç¤º"; |
| | | // |
| | |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel4.Controls.Add(txtAfterProcessWidth, 0, 0); |
| | | tableLayoutPanel4.Controls.Add(txtAfterProcessHeight, 1, 0); |
| | | tableLayoutPanel4.Location = new Point(3, 3); |
| | | tableLayoutPanel4.Location = new Point(4, 4); |
| | | tableLayoutPanel4.Margin = new Padding(4); |
| | | tableLayoutPanel4.Name = "tableLayoutPanel4"; |
| | | tableLayoutPanel4.RowCount = 1; |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel4.Size = new Size(130, 29); |
| | | tableLayoutPanel4.Size = new Size(167, 33); |
| | | tableLayoutPanel4.TabIndex = 7; |
| | | // |
| | | // txtAfterProcessWidth |
| | | // |
| | | txtAfterProcessWidth.Dock = DockStyle.Fill; |
| | | txtAfterProcessWidth.Location = new Point(3, 3); |
| | | txtAfterProcessWidth.Location = new Point(4, 4); |
| | | txtAfterProcessWidth.Margin = new Padding(4); |
| | | txtAfterProcessWidth.Name = "txtAfterProcessWidth"; |
| | | txtAfterProcessWidth.Size = new Size(59, 23); |
| | | txtAfterProcessWidth.Size = new Size(75, 27); |
| | | txtAfterProcessWidth.TabIndex = 4; |
| | | txtAfterProcessWidth.Value = new decimal(new int[] { 3, 0, 0, 0 }); |
| | | // |
| | | // txtAfterProcessHeight |
| | | // |
| | | txtAfterProcessHeight.Dock = DockStyle.Fill; |
| | | txtAfterProcessHeight.Location = new Point(68, 3); |
| | | txtAfterProcessHeight.Location = new Point(87, 4); |
| | | txtAfterProcessHeight.Margin = new Padding(4); |
| | | txtAfterProcessHeight.Name = "txtAfterProcessHeight"; |
| | | txtAfterProcessHeight.Size = new Size(59, 23); |
| | | txtAfterProcessHeight.Size = new Size(76, 27); |
| | | txtAfterProcessHeight.TabIndex = 5; |
| | | txtAfterProcessHeight.Value = new decimal(new int[] { 3, 0, 0, 0 }); |
| | | // |
| | | // tabPage2 |
| | | // |
| | | tabPage2.Controls.Add(tableLayoutResults); |
| | | tabPage2.Location = new Point(4, 26); |
| | | tabPage2.Location = new Point(4, 29); |
| | | tabPage2.Margin = new Padding(4); |
| | | tabPage2.Name = "tabPage2"; |
| | | tabPage2.Padding = new Padding(3); |
| | | tabPage2.Size = new Size(392, 522); |
| | | tabPage2.Padding = new Padding(4); |
| | | tabPage2.Size = new Size(506, 619); |
| | | tabPage2.TabIndex = 1; |
| | | tabPage2.Text = "è¾åºç»æ"; |
| | | tabPage2.UseVisualStyleBackColor = true; |
| | |
| | | // tableLayoutResults |
| | | // |
| | | tableLayoutResults.ColumnCount = 2; |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F)); |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 129F)); |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutResults.Controls.Add(dtxtHeight, 1, 4); |
| | | tableLayoutResults.Controls.Add(label9, 0, 4); |
| | |
| | | tableLayoutResults.Controls.Add(label23, 0, 5); |
| | | tableLayoutResults.Controls.Add(dtxtArea, 1, 5); |
| | | tableLayoutResults.Dock = DockStyle.Fill; |
| | | tableLayoutResults.Location = new Point(3, 3); |
| | | tableLayoutResults.Margin = new Padding(2, 3, 2, 3); |
| | | tableLayoutResults.Location = new Point(4, 4); |
| | | tableLayoutResults.Margin = new Padding(3, 4, 3, 4); |
| | | tableLayoutResults.Name = "tableLayoutResults"; |
| | | tableLayoutResults.RowCount = 10; |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.Size = new Size(386, 516); |
| | | tableLayoutResults.Size = new Size(498, 611); |
| | | tableLayoutResults.TabIndex = 1; |
| | | // |
| | | // dtxtHeight |
| | | // |
| | | dtxtHeight.Dock = DockStyle.Fill; |
| | | dtxtHeight.Location = new Point(102, 207); |
| | | dtxtHeight.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtHeight.Location = new Point(132, 248); |
| | | dtxtHeight.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtHeight.Name = "dtxtHeight"; |
| | | dtxtHeight.ReadOnly = true; |
| | | dtxtHeight.Size = new Size(282, 23); |
| | | dtxtHeight.Size = new Size(363, 27); |
| | | dtxtHeight.TabIndex = 9; |
| | | // |
| | | // label9 |
| | | // |
| | | label9.AutoSize = true; |
| | | label9.Dock = DockStyle.Fill; |
| | | label9.Location = new Point(2, 204); |
| | | label9.Margin = new Padding(2, 0, 2, 0); |
| | | label9.MaximumSize = new Size(0, 28); |
| | | label9.MinimumSize = new Size(0, 28); |
| | | label9.Location = new Point(3, 244); |
| | | label9.MaximumSize = new Size(0, 33); |
| | | label9.MinimumSize = new Size(0, 33); |
| | | label9.Name = "label9"; |
| | | label9.Size = new Size(96, 28); |
| | | label9.Size = new Size(123, 33); |
| | | label9.TabIndex = 3; |
| | | label9.Text = "é«åº¦"; |
| | | label9.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label5.AutoSize = true; |
| | | label5.Dock = DockStyle.Fill; |
| | | label5.Location = new Point(2, 0); |
| | | label5.Margin = new Padding(2, 0, 2, 0); |
| | | label5.MaximumSize = new Size(0, 28); |
| | | label5.MinimumSize = new Size(0, 28); |
| | | label5.Location = new Point(3, 0); |
| | | label5.MaximumSize = new Size(0, 33); |
| | | label5.MinimumSize = new Size(0, 33); |
| | | label5.Name = "label5"; |
| | | label5.Size = new Size(96, 28); |
| | | label5.Size = new Size(123, 33); |
| | | label5.TabIndex = 0; |
| | | label5.Text = "X"; |
| | | label5.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label6.AutoSize = true; |
| | | label6.Dock = DockStyle.Fill; |
| | | label6.Location = new Point(2, 51); |
| | | label6.Margin = new Padding(2, 0, 2, 0); |
| | | label6.MaximumSize = new Size(0, 28); |
| | | label6.MinimumSize = new Size(0, 28); |
| | | label6.Location = new Point(3, 61); |
| | | label6.MaximumSize = new Size(0, 33); |
| | | label6.MinimumSize = new Size(0, 33); |
| | | label6.Name = "label6"; |
| | | label6.Size = new Size(96, 28); |
| | | label6.Size = new Size(123, 33); |
| | | label6.TabIndex = 1; |
| | | label6.Text = "Y"; |
| | | label6.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label7.AutoSize = true; |
| | | label7.Dock = DockStyle.Fill; |
| | | label7.Location = new Point(2, 102); |
| | | label7.Margin = new Padding(2, 0, 2, 0); |
| | | label7.MaximumSize = new Size(0, 28); |
| | | label7.MinimumSize = new Size(0, 28); |
| | | label7.Location = new Point(3, 122); |
| | | label7.MaximumSize = new Size(0, 33); |
| | | label7.MinimumSize = new Size(0, 33); |
| | | label7.Name = "label7"; |
| | | label7.Size = new Size(96, 28); |
| | | label7.Size = new Size(123, 33); |
| | | label7.TabIndex = 2; |
| | | label7.Text = "弧度(rad)"; |
| | | label7.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label8.AutoSize = true; |
| | | label8.Dock = DockStyle.Fill; |
| | | label8.Location = new Point(2, 153); |
| | | label8.Margin = new Padding(2, 0, 2, 0); |
| | | label8.MaximumSize = new Size(0, 28); |
| | | label8.MinimumSize = new Size(0, 28); |
| | | label8.Location = new Point(3, 183); |
| | | label8.MaximumSize = new Size(0, 33); |
| | | label8.MinimumSize = new Size(0, 33); |
| | | label8.Name = "label8"; |
| | | label8.Size = new Size(96, 28); |
| | | label8.Size = new Size(123, 33); |
| | | label8.TabIndex = 3; |
| | | label8.Text = "宽度"; |
| | | label8.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // dtxtCenterX |
| | | // |
| | | dtxtCenterX.Dock = DockStyle.Fill; |
| | | dtxtCenterX.Location = new Point(102, 3); |
| | | dtxtCenterX.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtCenterX.Location = new Point(132, 4); |
| | | dtxtCenterX.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtCenterX.Name = "dtxtCenterX"; |
| | | dtxtCenterX.ReadOnly = true; |
| | | dtxtCenterX.Size = new Size(282, 23); |
| | | dtxtCenterX.Size = new Size(363, 27); |
| | | dtxtCenterX.TabIndex = 5; |
| | | // |
| | | // dtxtCenterY |
| | | // |
| | | dtxtCenterY.Dock = DockStyle.Fill; |
| | | dtxtCenterY.Location = new Point(102, 54); |
| | | dtxtCenterY.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtCenterY.Location = new Point(132, 65); |
| | | dtxtCenterY.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtCenterY.Name = "dtxtCenterY"; |
| | | dtxtCenterY.ReadOnly = true; |
| | | dtxtCenterY.Size = new Size(282, 23); |
| | | dtxtCenterY.Size = new Size(363, 27); |
| | | dtxtCenterY.TabIndex = 6; |
| | | // |
| | | // dtxtPhi |
| | | // |
| | | dtxtPhi.Dock = DockStyle.Fill; |
| | | dtxtPhi.Location = new Point(102, 105); |
| | | dtxtPhi.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtPhi.Location = new Point(132, 126); |
| | | dtxtPhi.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtPhi.Name = "dtxtPhi"; |
| | | dtxtPhi.ReadOnly = true; |
| | | dtxtPhi.Size = new Size(282, 23); |
| | | dtxtPhi.Size = new Size(363, 27); |
| | | dtxtPhi.TabIndex = 7; |
| | | // |
| | | // dtxtWidth |
| | | // |
| | | dtxtWidth.Dock = DockStyle.Fill; |
| | | dtxtWidth.Location = new Point(102, 156); |
| | | dtxtWidth.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtWidth.Location = new Point(132, 187); |
| | | dtxtWidth.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtWidth.Name = "dtxtWidth"; |
| | | dtxtWidth.ReadOnly = true; |
| | | dtxtWidth.Size = new Size(282, 23); |
| | | dtxtWidth.Size = new Size(363, 27); |
| | | dtxtWidth.TabIndex = 8; |
| | | // |
| | | // label18 |
| | | // |
| | | label18.AutoSize = true; |
| | | label18.Dock = DockStyle.Fill; |
| | | label18.Location = new Point(3, 306); |
| | | label18.Location = new Point(4, 366); |
| | | label18.Margin = new Padding(4, 0, 4, 0); |
| | | label18.Name = "label18"; |
| | | label18.Size = new Size(94, 51); |
| | | label18.Size = new Size(121, 61); |
| | | label18.TabIndex = 10; |
| | | label18.Text = "æ°é"; |
| | | label18.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // dtxtCount |
| | | // |
| | | dtxtCount.Dock = DockStyle.Fill; |
| | | dtxtCount.Location = new Point(103, 309); |
| | | dtxtCount.Location = new Point(133, 370); |
| | | dtxtCount.Margin = new Padding(4); |
| | | dtxtCount.Name = "dtxtCount"; |
| | | dtxtCount.ReadOnly = true; |
| | | dtxtCount.Size = new Size(280, 23); |
| | | dtxtCount.Size = new Size(361, 27); |
| | | dtxtCount.TabIndex = 11; |
| | | // |
| | | // label23 |
| | | // |
| | | label23.AutoSize = true; |
| | | label23.Dock = DockStyle.Fill; |
| | | label23.Location = new Point(3, 255); |
| | | label23.Location = new Point(4, 305); |
| | | label23.Margin = new Padding(4, 0, 4, 0); |
| | | label23.Name = "label23"; |
| | | label23.Size = new Size(94, 51); |
| | | label23.Size = new Size(121, 61); |
| | | label23.TabIndex = 12; |
| | | label23.Text = "é¢ç§¯"; |
| | | label23.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // dtxtArea |
| | | // |
| | | dtxtArea.Dock = DockStyle.Fill; |
| | | dtxtArea.Location = new Point(103, 258); |
| | | dtxtArea.Location = new Point(133, 309); |
| | | dtxtArea.Margin = new Padding(4); |
| | | dtxtArea.Name = "dtxtArea"; |
| | | dtxtArea.ReadOnly = true; |
| | | dtxtArea.Size = new Size(280, 23); |
| | | dtxtArea.Size = new Size(361, 27); |
| | | dtxtArea.TabIndex = 13; |
| | | // |
| | | // imgTabControl |
| | |
| | | imgTabControl.Controls.Add(tabPageRecordImage); |
| | | imgTabControl.Dock = DockStyle.Fill; |
| | | imgTabControl.Location = new Point(0, 0); |
| | | imgTabControl.Margin = new Padding(4); |
| | | imgTabControl.Name = "imgTabControl"; |
| | | imgTabControl.SelectedIndex = 0; |
| | | imgTabControl.Size = new Size(640, 552); |
| | | imgTabControl.Size = new Size(823, 652); |
| | | imgTabControl.TabIndex = 49; |
| | | // |
| | | // tabPageInputImage |
| | | // |
| | | tabPageInputImage.Controls.Add(pnlInputImage); |
| | | tabPageInputImage.Location = new Point(4, 26); |
| | | tabPageInputImage.Location = new Point(4, 29); |
| | | tabPageInputImage.Margin = new Padding(4); |
| | | tabPageInputImage.Name = "tabPageInputImage"; |
| | | tabPageInputImage.Padding = new Padding(3); |
| | | tabPageInputImage.Size = new Size(632, 522); |
| | | tabPageInputImage.Padding = new Padding(4); |
| | | tabPageInputImage.Size = new Size(815, 619); |
| | | tabPageInputImage.TabIndex = 0; |
| | | tabPageInputImage.Text = "è¾å
¥å¾å"; |
| | | tabPageInputImage.UseVisualStyleBackColor = true; |
| | |
| | | // tabPageRecordImage |
| | | // |
| | | tabPageRecordImage.Controls.Add(pnlRecordImage); |
| | | tabPageRecordImage.Location = new Point(4, 26); |
| | | tabPageRecordImage.Location = new Point(4, 29); |
| | | tabPageRecordImage.Margin = new Padding(4); |
| | | tabPageRecordImage.Name = "tabPageRecordImage"; |
| | | tabPageRecordImage.Padding = new Padding(3); |
| | | tabPageRecordImage.Size = new Size(632, 522); |
| | | tabPageRecordImage.Padding = new Padding(4); |
| | | tabPageRecordImage.Size = new Size(815, 619); |
| | | tabPageRecordImage.TabIndex = 1; |
| | | tabPageRecordImage.Text = "ç»æå¾å"; |
| | | tabPageRecordImage.UseVisualStyleBackColor = true; |
| | |
| | | // pnlRecordImage |
| | | // |
| | | pnlRecordImage.Dock = DockStyle.Fill; |
| | | pnlRecordImage.Location = new Point(3, 3); |
| | | pnlRecordImage.Margin = new Padding(4); |
| | | pnlRecordImage.Location = new Point(4, 4); |
| | | pnlRecordImage.Margin = new Padding(5); |
| | | pnlRecordImage.Name = "pnlRecordImage"; |
| | | pnlRecordImage.Size = new Size(626, 516); |
| | | pnlRecordImage.Size = new Size(807, 611); |
| | | pnlRecordImage.TabIndex = 45; |
| | | // |
| | | // splitContainer1 |
| | | // |
| | | splitContainer1.Dock = DockStyle.Fill; |
| | | splitContainer1.Location = new Point(0, 25); |
| | | splitContainer1.Location = new Point(0, 27); |
| | | splitContainer1.Margin = new Padding(4); |
| | | splitContainer1.Name = "splitContainer1"; |
| | | // |
| | | // splitContainer1.Panel1 |
| | |
| | | // splitContainer1.Panel2 |
| | | // |
| | | splitContainer1.Panel2.Controls.Add(imgTabControl); |
| | | splitContainer1.Size = new Size(1044, 552); |
| | | splitContainer1.SplitterDistance = 400; |
| | | splitContainer1.Size = new Size(1342, 652); |
| | | splitContainer1.SplitterDistance = 514; |
| | | splitContainer1.SplitterWidth = 5; |
| | | splitContainer1.TabIndex = 48; |
| | | // |
| | | // HBlobToolEdit |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 17F); |
| | | AutoScaleDimensions = new SizeF(9F, 20F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(splitContainer1); |
| | | Controls.Add(BtmStatusStrip); |
| | | Controls.Add(TopToolStrip); |
| | | Margin = new Padding(2, 3, 2, 3); |
| | | Margin = new Padding(3, 4, 3, 4); |
| | | Name = "HBlobToolEdit"; |
| | | Size = new Size(1044, 599); |
| | | Size = new Size(1342, 705); |
| | | Load += HBlobToolEdit_Load; |
| | | tablePanelParas.ResumeLayout(false); |
| | | tablePanelParas.PerformLayout(); |
| | |
| | | foreach (string value in IProcess.dicFixtures.Keys) |
| | | cmbFixture.Items.Add(value.ToString()); |
| | | |
| | | ckbDrawRoi.Checked = true; |
| | | cmbTypeRoi.Text = RoiType.None.ToString(); |
| | | LoadParas(); |
| | | |
| | |
| | | |
| | | public override void btnSaveParas_Click(object sender, EventArgs e) { base.btnSaveParas_Click(sender, e); } |
| | | |
| | | |
| | | public override void ckbDrawRoi_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | if (ckbDrawRoi.Checked) |
| | |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>156, 17</value> |
| | | <value>183, 17</value> |
| | | </metadata> |
| | | <metadata name="BtmStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>287, 17</value> |
| | | <value>340, 17</value> |
| | | </metadata> |
| | | </root> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HalconDotNet; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionControl; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Imaging; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_VisionProcesses.Alogrithms.Halcon |
| | | { |
| | | public enum ImageFilterType { Mean, Guass, Median } |
| | | |
| | | [Process("Halcon2Då¾å滤波", Category = "Halcon2Då·¥å
·", Description = "å建滤波工å
·")] |
| | | public class HFilterTool : TAlgorithm |
| | | { |
| | | public HFilterTool() |
| | | { |
| | | strProcessClass = "LB_VisionProcesses.Alogrithms.Halcon.HFilterTool"; |
| | | strProcessName = "Halcon2Då¾å滤波工å
·"; |
| | | |
| | | Params.Inputs.Add("滤波å¨ç±»å", "å弿»¤æ³¢"); |
| | | Params.Inputs.Add("æ©è宽", 1); |
| | | Params.Inputs.Add("æ©èé«", 1); |
| | | //mean_image(Image : ImageMean : MaskWidth, MaskHeight : ) |
| | | |
| | | Params.Inputs.Add("滤波å¨ç±»å", "髿¯æ»¤æ³¢"); |
| | | Params.Inputs.Add("髿¯æ ¸å°ºå¯¸", 1.0); |
| | | //gauss_filter(Image : ImageGauss : Size : ) |
| | | |
| | | Params.Inputs.Add("滤波å¨ç±»å", "ä¸å¼æ»¤æ³¢"); |
| | | Params.Inputs.Add("æ©è宽", 1); |
| | | Params.Inputs.Add("æ©èé«", 1); |
| | | //median_rect(Image : ImageMedian :MaskWidth,MaskHeight:) |
| | | |
| | | Params.ROI = new HSegment(0, 0, 250, 250); |
| | | } |
| | | |
| | | List<RecordFilterData> recordFilterDatas = new List<RecordFilterData>(); |
| | | /// <summary> |
| | | /// ç®åé»è¾ |
| | | /// </summary> |
| | | public override void TAlgorithmMain() |
| | | { |
| | | #region åå§ååé |
| | | HObject ho_Regions, ho_LineXld; |
| | | HOperatorSet.GenEmptyObj(out ho_Regions); |
| | | HOperatorSet.GenEmptyObj(out ho_LineXld); |
| | | #endregion |
| | | |
| | | try |
| | | { |
| | | if (InputImage == null) |
| | | { |
| | | Msg = "è¾å
¥å¾ç为空"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | if (InputImage is Bitmap) |
| | | { |
| | | try |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | if (!(InputImage is HObject)) |
| | | { |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºHObject"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | #region è£åªåºå |
| | | //if (!(Params.ROI is HSegment)) |
| | | //{ |
| | | // Msg = "ROIç±»åé误,å¿
须为HSegmentç±»å"; |
| | | // Result = false; |
| | | // return; |
| | | //} |
| | | |
| | | //if (!(InputImage is HObject)) |
| | | //{ |
| | | // Msg = "è¾å
¥å¾çç±»åé误,å¿
须为HObjectç±»å"; |
| | | // Result = false; |
| | | // return; |
| | | //} |
| | | |
| | | //HObject DomainImage = ((HObject)InputImage)?.CopyObj(1, -1); |
| | | object DomainImage = null; |
| | | if (!ReduceDomainImage(InputImage, ref DomainImage)) |
| | | { |
| | | Msg = "è£åªåºå失败"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | #endregion |
| | | |
| | | #region ç®åé»è¾ |
| | | Record = new ObjectRecord(); |
| | | HObject hoDomainImage = DomainImage as HObject; |
| | | HTuple hv_Channels = new HTuple(); |
| | | //夿æ¯å¦ä¸ºç°åº¦å¾ |
| | | using (HDevDisposeHelper dh = new HDevDisposeHelper()) |
| | | { |
| | | try |
| | | { |
| | | HOperatorSet.CountChannels(hoDomainImage, out hv_Channels); |
| | | if (hv_Channels.TupleInt() != 1) |
| | | HOperatorSet.Rgb1ToGray(hoDomainImage, out hoDomainImage); |
| | | |
| | | //转æ¢å忬¡æ£æ¥æ¯å¦ä¸ºç°åº¦å¾ |
| | | HOperatorSet.CountChannels(hoDomainImage, out hv_Channels); |
| | | if (hv_Channels.TupleInt() != 1) |
| | | { |
| | | HOperatorSet.Rgb1ToGray(hoDomainImage, out hoDomainImage); |
| | | Msg = "è¾å
¥å¾çä¸ä¸ºç°åº¦å¾"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | Msg = "è¾å
¥å¾çä¸ä¸ºç°åº¦å¾ä¸è½¬æ¢å¤±è´¥"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | int hv_MaskWidth = Convert.ToInt16(Params.Inputs["æ©è宽"]); |
| | | int hv_MaskHight = Convert.ToInt16(Params.Inputs["æ©èé«"]); |
| | | int hv_Size = Convert.ToInt16(Params.Inputs["髿¯æ ¸å°ºå¯¸"]); |
| | | |
| | | recordFilterDatas = FilterManager.Instance.GetAllUsers(); |
| | | |
| | | string hv_FilterType = ""; |
| | | foreach (var recordFilterData in recordFilterDatas) |
| | | { |
| | | switch (recordFilterData.FilterName) |
| | | { |
| | | case FilterType.å弿»¤æ³¢_MeanImage: |
| | | hv_FilterType = "mean"; |
| | | hv_MaskWidth = Convert.ToInt16(recordFilterData.MaskWidth); |
| | | hv_MaskHight = Convert.ToInt16(recordFilterData.MaskHight); |
| | | Filter(hoDomainImage, out ho_Regions, hv_FilterType, hv_MaskWidth, hv_MaskHight, hv_Size); |
| | | break; |
| | | case FilterType.髿¯æ»¤æ³¢_GaussFilter: |
| | | hv_FilterType = "gauss"; |
| | | hv_Size = Convert.ToInt16(recordFilterData.GaussSize); |
| | | Filter(hoDomainImage, out ho_Regions, hv_FilterType, hv_MaskWidth, hv_MaskHight, hv_Size); |
| | | break; |
| | | case FilterType.ä¸å¼æ»¤æ³¢_MedianRect: |
| | | hv_FilterType = "median"; |
| | | hv_MaskWidth = Convert.ToInt16(recordFilterData.MaskWidth); |
| | | hv_MaskHight = Convert.ToInt16(recordFilterData.MaskHight); |
| | | Filter(hoDomainImage, out ho_Regions, hv_FilterType, hv_MaskWidth, hv_MaskHight, hv_Size); |
| | | break; |
| | | default: |
| | | hv_FilterType = "median"; |
| | | hv_MaskWidth = Convert.ToInt16(recordFilterData.MaskWidth); |
| | | hv_MaskHight = Convert.ToInt16(recordFilterData.MaskHight); |
| | | Filter(hoDomainImage, out ho_Regions, hv_FilterType, hv_MaskWidth, hv_MaskHight, hv_Size); |
| | | break; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region çæOutputImageç»åç»å¤ç |
| | | try |
| | | { |
| | | OutputImage = hoDomainImage; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Msg = "çæOutputImage失败,åå æ¯:" + ex.ToString(); |
| | | Result = false; |
| | | return; |
| | | } |
| | | #endregion |
| | | |
| | | if (Msg == "è¿è¡è¶
æ¶") |
| | | { |
| | | Result = false; |
| | | return; |
| | | } |
| | | |
| | | Msg = "è¿è¡æå"; |
| | | Result = true; |
| | | return; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Msg = "è¿è¡å¤±è´¥,åå æ¯:" + ex.ToString().TrimEnd(); |
| | | OutputImage = null; |
| | | Result = false; |
| | | return; |
| | | } |
| | | finally |
| | | { |
| | | if (!Result) |
| | | { |
| | | Params.Outputs.Add("Segment", new HSegment()); |
| | | } |
| | | |
| | | bCompleted = true; |
| | | #region å
åéæ¾ |
| | | ho_Regions.Dispose(); |
| | | #endregion |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace LB_VisionProcesses.Alogrithms.Halcon |
| | | { |
| | | partial class HFilterToolEdit |
| | | { |
| | | /// <summary> |
| | | /// å¿
éç设计å¨åéã |
| | | /// </summary> |
| | | private System.ComponentModel.IContainer components = null; |
| | | |
| | | /// <summary> |
| | | /// æ¸
çæææ£å¨ä½¿ç¨çèµæºã |
| | | /// </summary> |
| | | /// <param name="disposing">妿åºéæ¾æç®¡èµæºï¼ä¸º trueï¼å¦å为 falseã</param> |
| | | protected override void Dispose(bool disposing) |
| | | { |
| | | if (disposing && (components != null)) |
| | | { |
| | | components.Dispose(); |
| | | } |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | #region ç»ä»¶è®¾è®¡å¨çæç代ç |
| | | |
| | | /// <summary> |
| | | /// è®¾è®¡å¨æ¯ææéçæ¹æ³ - ä¸è¦ä¿®æ¹ |
| | | /// 使ç¨ä»£ç ç¼è¾å¨ä¿®æ¹æ¤æ¹æ³çå
容ã |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | pnlInputImage = new Panel(); |
| | | TopToolStrip = new ToolStrip(); |
| | | btnRun = new ToolStripButton(); |
| | | btnLoadImage = new ToolStripButton(); |
| | | btnSaveParas = new ToolStripButton(); |
| | | btnLoadParas = new ToolStripButton(); |
| | | BtmStatusStrip = new StatusStrip(); |
| | | lblResult = new ToolStripStatusLabel(); |
| | | lblMsg = new ToolStripStatusLabel(); |
| | | lblRunTime = new ToolStripStatusLabel(); |
| | | MainTableLayoutPanel = new TableLayoutPanel(); |
| | | parasTabControl = new TabControl(); |
| | | tabPage1 = new TabPage(); |
| | | tableLayoutPanel1 = new TableLayoutPanel(); |
| | | dataGridViewFi = new DataGridView(); |
| | | tableLayoutPanel4 = new TableLayoutPanel(); |
| | | tableLayoutPanel6 = new TableLayoutPanel(); |
| | | txtGuassSize = new TextBox(); |
| | | labelGuassSize = new Label(); |
| | | tableLayoutPanel3 = new TableLayoutPanel(); |
| | | cmbFilterType = new ComboBox(); |
| | | btnAdd = new Button(); |
| | | labelFilterType = new Label(); |
| | | btnDel = new Button(); |
| | | tableLayoutPanel5 = new TableLayoutPanel(); |
| | | labelMaskWidth = new Label(); |
| | | labelMaskHeight = new Label(); |
| | | txtMaskWidth = new TextBox(); |
| | | txtMaskHeight = new TextBox(); |
| | | tabPage5 = new TabPage(); |
| | | tableLayoutPanel2 = new TableLayoutPanel(); |
| | | cmbTypeRoi = new ComboBox(); |
| | | label21 = new Label(); |
| | | label22 = new Label(); |
| | | cmbFixture = new ComboBox(); |
| | | ckbDrawRoi = new CheckBox(); |
| | | imgTabControl = new TabControl(); |
| | | tabPageInputImage = new TabPage(); |
| | | tabPageRecordImage = new TabPage(); |
| | | pnlRecordImage = new Panel(); |
| | | TopToolStrip.SuspendLayout(); |
| | | BtmStatusStrip.SuspendLayout(); |
| | | MainTableLayoutPanel.SuspendLayout(); |
| | | parasTabControl.SuspendLayout(); |
| | | tabPage1.SuspendLayout(); |
| | | tableLayoutPanel1.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)dataGridViewFi).BeginInit(); |
| | | tableLayoutPanel4.SuspendLayout(); |
| | | tableLayoutPanel6.SuspendLayout(); |
| | | tableLayoutPanel3.SuspendLayout(); |
| | | tableLayoutPanel5.SuspendLayout(); |
| | | tabPage5.SuspendLayout(); |
| | | tableLayoutPanel2.SuspendLayout(); |
| | | imgTabControl.SuspendLayout(); |
| | | tabPageInputImage.SuspendLayout(); |
| | | tabPageRecordImage.SuspendLayout(); |
| | | SuspendLayout(); |
| | | // |
| | | // pnlInputImage |
| | | // |
| | | pnlInputImage.Dock = DockStyle.Fill; |
| | | pnlInputImage.Location = new Point(4, 4); |
| | | pnlInputImage.Margin = new Padding(5); |
| | | pnlInputImage.Name = "pnlInputImage"; |
| | | pnlInputImage.Size = new Size(782, 603); |
| | | pnlInputImage.TabIndex = 44; |
| | | // |
| | | // TopToolStrip |
| | | // |
| | | TopToolStrip.ImageScalingSize = new Size(20, 20); |
| | | TopToolStrip.Items.AddRange(new ToolStripItem[] { btnRun, btnLoadImage, btnSaveParas, btnLoadParas }); |
| | | TopToolStrip.Location = new Point(0, 0); |
| | | TopToolStrip.Name = "TopToolStrip"; |
| | | TopToolStrip.Size = new Size(1342, 27); |
| | | TopToolStrip.TabIndex = 45; |
| | | TopToolStrip.Text = "toolStrip1"; |
| | | // |
| | | // btnRun |
| | | // |
| | | btnRun.BackgroundImageLayout = ImageLayout.Zoom; |
| | | btnRun.ImageTransparentColor = Color.Magenta; |
| | | btnRun.Name = "btnRun"; |
| | | btnRun.Size = new Size(43, 24); |
| | | btnRun.Text = "è¿è¡"; |
| | | btnRun.Click += btnRun_Click; |
| | | // |
| | | // btnLoadImage |
| | | // |
| | | btnLoadImage.ImageTransparentColor = Color.Magenta; |
| | | btnLoadImage.Name = "btnLoadImage"; |
| | | btnLoadImage.Size = new Size(43, 24); |
| | | btnLoadImage.Text = "导å¾"; |
| | | btnLoadImage.Click += btnLoadImage_Click; |
| | | // |
| | | // btnSaveParas |
| | | // |
| | | btnSaveParas.ImageTransparentColor = Color.Magenta; |
| | | btnSaveParas.Name = "btnSaveParas"; |
| | | btnSaveParas.Size = new Size(43, 24); |
| | | btnSaveParas.Text = "ä¿å"; |
| | | btnSaveParas.Click += btnSaveParas_Click; |
| | | // |
| | | // btnLoadParas |
| | | // |
| | | btnLoadParas.ImageTransparentColor = Color.Magenta; |
| | | btnLoadParas.Name = "btnLoadParas"; |
| | | btnLoadParas.Size = new Size(43, 24); |
| | | btnLoadParas.Text = "å è½½"; |
| | | // |
| | | // BtmStatusStrip |
| | | // |
| | | BtmStatusStrip.ImageScalingSize = new Size(20, 20); |
| | | BtmStatusStrip.Items.AddRange(new ToolStripItem[] { lblResult, lblMsg, lblRunTime }); |
| | | BtmStatusStrip.Location = new Point(0, 679); |
| | | BtmStatusStrip.Name = "BtmStatusStrip"; |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 18, 0); |
| | | BtmStatusStrip.Size = new Size(1342, 26); |
| | | BtmStatusStrip.TabIndex = 46; |
| | | BtmStatusStrip.Text = "statusStrip1"; |
| | | // |
| | | // lblResult |
| | | // |
| | | lblResult.Name = "lblResult"; |
| | | lblResult.Size = new Size(42, 20); |
| | | lblResult.Text = "True"; |
| | | // |
| | | // lblMsg |
| | | // |
| | | lblMsg.Name = "lblMsg"; |
| | | lblMsg.Size = new Size(69, 20); |
| | | lblMsg.Text = "è¿è¡æå"; |
| | | // |
| | | // lblRunTime |
| | | // |
| | | lblRunTime.Name = "lblRunTime"; |
| | | lblRunTime.Size = new Size(39, 20); |
| | | lblRunTime.Text = "0ms"; |
| | | // |
| | | // MainTableLayoutPanel |
| | | // |
| | | MainTableLayoutPanel.ColumnCount = 2; |
| | | MainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); |
| | | MainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 60F)); |
| | | MainTableLayoutPanel.Controls.Add(parasTabControl, 0, 0); |
| | | MainTableLayoutPanel.Controls.Add(imgTabControl, 1, 0); |
| | | MainTableLayoutPanel.Dock = DockStyle.Fill; |
| | | MainTableLayoutPanel.Location = new Point(0, 27); |
| | | MainTableLayoutPanel.Margin = new Padding(4); |
| | | MainTableLayoutPanel.Name = "MainTableLayoutPanel"; |
| | | MainTableLayoutPanel.RowCount = 1; |
| | | MainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | MainTableLayoutPanel.Size = new Size(1342, 652); |
| | | MainTableLayoutPanel.TabIndex = 47; |
| | | // |
| | | // parasTabControl |
| | | // |
| | | parasTabControl.Controls.Add(tabPage1); |
| | | parasTabControl.Controls.Add(tabPage5); |
| | | parasTabControl.Dock = DockStyle.Fill; |
| | | parasTabControl.Location = new Point(4, 4); |
| | | parasTabControl.Margin = new Padding(4); |
| | | parasTabControl.Name = "parasTabControl"; |
| | | parasTabControl.SelectedIndex = 0; |
| | | parasTabControl.Size = new Size(528, 644); |
| | | parasTabControl.TabIndex = 48; |
| | | // |
| | | // tabPage1 |
| | | // |
| | | tabPage1.Controls.Add(tableLayoutPanel1); |
| | | tabPage1.Location = new Point(4, 29); |
| | | tabPage1.Margin = new Padding(4); |
| | | tabPage1.Name = "tabPage1"; |
| | | tabPage1.Padding = new Padding(4); |
| | | tabPage1.Size = new Size(520, 611); |
| | | tabPage1.TabIndex = 0; |
| | | tabPage1.Text = "è¾å
¥åæ°"; |
| | | tabPage1.UseVisualStyleBackColor = true; |
| | | // |
| | | // tableLayoutPanel1 |
| | | // |
| | | tableLayoutPanel1.ColumnCount = 1; |
| | | tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Controls.Add(dataGridViewFi, 0, 1); |
| | | tableLayoutPanel1.Controls.Add(tableLayoutPanel4, 0, 0); |
| | | tableLayoutPanel1.Dock = DockStyle.Fill; |
| | | tableLayoutPanel1.Location = new Point(4, 4); |
| | | tableLayoutPanel1.Name = "tableLayoutPanel1"; |
| | | tableLayoutPanel1.RowCount = 2; |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 135F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Size = new Size(512, 603); |
| | | tableLayoutPanel1.TabIndex = 1; |
| | | // |
| | | // dataGridViewFi |
| | | // |
| | | dataGridViewFi.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; |
| | | dataGridViewFi.Location = new Point(3, 138); |
| | | dataGridViewFi.Name = "dataGridViewFi"; |
| | | dataGridViewFi.RowHeadersWidth = 51; |
| | | dataGridViewFi.Size = new Size(506, 462); |
| | | dataGridViewFi.TabIndex = 2; |
| | | // |
| | | // tableLayoutPanel4 |
| | | // |
| | | tableLayoutPanel4.ColumnCount = 1; |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 506F)); |
| | | tableLayoutPanel4.Controls.Add(tableLayoutPanel6, 0, 2); |
| | | tableLayoutPanel4.Controls.Add(tableLayoutPanel3, 0, 0); |
| | | tableLayoutPanel4.Controls.Add(tableLayoutPanel5, 0, 1); |
| | | tableLayoutPanel4.Location = new Point(3, 3); |
| | | tableLayoutPanel4.Name = "tableLayoutPanel4"; |
| | | tableLayoutPanel4.RowCount = 3; |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.Size = new Size(506, 125); |
| | | tableLayoutPanel4.TabIndex = 3; |
| | | // |
| | | // tableLayoutPanel6 |
| | | // |
| | | tableLayoutPanel6.ColumnCount = 4; |
| | | tableLayoutPanel6.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel6.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 165F)); |
| | | tableLayoutPanel6.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel6.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 165F)); |
| | | tableLayoutPanel6.Controls.Add(txtGuassSize, 1, 0); |
| | | tableLayoutPanel6.Controls.Add(labelGuassSize, 0, 0); |
| | | tableLayoutPanel6.Dock = DockStyle.Fill; |
| | | tableLayoutPanel6.Location = new Point(3, 93); |
| | | tableLayoutPanel6.Name = "tableLayoutPanel6"; |
| | | tableLayoutPanel6.RowCount = 1; |
| | | tableLayoutPanel6.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel6.Size = new Size(500, 39); |
| | | tableLayoutPanel6.TabIndex = 2; |
| | | // |
| | | // txtGuassSize |
| | | // |
| | | txtGuassSize.Location = new Point(88, 3); |
| | | txtGuassSize.Name = "txtGuassSize"; |
| | | txtGuassSize.Size = new Size(159, 27); |
| | | txtGuassSize.TabIndex = 4; |
| | | // |
| | | // labelGuassSize |
| | | // |
| | | labelGuassSize.AutoSize = true; |
| | | labelGuassSize.Location = new Point(3, 0); |
| | | labelGuassSize.Name = "labelGuassSize"; |
| | | labelGuassSize.Size = new Size(69, 39); |
| | | labelGuassSize.TabIndex = 1; |
| | | labelGuassSize.Text = "髿¯æ ¸å°ºå¯¸"; |
| | | // |
| | | // tableLayoutPanel3 |
| | | // |
| | | tableLayoutPanel3.ColumnCount = 4; |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 165F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel3.Controls.Add(cmbFilterType, 1, 0); |
| | | tableLayoutPanel3.Controls.Add(btnAdd, 2, 0); |
| | | tableLayoutPanel3.Controls.Add(labelFilterType, 0, 0); |
| | | tableLayoutPanel3.Controls.Add(btnDel, 3, 0); |
| | | tableLayoutPanel3.Dock = DockStyle.Fill; |
| | | tableLayoutPanel3.Location = new Point(3, 3); |
| | | tableLayoutPanel3.Name = "tableLayoutPanel3"; |
| | | tableLayoutPanel3.RowCount = 1; |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel3.Size = new Size(500, 39); |
| | | tableLayoutPanel3.TabIndex = 0; |
| | | // |
| | | // cmbFilterType |
| | | // |
| | | cmbFilterType.FormattingEnabled = true; |
| | | cmbFilterType.Location = new Point(89, 4); |
| | | cmbFilterType.Margin = new Padding(4); |
| | | cmbFilterType.Name = "cmbFilterType"; |
| | | cmbFilterType.Size = new Size(157, 28); |
| | | cmbFilterType.TabIndex = 14; |
| | | cmbFilterType.SelectedIndexChanged += cmbFilterType_SelectedIndexChanged; |
| | | // |
| | | // btnAdd |
| | | // |
| | | btnAdd.Location = new Point(253, 3); |
| | | btnAdd.Name = "btnAdd"; |
| | | btnAdd.Size = new Size(119, 33); |
| | | btnAdd.TabIndex = 15; |
| | | btnAdd.Text = "æ·»å "; |
| | | btnAdd.UseVisualStyleBackColor = true; |
| | | btnAdd.Click += btnAdd_Click; |
| | | // |
| | | // labelFilterType |
| | | // |
| | | labelFilterType.AutoSize = true; |
| | | labelFilterType.Location = new Point(3, 0); |
| | | labelFilterType.MaximumSize = new Size(0, 33); |
| | | labelFilterType.MinimumSize = new Size(0, 33); |
| | | labelFilterType.Name = "labelFilterType"; |
| | | labelFilterType.Size = new Size(69, 33); |
| | | labelFilterType.TabIndex = 1; |
| | | labelFilterType.Text = "滤波类å"; |
| | | labelFilterType.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // btnDel |
| | | // |
| | | btnDel.Location = new Point(378, 3); |
| | | btnDel.Name = "btnDel"; |
| | | btnDel.Size = new Size(119, 33); |
| | | btnDel.TabIndex = 16; |
| | | btnDel.Text = "å é¤"; |
| | | btnDel.UseVisualStyleBackColor = true; |
| | | btnDel.Click += btnDel_Click; |
| | | // |
| | | // tableLayoutPanel5 |
| | | // |
| | | tableLayoutPanel5.ColumnCount = 4; |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 165F)); |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 165F)); |
| | | tableLayoutPanel5.Controls.Add(labelMaskWidth, 0, 0); |
| | | tableLayoutPanel5.Controls.Add(labelMaskHeight, 2, 0); |
| | | tableLayoutPanel5.Controls.Add(txtMaskWidth, 1, 0); |
| | | tableLayoutPanel5.Controls.Add(txtMaskHeight, 3, 0); |
| | | tableLayoutPanel5.Dock = DockStyle.Fill; |
| | | tableLayoutPanel5.Location = new Point(3, 48); |
| | | tableLayoutPanel5.Name = "tableLayoutPanel5"; |
| | | tableLayoutPanel5.RowCount = 1; |
| | | tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel5.Size = new Size(500, 39); |
| | | tableLayoutPanel5.TabIndex = 1; |
| | | // |
| | | // labelMaskWidth |
| | | // |
| | | labelMaskWidth.AutoSize = true; |
| | | labelMaskWidth.Location = new Point(3, 0); |
| | | labelMaskWidth.MaximumSize = new Size(0, 33); |
| | | labelMaskWidth.MinimumSize = new Size(0, 33); |
| | | labelMaskWidth.Name = "labelMaskWidth"; |
| | | labelMaskWidth.Size = new Size(54, 33); |
| | | labelMaskWidth.TabIndex = 0; |
| | | labelMaskWidth.Text = "æ©è宽"; |
| | | // |
| | | // labelMaskHeight |
| | | // |
| | | labelMaskHeight.AutoSize = true; |
| | | labelMaskHeight.Location = new Point(253, 0); |
| | | labelMaskHeight.Name = "labelMaskHeight"; |
| | | labelMaskHeight.Size = new Size(54, 20); |
| | | labelMaskHeight.TabIndex = 1; |
| | | labelMaskHeight.Text = "æ©èé«"; |
| | | // |
| | | // txtMaskWidth |
| | | // |
| | | txtMaskWidth.Location = new Point(88, 3); |
| | | txtMaskWidth.Name = "txtMaskWidth"; |
| | | txtMaskWidth.Size = new Size(159, 27); |
| | | txtMaskWidth.TabIndex = 3; |
| | | // |
| | | // txtMaskHeight |
| | | // |
| | | txtMaskHeight.Location = new Point(338, 3); |
| | | txtMaskHeight.Name = "txtMaskHeight"; |
| | | txtMaskHeight.Size = new Size(159, 27); |
| | | txtMaskHeight.TabIndex = 4; |
| | | // |
| | | // tabPage5 |
| | | // |
| | | tabPage5.Controls.Add(tableLayoutPanel2); |
| | | tabPage5.Location = new Point(4, 29); |
| | | tabPage5.Margin = new Padding(4); |
| | | tabPage5.Name = "tabPage5"; |
| | | tabPage5.Size = new Size(520, 611); |
| | | tabPage5.TabIndex = 2; |
| | | tabPage5.Text = "è¿è¡åæ°"; |
| | | tabPage5.UseVisualStyleBackColor = true; |
| | | // |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 4; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 77F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 193F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 26F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Controls.Add(cmbTypeRoi, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(label21, 0, 0); |
| | | tableLayoutPanel2.Controls.Add(label22, 0, 1); |
| | | tableLayoutPanel2.Controls.Add(cmbFixture, 1, 1); |
| | | tableLayoutPanel2.Controls.Add(ckbDrawRoi, 2, 0); |
| | | tableLayoutPanel2.Location = new Point(4, 4); |
| | | tableLayoutPanel2.Margin = new Padding(4); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | | tableLayoutPanel2.RowCount = 8; |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Size = new Size(415, 364); |
| | | tableLayoutPanel2.TabIndex = 4; |
| | | // |
| | | // cmbTypeRoi |
| | | // |
| | | cmbTypeRoi.FormattingEnabled = true; |
| | | cmbTypeRoi.Location = new Point(81, 4); |
| | | cmbTypeRoi.Margin = new Padding(4); |
| | | cmbTypeRoi.Name = "cmbTypeRoi"; |
| | | cmbTypeRoi.Size = new Size(154, 28); |
| | | cmbTypeRoi.TabIndex = 1; |
| | | cmbTypeRoi.SelectedIndexChanged += cmbTypeRoi_SelectedIndexChanged; |
| | | // |
| | | // label21 |
| | | // |
| | | label21.AutoSize = true; |
| | | label21.Dock = DockStyle.Fill; |
| | | label21.Location = new Point(4, 0); |
| | | label21.Margin = new Padding(4, 0, 4, 0); |
| | | label21.Name = "label21"; |
| | | label21.Size = new Size(69, 35); |
| | | label21.TabIndex = 3; |
| | | label21.Text = "ROI"; |
| | | label21.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // label22 |
| | | // |
| | | label22.AutoSize = true; |
| | | label22.Dock = DockStyle.Fill; |
| | | label22.Location = new Point(4, 35); |
| | | label22.Margin = new Padding(4, 0, 4, 0); |
| | | label22.Name = "label22"; |
| | | label22.Size = new Size(69, 35); |
| | | label22.TabIndex = 4; |
| | | label22.Text = "Fixture"; |
| | | label22.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // cmbFixture |
| | | // |
| | | cmbFixture.FormattingEnabled = true; |
| | | cmbFixture.Location = new Point(81, 39); |
| | | cmbFixture.Margin = new Padding(4); |
| | | cmbFixture.Name = "cmbFixture"; |
| | | cmbFixture.Size = new Size(154, 28); |
| | | cmbFixture.TabIndex = 5; |
| | | // |
| | | // ckbDrawRoi |
| | | // |
| | | ckbDrawRoi.AutoSize = true; |
| | | ckbDrawRoi.CheckAlign = ContentAlignment.MiddleCenter; |
| | | ckbDrawRoi.Location = new Point(274, 4); |
| | | ckbDrawRoi.Margin = new Padding(4); |
| | | ckbDrawRoi.Name = "ckbDrawRoi"; |
| | | ckbDrawRoi.Size = new Size(18, 17); |
| | | ckbDrawRoi.TabIndex = 2; |
| | | ckbDrawRoi.UseVisualStyleBackColor = true; |
| | | ckbDrawRoi.CheckedChanged += ckbDrawRoi_CheckedChanged; |
| | | // |
| | | // imgTabControl |
| | | // |
| | | imgTabControl.Controls.Add(tabPageInputImage); |
| | | imgTabControl.Controls.Add(tabPageRecordImage); |
| | | imgTabControl.Dock = DockStyle.Fill; |
| | | imgTabControl.Location = new Point(540, 4); |
| | | imgTabControl.Margin = new Padding(4); |
| | | imgTabControl.Name = "imgTabControl"; |
| | | imgTabControl.SelectedIndex = 0; |
| | | imgTabControl.Size = new Size(798, 644); |
| | | imgTabControl.TabIndex = 49; |
| | | // |
| | | // tabPageInputImage |
| | | // |
| | | tabPageInputImage.Controls.Add(pnlInputImage); |
| | | tabPageInputImage.Location = new Point(4, 29); |
| | | tabPageInputImage.Margin = new Padding(4); |
| | | tabPageInputImage.Name = "tabPageInputImage"; |
| | | tabPageInputImage.Padding = new Padding(4); |
| | | tabPageInputImage.Size = new Size(790, 611); |
| | | tabPageInputImage.TabIndex = 0; |
| | | tabPageInputImage.Text = "è¾å
¥å¾å"; |
| | | tabPageInputImage.UseVisualStyleBackColor = true; |
| | | // |
| | | // tabPageRecordImage |
| | | // |
| | | tabPageRecordImage.Controls.Add(pnlRecordImage); |
| | | tabPageRecordImage.Location = new Point(4, 29); |
| | | tabPageRecordImage.Margin = new Padding(4); |
| | | tabPageRecordImage.Name = "tabPageRecordImage"; |
| | | tabPageRecordImage.Padding = new Padding(4); |
| | | tabPageRecordImage.Size = new Size(790, 611); |
| | | tabPageRecordImage.TabIndex = 1; |
| | | tabPageRecordImage.Text = "ç»æå¾å"; |
| | | tabPageRecordImage.UseVisualStyleBackColor = true; |
| | | // |
| | | // pnlRecordImage |
| | | // |
| | | pnlRecordImage.Dock = DockStyle.Fill; |
| | | pnlRecordImage.Location = new Point(4, 4); |
| | | pnlRecordImage.Margin = new Padding(5); |
| | | pnlRecordImage.Name = "pnlRecordImage"; |
| | | pnlRecordImage.Size = new Size(782, 603); |
| | | pnlRecordImage.TabIndex = 45; |
| | | // |
| | | // HFilterToolEdit |
| | | // |
| | | AutoScaleDimensions = new SizeF(9F, 20F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(MainTableLayoutPanel); |
| | | Controls.Add(BtmStatusStrip); |
| | | Controls.Add(TopToolStrip); |
| | | Margin = new Padding(3, 4, 3, 4); |
| | | Name = "HFilterToolEdit"; |
| | | Size = new Size(1342, 705); |
| | | Load += HFilterToolEdit_Load; |
| | | TopToolStrip.ResumeLayout(false); |
| | | TopToolStrip.PerformLayout(); |
| | | BtmStatusStrip.ResumeLayout(false); |
| | | BtmStatusStrip.PerformLayout(); |
| | | MainTableLayoutPanel.ResumeLayout(false); |
| | | parasTabControl.ResumeLayout(false); |
| | | tabPage1.ResumeLayout(false); |
| | | tableLayoutPanel1.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)dataGridViewFi).EndInit(); |
| | | tableLayoutPanel4.ResumeLayout(false); |
| | | tableLayoutPanel6.ResumeLayout(false); |
| | | tableLayoutPanel6.PerformLayout(); |
| | | tableLayoutPanel3.ResumeLayout(false); |
| | | tableLayoutPanel3.PerformLayout(); |
| | | tableLayoutPanel5.ResumeLayout(false); |
| | | tableLayoutPanel5.PerformLayout(); |
| | | tabPage5.ResumeLayout(false); |
| | | tableLayoutPanel2.ResumeLayout(false); |
| | | tableLayoutPanel2.PerformLayout(); |
| | | imgTabControl.ResumeLayout(false); |
| | | tabPageInputImage.ResumeLayout(false); |
| | | tabPageRecordImage.ResumeLayout(false); |
| | | ResumeLayout(false); |
| | | PerformLayout(); |
| | | } |
| | | |
| | | #endregion |
| | | private System.Windows.Forms.Panel pnlInputImage; |
| | | private ToolStrip TopToolStrip; |
| | | private ToolStripButton btnRun; |
| | | private StatusStrip BtmStatusStrip; |
| | | private ToolStripStatusLabel lblResult; |
| | | private ToolStripStatusLabel lblMsg; |
| | | private TableLayoutPanel MainTableLayoutPanel; |
| | | private ToolStripButton btnLoadImage; |
| | | private TabControl parasTabControl; |
| | | private TabPage tabPage1; |
| | | private TabPage tabPage5; |
| | | private TabControl imgTabControl; |
| | | private TabPage tabPageInputImage; |
| | | private TabPage tabPageRecordImage; |
| | | private ToolStripButton btnSaveParas; |
| | | private ToolStripButton btnLoadParas; |
| | | private Panel pnlRecordImage; |
| | | private ToolStripStatusLabel lblRunTime; |
| | | private TableLayoutPanel tableLayoutPanel2; |
| | | public ComboBox cmbTypeRoi; |
| | | private Label label21; |
| | | private Label label22; |
| | | private ComboBox cmbFixture; |
| | | private CheckBox ckbDrawRoi; |
| | | private TableLayoutPanel tableLayoutPanel1; |
| | | private TableLayoutPanel tableLayoutPanel3; |
| | | private Label labelFilterType; |
| | | private ComboBox cmbFilterType; |
| | | private DataGridView dataGridViewFi; |
| | | private TableLayoutPanel tableLayoutPanel4; |
| | | private Button btnAdd; |
| | | private TableLayoutPanel tableLayoutPanel5; |
| | | private Label labelMaskWidth; |
| | | private Label labelMaskHeight; |
| | | private TextBox txtMaskWidth; |
| | | private TextBox txtMaskHeight; |
| | | private TableLayoutPanel tableLayoutPanel6; |
| | | private TextBox txtGuassSize; |
| | | private Label labelGuassSize; |
| | | private Button btnDel; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HalconDotNet; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionControl; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace LB_VisionProcesses.Alogrithms.Halcon |
| | | { |
| | | public partial class HFilterToolEdit : TAlgorithmEdit |
| | | { |
| | | List<RecordFilterData> recordFilterDatas = new List<RecordFilterData>(); |
| | | private int rowriginalHeight; |
| | | public HFilterToolEdit(HFilterTool subject = null) |
| | | { |
| | | if (subject != null && subject is HFilterTool) |
| | | Subject = subject; |
| | | else |
| | | Subject = new HFilterTool(); |
| | | |
| | | //if (!(Subject.Params.ROI is HSegment)) |
| | | // Subject.Params.ROI = new HSegment(0, 0, 250, 250); |
| | | |
| | | this.Dock = DockStyle.Fill; |
| | | InitializeComponent(); |
| | | // ä¿ååå§è¡é«åº¦ |
| | | rowriginalHeight = (int)tableLayoutPanel4.RowStyles[1].Height; //45; |
| | | recordFilterDatas = FilterManager.Instance.GetAllUsers(); |
| | | |
| | | InitializeComboBox(); |
| | | InitializeDataGridView(); |
| | | |
| | | |
| | | |
| | | this.dataGridViewFi.DataSource = recordFilterDatas; |
| | | this.dataGridViewFi.AutoGenerateColumns = true; |
| | | } |
| | | |
| | | private void InitializeComboBox() |
| | | { |
| | | // æ·»å æéé项 |
| | | foreach (var item in Enum.GetValues(typeof(FilterType))) |
| | | { |
| | | cmbFilterType.Items.Add(item.ToString()); |
| | | } |
| | | |
| | | // 设置é»è®¤éæ©é¡¹ |
| | | cmbFilterType.SelectedIndex = 0; |
| | | } |
| | | |
| | | private void InitializeDataGridView() |
| | | { |
| | | this.dataGridViewFi.DataSource = recordFilterDatas; |
| | | |
| | | // 设置DataGridViewå宽 |
| | | dataGridViewFi.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ§ä»¶å è½½äºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void HFilterToolEdit_Load(object sender, EventArgs e) |
| | | { |
| | | pnlInputImage.Controls.Add(inputImageHSmartWindowControl); |
| | | inputImageHSmartWindowControl.Dock = DockStyle.Fill; |
| | | |
| | | pnlRecordImage.Controls.Add(recordImageHSmartWindowControl); |
| | | recordImageHSmartWindowControl.Dock = DockStyle.Fill; |
| | | |
| | | //éåå¯ä»¥éæ©çRoiç±»åæä¸¾ |
| | | foreach (var value in Enum.GetValues(typeof(RoiType))) |
| | | cmbTypeRoi.Items.Add(value.ToString()); |
| | | |
| | | //éåå¯ä»¥éæ©çå¾å滤波类åæä¸¾ |
| | | //foreach (var value in Enum.GetValues(typeof(FilterType))) |
| | | // cmbFilterType.Items.Add(value.ToString()); |
| | | |
| | | //éåå¯ä»¥éæ©çFixtureæä¸¾ |
| | | cmbFixture.Items.Add(""); |
| | | foreach (string value in IProcess.dicFixtures.Keys) |
| | | cmbFixture.Items.Add(value.ToString()); |
| | | |
| | | ckbDrawRoi.Checked = true; |
| | | cmbTypeRoi.Text = RoiType.Segment.ToString(); |
| | | cmbFilterType.Text = FilterType.å弿»¤æ³¢_MeanImage.ToString(); |
| | | LoadParas(); |
| | | |
| | | if (Subject.Result) |
| | | { |
| | | lblResult.BackColor = Color.Green; |
| | | lblResult.Text = "True"; |
| | | } |
| | | else |
| | | { |
| | | lblResult.BackColor = Color.Red; |
| | | lblResult.Text = "False"; |
| | | } |
| | | |
| | | lblMsg.Text = Msg.Length > 50 ? Msg.Substring(0, 50) : Msg; |
| | | lblMsgToolTip.SetToolTip(BtmStatusStrip, Msg); |
| | | lblRunTime.Text = $"{Subject.RunTime}ms"; |
| | | } |
| | | |
| | | private void ClearInputFields() |
| | | { |
| | | txtMaskWidth.Clear(); |
| | | txtMaskHeight.Clear(); |
| | | txtGuassSize.Clear(); |
| | | cmbFilterType.SelectedIndex = 0; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å ç®å |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void btnAdd_Click(object sender, EventArgs e) |
| | | { |
| | | // éªè¯è¾å
¥ |
| | | switch (cmbFilterType.SelectedIndex) |
| | | { |
| | | case 0: |
| | | if (string.IsNullOrWhiteSpace(txtMaskWidth.Text) || string.IsNullOrWhiteSpace(txtMaskHeight.Text)) |
| | | { |
| | | MessageBox.Show("è¯·å¡«åææå¿
å¡«åæ®µï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | break; |
| | | case 1: |
| | | if (string.IsNullOrWhiteSpace(txtGuassSize.Text)) |
| | | { |
| | | MessageBox.Show("è¯·å¡«åææå¿
å¡«åæ®µï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | break; |
| | | case 2: |
| | | if (string.IsNullOrWhiteSpace(txtMaskWidth.Text) || string.IsNullOrWhiteSpace(txtMaskHeight.Text)) |
| | | { |
| | | MessageBox.Show("è¯·å¡«åææå¿
å¡«åæ®µï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | RecordFilterData filter = new RecordFilterData(); |
| | | filter.MaskWidth = this.txtMaskWidth.Text; |
| | | filter.MaskHight = this.txtMaskHeight.Text; |
| | | filter.GaussSize = this.txtGuassSize.Text; |
| | | filter.FilterName = (FilterType)this.cmbFilterType.SelectedIndex; |
| | | // æ·»å å° UserManager |
| | | bool success = FilterManager.Instance.AddFilter(filter); |
| | | if (success) |
| | | { |
| | | recordFilterDatas.Add(filter); |
| | | //MessageBox.Show("ç¨æ·æ·»å æåï¼", "æç¤º", |
| | | // MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | |
| | | // æ¸
空è¾å
¥æ¡ |
| | | ClearInputFields(); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æ·»å ç¨æ·å¤±è´¥ï¼", "é误", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | recordFilterDatas = FilterManager.Instance.GetAllUsers(); |
| | | this.dataGridViewFi.DataSource = recordFilterDatas; |
| | | this.dataGridViewFi.AutoGenerateColumns = true; |
| | | } |
| | | |
| | | private void btnDel_Click(object sender, EventArgs e) |
| | | { |
| | | // æ£æ¥æ¯å¦æéä¸ç滤波类å |
| | | if (cmbFilterType.SelectedIndex < 0) |
| | | { |
| | | MessageBox.Show("è¯·éæ©è¦å é¤ç滤波类åï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | | DataGridViewRow selectedRow = dataGridViewFi.SelectedRows[0]; |
| | | string filterToDel = selectedRow.Cells[0].Value?.ToString(); |
| | | |
| | | |
| | | FilterType filterToDelete = (FilterType)cmbFilterType.SelectedIndex; |
| | | |
| | | // æ¥æ¾å¯¹åºçè®°å½ |
| | | RecordFilterData filterToRemove = null; |
| | | |
| | | // 仿¬å°åè¡¨ä¸æ¥æ¾ |
| | | foreach (var filter in recordFilterDatas) |
| | | { |
| | | if (filter.FilterName.ToString() == filterToDel) |
| | | { |
| | | filterToRemove = filter; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (filterToRemove == null) |
| | | { |
| | | MessageBox.Show("æªæ¾å°å¯¹åºçè®°å½ï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | |
| | | // 确认å é¤ |
| | | DialogResult result = MessageBox.Show( |
| | | $"ç¡®å®è¦å é¤ '{filterToDel}' è®°å½åï¼", |
| | | "确认å é¤", |
| | | MessageBoxButtons.YesNo, |
| | | MessageBoxIcon.Question, |
| | | MessageBoxDefaultButton.Button2); // é»è®¤éæ©"å¦" |
| | | |
| | | if (result == DialogResult.No) |
| | | return; |
| | | |
| | | // ä»ç®¡çå¨ä¸å é¤ |
| | | bool success = FilterManager.Instance.DeleteUser(filterToRemove); |
| | | |
| | | if (success) |
| | | { |
| | | // 仿¬å°å表ä¸å é¤ |
| | | recordFilterDatas.Remove(filterToRemove); |
| | | |
| | | MessageBox.Show("å 餿åï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("å é¤å¤±è´¥ï¼", "é误", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | recordFilterDatas = FilterManager.Instance.GetAllUsers(); |
| | | this.dataGridViewFi.DataSource = recordFilterDatas; |
| | | this.dataGridViewFi.AutoGenerateColumns = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show("è¯·éæ©è¦å é¤çç®å"); |
| | | } |
| | | } |
| | | #region ç®æ³éæ©ä¸ææ¡ |
| | | private void cmbFilterType_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | ComboBox cb = sender as ComboBox; |
| | | |
| | | if (cb.SelectedIndex == 0) |
| | | { |
| | | ShowRow1(); |
| | | } |
| | | else if (cb.SelectedIndex == 1) |
| | | { |
| | | ShowRow2(); |
| | | } |
| | | else |
| | | { |
| | | ShowRow1(); |
| | | } |
| | | } |
| | | private void ShowRow1() |
| | | { |
| | | // æ¾ç¤ºRow2ï¼æ¢å¤é«åº¦ï¼ |
| | | tableLayoutPanel4.RowStyles[1].SizeType = SizeType.Absolute; |
| | | tableLayoutPanel4.RowStyles[1].Height = rowriginalHeight; |
| | | tableLayoutPanel4.RowStyles[2].SizeType = SizeType.Absolute; |
| | | tableLayoutPanel4.RowStyles[2].Height = 0; |
| | | |
| | | // æ¾ç¤ºRow2ä¸çæ§ä»¶ |
| | | foreach (Control ctrl in tableLayoutPanel4.Controls) |
| | | { |
| | | int row = tableLayoutPanel4.GetRow(ctrl); |
| | | if (row == 1) |
| | | ctrl.Visible = true; |
| | | if (row == 2) |
| | | ctrl.Visible = false; |
| | | } |
| | | } |
| | | |
| | | private void ShowRow2() |
| | | { |
| | | // æ¾ç¤ºRow2ï¼æ¢å¤é«åº¦ï¼ |
| | | tableLayoutPanel4.RowStyles[1].SizeType = SizeType.Absolute; |
| | | tableLayoutPanel4.RowStyles[1].Height = 0; |
| | | tableLayoutPanel4.RowStyles[2].SizeType = SizeType.Absolute; |
| | | tableLayoutPanel4.RowStyles[2].Height = rowriginalHeight; |
| | | |
| | | // æ¾ç¤ºRow2ä¸çæ§ä»¶ |
| | | foreach (Control ctrl in tableLayoutPanel4.Controls) |
| | | { |
| | | int row = tableLayoutPanel4.GetRow(ctrl); |
| | | if (row == 1) |
| | | ctrl.Visible = false; |
| | | if (row == 2) |
| | | ctrl.Visible = true; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ROI |
| | | /// <summary> |
| | | /// æ´æ°è¿è¡åæ° |
| | | /// </summary> |
| | | public override void UpdataInputs() |
| | | { |
| | | //设置è¿è¡åæ° |
| | | double dResult = 0; |
| | | int iResult = 0; |
| | | |
| | | if (cmbFixture.Text == "") |
| | | Subject.Params.Fixture = new Fixture(); |
| | | else if (IProcess.dicFixtures.ContainsKey(cmbFixture.Text)) |
| | | Subject.Params.Fixture = IProcess.dicFixtures[cmbFixture.Text]; |
| | | |
| | | Type type = inputImageHSmartWindowControl.oRoi?.GetType(); |
| | | switch (type) |
| | | { |
| | | case Type t when t == typeof(HRectangle2): |
| | | HRectangle2 hRectangle2 = (HRectangle2)inputImageHSmartWindowControl.oRoi; |
| | | Subject.Params.ROI |
| | | = new HRectangle2(hRectangle2.X - Subject.Params.Fixture.X, hRectangle2.Y - Subject.Params.Fixture.Y |
| | | , hRectangle2.Phi - Subject.Params.Fixture.Phi, hRectangle2.Width, hRectangle2.Height); |
| | | break; |
| | | case Type t when t == typeof(HCircle): |
| | | HCircle hCircle = (HCircle)inputImageHSmartWindowControl.oRoi; |
| | | Subject.Params.ROI |
| | | = new HCircle(hCircle.X - Subject.Params.Fixture.X, hCircle.Y - Subject.Params.Fixture.Y, hCircle.Radius); |
| | | break; |
| | | case Type t when t == typeof(HSegment): |
| | | HSegment hSegment = (HSegment)inputImageHSmartWindowControl.oRoi; |
| | | Subject.Params.ROI |
| | | = new HSegment(hSegment.StartX - Subject.Params.Fixture.X, hSegment.StartY - Subject.Params.Fixture.Y |
| | | , hSegment.EndX - Subject.Params.Fixture.X, hSegment.EndY - Subject.Params.Fixture.Y); |
| | | break; |
| | | default: |
| | | Subject.Params.ROI = new ROI(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½è¿è¡åæ° |
| | | /// </summary> |
| | | public override void LoadParas() |
| | | { |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | |
| | | if (Subject.InputImage != null && Subject.InputImage is HObject) |
| | | inputImageHSmartWindowControl.ShowHoImage((HObject)Subject.InputImage); |
| | | |
| | | Type type = Subject.Params.ROI?.GetType(); |
| | | if (Subject.Params.ROI != null) |
| | | { |
| | | switch (type) |
| | | { |
| | | case Type t when t == typeof(HRectangle2): |
| | | cmbTypeRoi.Text = RoiType.Rectangle2.ToString(); |
| | | break; |
| | | case Type t when t == typeof(HCircle): |
| | | cmbTypeRoi.Text = RoiType.Circle.ToString(); |
| | | break; |
| | | case Type t when t == typeof(HSegment): |
| | | cmbTypeRoi.Text = RoiType.Segment.ToString(); |
| | | break; |
| | | default: |
| | | cmbTypeRoi.Text = RoiType.None.ToString(); |
| | | break; |
| | | } |
| | | if (cmbTypeRoi.Text.ToString() != "None") |
| | | ckbDrawRoi.Checked = true; |
| | | else |
| | | ckbDrawRoi.Checked = false; |
| | | |
| | | inputImageHSmartWindowControl.oRoi = Subject.Params.ROI; |
| | | } |
| | | |
| | | if (Subject.Params.Fixture != null) |
| | | cmbFixture.Text = Subject.Params.Fixture.strName; |
| | | else |
| | | cmbFixture.Text = ""; |
| | | |
| | | switch (type) |
| | | { |
| | | case Type t when t == typeof(HRectangle2): |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HRectangle2(Subject.Params.ROI.X + Subject.Params.Fixture.X, Subject.Params.ROI.Y + Subject.Params.Fixture.Y |
| | | , Subject.Params.ROI.Phi + Subject.Params.Fixture.Phi, ((HRectangle2)Subject.Params.ROI).Width, ((HRectangle2)Subject.Params.ROI).Height); |
| | | break; |
| | | case Type t when t == typeof(HCircle): |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HCircle(Subject.Params.ROI.X + Subject.Params.Fixture.X, Subject.Params.ROI.Y + Subject.Params.Fixture.Y |
| | | , ((HCircle)Subject.Params.ROI).Radius); |
| | | break; |
| | | case Type t when t == typeof(HSegment): |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HSegment(((HSegment)Subject.Params.ROI).StartX + Subject.Params.Fixture.X, ((HSegment)Subject.Params.ROI).StartY + Subject.Params.Fixture.Y |
| | | , ((HSegment)Subject.Params.ROI).EndX + Subject.Params.Fixture.X, ((HSegment)Subject.Params.ROI).EndY + Subject.Params.Fixture.Y); |
| | | break; |
| | | default: |
| | | inputImageHSmartWindowControl.oRoi = null; |
| | | break; |
| | | } |
| | | base.LoadParas(); |
| | | })); |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥å
·æ æé®äºä»¶ |
| | | /// <summary> |
| | | /// ç¹å»è¿è¡ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void btnRun_Click(object sender, EventArgs e) |
| | | { |
| | | if (Subject.InputImage != null) |
| | | InputImage = Subject.InputImage; |
| | | |
| | | DateTime StartTime = DateTime.Now; |
| | | Run(); |
| | | |
| | | //æ´æ°æ¥å¿ä¸ç»æ |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | if (Subject.Result) |
| | | { |
| | | lblResult.BackColor = Color.Green; |
| | | lblResult.Text = "True"; |
| | | recordImageHSmartWindowControl.SetColor("green"); |
| | | } |
| | | else |
| | | { |
| | | lblResult.BackColor = Color.Red; |
| | | lblResult.Text = "False"; |
| | | recordImageHSmartWindowControl.SetColor("red"); |
| | | } |
| | | |
| | | lblMsg.Text = Msg.Length > 50 ? Msg.Substring(0, 50) : Msg; |
| | | lblMsgToolTip.SetToolTip(BtmStatusStrip, Msg); |
| | | lblRunTime.Text = $"{(DateTime.Now - StartTime).TotalMilliseconds}ms"; |
| | | |
| | | UpdataOutputs(); |
| | | imgTabControl.SelectedTab = tabPageRecordImage; |
| | | |
| | | if (Subject.InputImage != null && Subject.InputImage is HObject) |
| | | { |
| | | HOperatorSet.GetImageSize((HObject)Subject.InputImage, out HTuple ho_ImageWidth, out HTuple ho_ImageHeight); |
| | | recordImageHSmartWindowControl.ShowHoImage((HObject)Subject.InputImage); |
| | | } |
| | | |
| | | //å
夿åç±»å夿ç¶ç±» |
| | | if (Subject.Record != null && Subject.Record is MsgRecord msgRecord) |
| | | { |
| | | recordImageHSmartWindowControl.DispObj(msgRecord.RecordObject_OK, true); |
| | | recordImageHSmartWindowControl.DispObj(msgRecord.RecordObject_NG, false); |
| | | |
| | | for (int i = 0; i < msgRecord.Msg.Length; i++) |
| | | recordImageHSmartWindowControl.ShowMsg(msgRecord.Msg[i] |
| | | , 1 == msgRecord.Result[i] ? true : false, msgRecord.Column[i], msgRecord.Row[i]); |
| | | } |
| | | else if (Subject.Record != null && Subject.Record is ObjectRecord objRecord) |
| | | { |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_OK, true); |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_NG, false); |
| | | } |
| | | |
| | | GC.Collect(); |
| | | })); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å·¥å
·æ â导å¾â |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void btnLoadImage_Click(object sender, EventArgs e) |
| | | { |
| | | OpenFileDialog openFileDialog = new OpenFileDialog(); |
| | | |
| | | // 设置æä»¶å¯¹è¯æ¡ç屿§ |
| | | openFileDialog.Multiselect = false; // ä¸å
许å¤é |
| | | // 设置æä»¶è¿æ»¤å¨ï¼æ¯æå¤ç§æä»¶ç±»å |
| | | openFileDialog.Filter = "Image Files (*.png;*.jpg;*.jpeg;*.bmp)|*.png;*.jpg;*.jpeg;*.bmp|All Files (*.*)|*.*"; |
| | | // æ¾ç¤ºæä»¶å¯¹è¯æ¡ |
| | | DialogResult result = openFileDialog.ShowDialog(); |
| | | |
| | | // å¤çå¯¹è¯æ¡è¿åç»æ |
| | | if (result == DialogResult.OK) |
| | | { |
| | | // è·åç¨æ·éæ©çæä»¶å |
| | | string[] selectedFiles = openFileDialog.FileNames; |
| | | if (selectedFiles.Length > 0) |
| | | { |
| | | HOperatorSet.ReadImage(out HObject ho_Image, selectedFiles[0]); |
| | | //夿æ¯å¦ä¸ºç°åº¦å¾ |
| | | using (HDevDisposeHelper dh = new HDevDisposeHelper()) |
| | | { |
| | | HOperatorSet.CountChannels(ho_Image, out HTuple hv_Channels); |
| | | if (hv_Channels.TupleInt() != 1) |
| | | { |
| | | HOperatorSet.Rgb1ToGray(ho_Image, out ho_Image); |
| | | //æ´æ°æ¥å¿ä¸ç»æ |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | lblMsg.Text = "导å
¥å¾çéç°åº¦å¾,èªå¨è½¬æ¢ä¸ºç°åº¦å¾"; |
| | | })); |
| | | } |
| | | InputImage = ho_Image; |
| | | imgTabControl.SelectedTab = tabPageInputImage; |
| | | inputImageHSmartWindowControl.oRoi = inputImageHSmartWindowControl.oRoi; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å·¥å
·æ âä¿åâ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void btnSaveParas_Click(object sender, EventArgs e) { base.btnSaveParas_Click(sender, e); } |
| | | #endregion |
| | | |
| | | #region ROIåè½ |
| | | /// <summary> |
| | | /// æ¯å¦å¯ç¨ROI |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void ckbDrawRoi_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | if (ckbDrawRoi.Checked) |
| | | { |
| | | inputImageHSmartWindowControl.bAollowDraw = true; |
| | | imgTabControl.SelectedTab = tabPageInputImage; |
| | | } |
| | | else |
| | | { |
| | | inputImageHSmartWindowControl.bAollowDraw = false; |
| | | Subject.Params.ROI = new ROI(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// ROIä¸ææ¡æ¹åäºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void cmbTypeRoi_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (Enum.TryParse(cmbTypeRoi.Text.ToString(), out RoiType type)) |
| | | { |
| | | HTuple hv_imageWidth = 0; |
| | | HTuple hv_imageHeight = 0; |
| | | if (InputImage != null && InputImage is HObject) |
| | | HOperatorSet.GetImageSize((HObject)InputImage, out hv_imageWidth, out hv_imageHeight); |
| | | switch (type) |
| | | { |
| | | case RoiType.Rectangle2: |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HRectangle2(hv_imageWidth.TupleReal() / 2, hv_imageHeight.TupleReal() / 2, 0 |
| | | , hv_imageWidth.TupleReal() / 4, hv_imageHeight.TupleReal() / 4); |
| | | break; |
| | | case RoiType.Circle: |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HCircle(hv_imageWidth.TupleReal() / 2, hv_imageHeight.TupleReal() / 2, hv_imageWidth.TupleReal() / 4); |
| | | break; |
| | | case RoiType.Segment: |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HSegment(0, 0, hv_imageWidth.TupleReal() / 4, hv_imageHeight.TupleReal() / 4); |
| | | break; |
| | | case RoiType.None: |
| | | default: |
| | | inputImageHSmartWindowControl.oRoi = null; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | } |
| | | public override void cmbFixture_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (IProcess.dicFixtures.ContainsKey(cmbFixture.Text)) |
| | | Subject.Params.Fixture = IProcess.dicFixtures[cmbFixture.Text]; |
| | | else |
| | | Subject.Params.Fixture = new Fixture(); |
| | | } |
| | | catch { } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="lblMsgToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>183, 17</value> |
| | | </metadata> |
| | | <metadata name="BtmStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>340, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing; |
| | | using System.Drawing.Imaging; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | Result = false; |
| | | return; |
| | | } |
| | | if (InputImage is Bitmap) |
| | | { |
| | | try |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | if (!(InputImage is HObject)) |
| | | { |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºMat"; |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºHObject"; |
| | | Result = false; |
| | | return; |
| | | } |
| | |
| | | // tablePanelParas |
| | | // |
| | | tablePanelParas.ColumnCount = 4; |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 90F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 116F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 90F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 116F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tablePanelParas.Controls.Add(label1, 0, 0); |
| | | tablePanelParas.Controls.Add(dtxtMinThreshold, 1, 0); |
| | |
| | | tablePanelParas.Controls.Add(label10, 2, 3); |
| | | tablePanelParas.Controls.Add(dtxtCodeLength, 3, 3); |
| | | tablePanelParas.Dock = DockStyle.Fill; |
| | | tablePanelParas.Location = new Point(3, 3); |
| | | tablePanelParas.Margin = new Padding(2, 3, 2, 3); |
| | | tablePanelParas.Location = new Point(4, 4); |
| | | tablePanelParas.Margin = new Padding(3, 4, 3, 4); |
| | | tablePanelParas.Name = "tablePanelParas"; |
| | | tablePanelParas.RowCount = 10; |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10.000001F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10.000001F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.Size = new Size(397, 510); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.Size = new Size(512, 603); |
| | | tablePanelParas.TabIndex = 0; |
| | | // |
| | | // label1 |
| | | // |
| | | label1.AutoSize = true; |
| | | label1.Location = new Point(2, 0); |
| | | label1.Margin = new Padding(2, 0, 2, 0); |
| | | label1.MaximumSize = new Size(0, 28); |
| | | label1.MinimumSize = new Size(0, 28); |
| | | label1.Location = new Point(3, 0); |
| | | label1.MaximumSize = new Size(0, 33); |
| | | label1.MinimumSize = new Size(0, 33); |
| | | label1.Name = "label1"; |
| | | label1.Size = new Size(68, 28); |
| | | label1.Size = new Size(84, 33); |
| | | label1.TabIndex = 0; |
| | | label1.Text = "æå°ç°åº¦å¼"; |
| | | label1.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtMinThreshold |
| | | // |
| | | dtxtMinThreshold.Location = new Point(92, 3); |
| | | dtxtMinThreshold.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMinThreshold.Location = new Point(119, 4); |
| | | dtxtMinThreshold.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMinThreshold.Name = "dtxtMinThreshold"; |
| | | dtxtMinThreshold.Size = new Size(98, 23); |
| | | dtxtMinThreshold.Size = new Size(125, 27); |
| | | dtxtMinThreshold.TabIndex = 5; |
| | | dtxtMinThreshold.Text = "80"; |
| | | // |
| | | // dtxtMaxThreshold |
| | | // |
| | | dtxtMaxThreshold.Location = new Point(290, 3); |
| | | dtxtMaxThreshold.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtMaxThreshold.Location = new Point(375, 4); |
| | | dtxtMaxThreshold.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtMaxThreshold.Name = "dtxtMaxThreshold"; |
| | | dtxtMaxThreshold.Size = new Size(98, 23); |
| | | dtxtMaxThreshold.Size = new Size(125, 27); |
| | | dtxtMaxThreshold.TabIndex = 6; |
| | | dtxtMaxThreshold.Text = "180"; |
| | | // |
| | | // label19 |
| | | // |
| | | label19.AutoSize = true; |
| | | label19.Location = new Point(3, 51); |
| | | label19.Location = new Point(4, 60); |
| | | label19.Margin = new Padding(4, 0, 4, 0); |
| | | label19.Name = "label19"; |
| | | label19.Size = new Size(56, 17); |
| | | label19.Size = new Size(69, 20); |
| | | label19.TabIndex = 19; |
| | | label19.Text = "æå°æ°é"; |
| | | // |
| | | // dtxtMinCount |
| | | // |
| | | dtxtMinCount.Location = new Point(93, 54); |
| | | dtxtMinCount.Location = new Point(120, 64); |
| | | dtxtMinCount.Margin = new Padding(4, 4, 4, 4); |
| | | dtxtMinCount.Name = "dtxtMinCount"; |
| | | dtxtMinCount.Size = new Size(97, 23); |
| | | dtxtMinCount.Size = new Size(124, 27); |
| | | dtxtMinCount.TabIndex = 17; |
| | | dtxtMinCount.Text = "0"; |
| | | // |
| | | // label2 |
| | | // |
| | | label2.AutoSize = true; |
| | | label2.Location = new Point(200, 0); |
| | | label2.Margin = new Padding(2, 0, 2, 0); |
| | | label2.MaximumSize = new Size(0, 28); |
| | | label2.MinimumSize = new Size(0, 28); |
| | | label2.Location = new Point(259, 0); |
| | | label2.MaximumSize = new Size(0, 33); |
| | | label2.MinimumSize = new Size(0, 33); |
| | | label2.Name = "label2"; |
| | | label2.Size = new Size(68, 28); |
| | | label2.Size = new Size(84, 33); |
| | | label2.TabIndex = 1; |
| | | label2.Text = "æå¤§ç°åº¦å¼"; |
| | | label2.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // label20 |
| | | // |
| | | label20.AutoSize = true; |
| | | label20.Location = new Point(201, 51); |
| | | label20.Location = new Point(260, 60); |
| | | label20.Margin = new Padding(4, 0, 4, 0); |
| | | label20.Name = "label20"; |
| | | label20.Size = new Size(56, 17); |
| | | label20.Size = new Size(69, 20); |
| | | label20.TabIndex = 20; |
| | | label20.Text = "æå¤§æ°é"; |
| | | // |
| | | // dtxtMaxCount |
| | | // |
| | | dtxtMaxCount.Location = new Point(291, 54); |
| | | dtxtMaxCount.Location = new Point(376, 64); |
| | | dtxtMaxCount.Margin = new Padding(4, 4, 4, 4); |
| | | dtxtMaxCount.Name = "dtxtMaxCount"; |
| | | dtxtMaxCount.Size = new Size(97, 23); |
| | | dtxtMaxCount.Size = new Size(124, 27); |
| | | dtxtMaxCount.TabIndex = 18; |
| | | dtxtMaxCount.Text = "9999"; |
| | | // |
| | | // label3 |
| | | // |
| | | label3.AutoSize = true; |
| | | label3.Location = new Point(3, 153); |
| | | label3.Location = new Point(4, 180); |
| | | label3.Margin = new Padding(4, 0, 4, 0); |
| | | label3.Name = "label3"; |
| | | label3.Size = new Size(44, 17); |
| | | label3.Size = new Size(54, 20); |
| | | label3.TabIndex = 21; |
| | | label3.Text = "æ¡ç 头"; |
| | | // |
| | | // stxtCodeHead |
| | | // |
| | | stxtCodeHead.Location = new Point(93, 156); |
| | | stxtCodeHead.Location = new Point(120, 184); |
| | | stxtCodeHead.Margin = new Padding(4, 4, 4, 4); |
| | | stxtCodeHead.Name = "stxtCodeHead"; |
| | | stxtCodeHead.Size = new Size(97, 23); |
| | | stxtCodeHead.Size = new Size(124, 27); |
| | | stxtCodeHead.TabIndex = 22; |
| | | // |
| | | // label4 |
| | | // |
| | | label4.AutoSize = true; |
| | | label4.Location = new Point(3, 102); |
| | | label4.Location = new Point(4, 120); |
| | | label4.Margin = new Padding(4, 0, 4, 0); |
| | | label4.Name = "label4"; |
| | | label4.Size = new Size(56, 17); |
| | | label4.Size = new Size(69, 20); |
| | | label4.TabIndex = 23; |
| | | label4.Text = "æ¡ç ç±»å"; |
| | | // |
| | | // cmbCode2dType |
| | | // |
| | | cmbCode2dType.FormattingEnabled = true; |
| | | cmbCode2dType.Location = new Point(93, 105); |
| | | cmbCode2dType.Location = new Point(120, 124); |
| | | cmbCode2dType.Margin = new Padding(4, 4, 4, 4); |
| | | cmbCode2dType.Name = "cmbCode2dType"; |
| | | cmbCode2dType.Size = new Size(97, 25); |
| | | cmbCode2dType.Size = new Size(124, 28); |
| | | cmbCode2dType.TabIndex = 24; |
| | | // |
| | | // label10 |
| | | // |
| | | label10.AutoSize = true; |
| | | label10.Location = new Point(201, 153); |
| | | label10.Location = new Point(260, 180); |
| | | label10.Margin = new Padding(4, 0, 4, 0); |
| | | label10.Name = "label10"; |
| | | label10.Size = new Size(56, 17); |
| | | label10.Size = new Size(69, 20); |
| | | label10.TabIndex = 25; |
| | | label10.Text = "æ¡ç é¿åº¦"; |
| | | // |
| | | // dtxtCodeLength |
| | | // |
| | | dtxtCodeLength.Location = new Point(291, 156); |
| | | dtxtCodeLength.Location = new Point(376, 184); |
| | | dtxtCodeLength.Margin = new Padding(4, 4, 4, 4); |
| | | dtxtCodeLength.Name = "dtxtCodeLength"; |
| | | dtxtCodeLength.Size = new Size(97, 23); |
| | | dtxtCodeLength.Size = new Size(124, 27); |
| | | dtxtCodeLength.TabIndex = 26; |
| | | // |
| | | // pnlInputImage |
| | | // |
| | | pnlInputImage.Dock = DockStyle.Fill; |
| | | pnlInputImage.Location = new Point(3, 3); |
| | | pnlInputImage.Margin = new Padding(4); |
| | | pnlInputImage.Location = new Point(4, 4); |
| | | pnlInputImage.Margin = new Padding(5, 5, 5, 5); |
| | | pnlInputImage.Name = "pnlInputImage"; |
| | | pnlInputImage.Size = new Size(607, 510); |
| | | pnlInputImage.Size = new Size(782, 603); |
| | | pnlInputImage.TabIndex = 44; |
| | | // |
| | | // TopToolStrip |
| | | // |
| | | TopToolStrip.ImageScalingSize = new Size(20, 20); |
| | | TopToolStrip.Items.AddRange(new ToolStripItem[] { btnRun, btnLoadImage, btnSaveParas, btnLoadParas }); |
| | | TopToolStrip.Location = new Point(0, 0); |
| | | TopToolStrip.Name = "TopToolStrip"; |
| | | TopToolStrip.Size = new Size(1044, 25); |
| | | TopToolStrip.Size = new Size(1342, 27); |
| | | TopToolStrip.TabIndex = 45; |
| | | TopToolStrip.Text = "toolStrip1"; |
| | | // |
| | |
| | | btnRun.BackgroundImageLayout = ImageLayout.Zoom; |
| | | btnRun.ImageTransparentColor = Color.Magenta; |
| | | btnRun.Name = "btnRun"; |
| | | btnRun.Size = new Size(36, 22); |
| | | btnRun.Size = new Size(43, 24); |
| | | btnRun.Text = "è¿è¡"; |
| | | btnRun.Click += btnRun_Click; |
| | | // |
| | |
| | | // |
| | | btnLoadImage.ImageTransparentColor = Color.Magenta; |
| | | btnLoadImage.Name = "btnLoadImage"; |
| | | btnLoadImage.Size = new Size(36, 22); |
| | | btnLoadImage.Size = new Size(43, 24); |
| | | btnLoadImage.Text = "导å¾"; |
| | | btnLoadImage.Click += btnLoadImage_Click; |
| | | // |
| | |
| | | // |
| | | btnSaveParas.ImageTransparentColor = Color.Magenta; |
| | | btnSaveParas.Name = "btnSaveParas"; |
| | | btnSaveParas.Size = new Size(36, 22); |
| | | btnSaveParas.Size = new Size(43, 24); |
| | | btnSaveParas.Text = "ä¿å"; |
| | | btnSaveParas.Click += btnSaveParas_Click; |
| | | // |
| | |
| | | // |
| | | btnLoadParas.ImageTransparentColor = Color.Magenta; |
| | | btnLoadParas.Name = "btnLoadParas"; |
| | | btnLoadParas.Size = new Size(36, 22); |
| | | btnLoadParas.Size = new Size(43, 24); |
| | | btnLoadParas.Text = "å è½½"; |
| | | btnLoadParas.Click += btnLoadParas_Click; |
| | | // |
| | | // BtmStatusStrip |
| | | // |
| | | BtmStatusStrip.ImageScalingSize = new Size(20, 20); |
| | | BtmStatusStrip.Items.AddRange(new ToolStripItem[] { lblResult, lblMsg, lblRunTime }); |
| | | BtmStatusStrip.Location = new Point(0, 577); |
| | | BtmStatusStrip.Location = new Point(0, 679); |
| | | BtmStatusStrip.Name = "BtmStatusStrip"; |
| | | BtmStatusStrip.Size = new Size(1044, 22); |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 18, 0); |
| | | BtmStatusStrip.Size = new Size(1342, 26); |
| | | BtmStatusStrip.TabIndex = 46; |
| | | BtmStatusStrip.Text = "statusStrip1"; |
| | | // |
| | | // lblResult |
| | | // |
| | | lblResult.Name = "lblResult"; |
| | | lblResult.Size = new Size(34, 17); |
| | | lblResult.Size = new Size(42, 20); |
| | | lblResult.Text = "True"; |
| | | // |
| | | // lblMsg |
| | | // |
| | | lblMsg.Name = "lblMsg"; |
| | | lblMsg.Size = new Size(56, 17); |
| | | lblMsg.Size = new Size(69, 20); |
| | | lblMsg.Text = "è¿è¡æå"; |
| | | // |
| | | // lblRunTime |
| | | // |
| | | lblRunTime.Name = "lblRunTime"; |
| | | lblRunTime.Size = new Size(32, 17); |
| | | lblRunTime.Size = new Size(39, 20); |
| | | lblRunTime.Text = "0ms"; |
| | | // |
| | | // MainTableLayoutPanel |
| | |
| | | MainTableLayoutPanel.Controls.Add(parasTabControl, 0, 0); |
| | | MainTableLayoutPanel.Controls.Add(imgTabControl, 1, 0); |
| | | MainTableLayoutPanel.Dock = DockStyle.Fill; |
| | | MainTableLayoutPanel.Location = new Point(0, 25); |
| | | MainTableLayoutPanel.Location = new Point(0, 27); |
| | | MainTableLayoutPanel.Margin = new Padding(4, 4, 4, 4); |
| | | MainTableLayoutPanel.Name = "MainTableLayoutPanel"; |
| | | MainTableLayoutPanel.RowCount = 1; |
| | | MainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | MainTableLayoutPanel.Size = new Size(1044, 552); |
| | | MainTableLayoutPanel.Size = new Size(1342, 652); |
| | | MainTableLayoutPanel.TabIndex = 47; |
| | | // |
| | | // parasTabControl |
| | |
| | | parasTabControl.Controls.Add(tabPage5); |
| | | parasTabControl.Controls.Add(tabPage2); |
| | | parasTabControl.Dock = DockStyle.Fill; |
| | | parasTabControl.Location = new Point(3, 3); |
| | | parasTabControl.Location = new Point(4, 4); |
| | | parasTabControl.Margin = new Padding(4, 4, 4, 4); |
| | | parasTabControl.Name = "parasTabControl"; |
| | | parasTabControl.SelectedIndex = 0; |
| | | parasTabControl.Size = new Size(411, 546); |
| | | parasTabControl.Size = new Size(528, 644); |
| | | parasTabControl.TabIndex = 48; |
| | | // |
| | | // tabPage1 |
| | | // |
| | | tabPage1.Controls.Add(tablePanelParas); |
| | | tabPage1.Location = new Point(4, 26); |
| | | tabPage1.Location = new Point(4, 29); |
| | | tabPage1.Margin = new Padding(4, 4, 4, 4); |
| | | tabPage1.Name = "tabPage1"; |
| | | tabPage1.Padding = new Padding(3); |
| | | tabPage1.Size = new Size(403, 516); |
| | | tabPage1.Padding = new Padding(4, 4, 4, 4); |
| | | tabPage1.Size = new Size(520, 611); |
| | | tabPage1.TabIndex = 0; |
| | | tabPage1.Text = "è¾å
¥åæ°"; |
| | | tabPage1.UseVisualStyleBackColor = true; |
| | |
| | | // tabPage5 |
| | | // |
| | | tabPage5.Controls.Add(tableLayoutPanel2); |
| | | tabPage5.Location = new Point(4, 26); |
| | | tabPage5.Location = new Point(4, 29); |
| | | tabPage5.Margin = new Padding(4, 4, 4, 4); |
| | | tabPage5.Name = "tabPage5"; |
| | | tabPage5.Size = new Size(403, 516); |
| | | tabPage5.Size = new Size(520, 611); |
| | | tabPage5.TabIndex = 2; |
| | | tabPage5.Text = "è¿è¡åæ°"; |
| | | tabPage5.UseVisualStyleBackColor = true; |
| | |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 4; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 150F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 77F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 193F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 26F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Controls.Add(cmbTypeRoi, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(label21, 0, 0); |
| | | tableLayoutPanel2.Controls.Add(label22, 0, 1); |
| | | tableLayoutPanel2.Controls.Add(cmbFixture, 1, 1); |
| | | tableLayoutPanel2.Controls.Add(ckbDrawRoi, 2, 0); |
| | | tableLayoutPanel2.Location = new Point(3, 3); |
| | | tableLayoutPanel2.Location = new Point(4, 4); |
| | | tableLayoutPanel2.Margin = new Padding(4, 4, 4, 4); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | | tableLayoutPanel2.RowCount = 3; |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Size = new Size(323, 196); |
| | | tableLayoutPanel2.Size = new Size(415, 231); |
| | | tableLayoutPanel2.TabIndex = 5; |
| | | // |
| | | // cmbTypeRoi |
| | | // |
| | | cmbTypeRoi.FormattingEnabled = true; |
| | | cmbTypeRoi.Location = new Point(63, 3); |
| | | cmbTypeRoi.Location = new Point(81, 4); |
| | | cmbTypeRoi.Margin = new Padding(4, 4, 4, 4); |
| | | cmbTypeRoi.Name = "cmbTypeRoi"; |
| | | cmbTypeRoi.Size = new Size(121, 25); |
| | | cmbTypeRoi.Size = new Size(154, 28); |
| | | cmbTypeRoi.TabIndex = 1; |
| | | cmbTypeRoi.SelectedIndexChanged += cmbTypeRoi_SelectedIndexChanged; |
| | | // |
| | |
| | | // |
| | | label21.AutoSize = true; |
| | | label21.Dock = DockStyle.Fill; |
| | | label21.Location = new Point(3, 0); |
| | | label21.Location = new Point(4, 0); |
| | | label21.Margin = new Padding(4, 0, 4, 0); |
| | | label21.Name = "label21"; |
| | | label21.Size = new Size(54, 30); |
| | | label21.Size = new Size(69, 35); |
| | | label21.TabIndex = 3; |
| | | label21.Text = "ROI"; |
| | | label21.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // |
| | | label22.AutoSize = true; |
| | | label22.Dock = DockStyle.Fill; |
| | | label22.Location = new Point(3, 30); |
| | | label22.Location = new Point(4, 35); |
| | | label22.Margin = new Padding(4, 0, 4, 0); |
| | | label22.Name = "label22"; |
| | | label22.Size = new Size(54, 30); |
| | | label22.Size = new Size(69, 35); |
| | | label22.TabIndex = 4; |
| | | label22.Text = "Fixture"; |
| | | label22.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // cmbFixture |
| | | // |
| | | cmbFixture.FormattingEnabled = true; |
| | | cmbFixture.Location = new Point(63, 33); |
| | | cmbFixture.Location = new Point(81, 39); |
| | | cmbFixture.Margin = new Padding(4, 4, 4, 4); |
| | | cmbFixture.Name = "cmbFixture"; |
| | | cmbFixture.Size = new Size(121, 25); |
| | | cmbFixture.Size = new Size(154, 28); |
| | | cmbFixture.TabIndex = 5; |
| | | cmbFixture.SelectedIndexChanged += cmbFixture_SelectedIndexChanged; |
| | | // |
| | |
| | | // |
| | | ckbDrawRoi.AutoSize = true; |
| | | ckbDrawRoi.CheckAlign = ContentAlignment.MiddleCenter; |
| | | ckbDrawRoi.Location = new Point(213, 3); |
| | | ckbDrawRoi.Location = new Point(274, 4); |
| | | ckbDrawRoi.Margin = new Padding(4, 4, 4, 4); |
| | | ckbDrawRoi.Name = "ckbDrawRoi"; |
| | | ckbDrawRoi.Size = new Size(14, 14); |
| | | ckbDrawRoi.Size = new Size(18, 17); |
| | | ckbDrawRoi.TabIndex = 2; |
| | | ckbDrawRoi.UseVisualStyleBackColor = true; |
| | | ckbDrawRoi.CheckedChanged += ckbDrawRoi_CheckedChanged; |
| | |
| | | // tabPage2 |
| | | // |
| | | tabPage2.Controls.Add(tableLayoutResults); |
| | | tabPage2.Location = new Point(4, 26); |
| | | tabPage2.Location = new Point(4, 29); |
| | | tabPage2.Margin = new Padding(4, 4, 4, 4); |
| | | tabPage2.Name = "tabPage2"; |
| | | tabPage2.Padding = new Padding(3); |
| | | tabPage2.Size = new Size(403, 516); |
| | | tabPage2.Padding = new Padding(4, 4, 4, 4); |
| | | tabPage2.Size = new Size(520, 611); |
| | | tabPage2.TabIndex = 1; |
| | | tabPage2.Text = "è¾åºç»æ"; |
| | | tabPage2.UseVisualStyleBackColor = true; |
| | |
| | | // tableLayoutResults |
| | | // |
| | | tableLayoutResults.ColumnCount = 2; |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F)); |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 129F)); |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutResults.Controls.Add(label5, 0, 0); |
| | | tableLayoutResults.Controls.Add(stxtCodeStrings, 1, 0); |
| | | tableLayoutResults.Controls.Add(label18, 0, 1); |
| | | tableLayoutResults.Controls.Add(dtxtCount, 1, 1); |
| | | tableLayoutResults.Dock = DockStyle.Fill; |
| | | tableLayoutResults.Location = new Point(3, 3); |
| | | tableLayoutResults.Margin = new Padding(2, 3, 2, 3); |
| | | tableLayoutResults.Location = new Point(4, 4); |
| | | tableLayoutResults.Margin = new Padding(3, 4, 3, 4); |
| | | tableLayoutResults.Name = "tableLayoutResults"; |
| | | tableLayoutResults.RowCount = 10; |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.Size = new Size(397, 510); |
| | | tableLayoutResults.Size = new Size(512, 603); |
| | | tableLayoutResults.TabIndex = 1; |
| | | // |
| | | // label5 |
| | | // |
| | | label5.AutoSize = true; |
| | | label5.Dock = DockStyle.Fill; |
| | | label5.Location = new Point(2, 0); |
| | | label5.Margin = new Padding(2, 0, 2, 0); |
| | | label5.MaximumSize = new Size(0, 28); |
| | | label5.MinimumSize = new Size(0, 28); |
| | | label5.Location = new Point(3, 0); |
| | | label5.MaximumSize = new Size(0, 33); |
| | | label5.MinimumSize = new Size(0, 33); |
| | | label5.Name = "label5"; |
| | | label5.Size = new Size(96, 28); |
| | | label5.Size = new Size(123, 33); |
| | | label5.TabIndex = 0; |
| | | label5.Text = "ç»æ"; |
| | | label5.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // stxtCodeStrings |
| | | // |
| | | stxtCodeStrings.Dock = DockStyle.Fill; |
| | | stxtCodeStrings.Location = new Point(102, 3); |
| | | stxtCodeStrings.Margin = new Padding(2, 3, 2, 3); |
| | | stxtCodeStrings.Location = new Point(132, 4); |
| | | stxtCodeStrings.Margin = new Padding(3, 4, 3, 4); |
| | | stxtCodeStrings.Multiline = true; |
| | | stxtCodeStrings.Name = "stxtCodeStrings"; |
| | | stxtCodeStrings.ReadOnly = true; |
| | | stxtCodeStrings.Size = new Size(293, 45); |
| | | stxtCodeStrings.Size = new Size(377, 52); |
| | | stxtCodeStrings.TabIndex = 5; |
| | | // |
| | | // label18 |
| | | // |
| | | label18.AutoSize = true; |
| | | label18.Dock = DockStyle.Fill; |
| | | label18.Location = new Point(3, 51); |
| | | label18.Location = new Point(4, 60); |
| | | label18.Margin = new Padding(4, 0, 4, 0); |
| | | label18.Name = "label18"; |
| | | label18.Size = new Size(94, 51); |
| | | label18.Size = new Size(121, 60); |
| | | label18.TabIndex = 10; |
| | | label18.Text = "æ°é"; |
| | | label18.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // dtxtCount |
| | | // |
| | | dtxtCount.Dock = DockStyle.Fill; |
| | | dtxtCount.Location = new Point(103, 54); |
| | | dtxtCount.Location = new Point(133, 64); |
| | | dtxtCount.Margin = new Padding(4, 4, 4, 4); |
| | | dtxtCount.Name = "dtxtCount"; |
| | | dtxtCount.ReadOnly = true; |
| | | dtxtCount.Size = new Size(291, 23); |
| | | dtxtCount.Size = new Size(375, 27); |
| | | dtxtCount.TabIndex = 11; |
| | | // |
| | | // imgTabControl |
| | |
| | | imgTabControl.Controls.Add(tabPageInputImage); |
| | | imgTabControl.Controls.Add(tabPageRecordImage); |
| | | imgTabControl.Dock = DockStyle.Fill; |
| | | imgTabControl.Location = new Point(420, 3); |
| | | imgTabControl.Location = new Point(540, 4); |
| | | imgTabControl.Margin = new Padding(4, 4, 4, 4); |
| | | imgTabControl.Name = "imgTabControl"; |
| | | imgTabControl.SelectedIndex = 0; |
| | | imgTabControl.Size = new Size(621, 546); |
| | | imgTabControl.Size = new Size(798, 644); |
| | | imgTabControl.TabIndex = 49; |
| | | // |
| | | // tabPageInputImage |
| | | // |
| | | tabPageInputImage.Controls.Add(pnlInputImage); |
| | | tabPageInputImage.Location = new Point(4, 26); |
| | | tabPageInputImage.Location = new Point(4, 29); |
| | | tabPageInputImage.Margin = new Padding(4, 4, 4, 4); |
| | | tabPageInputImage.Name = "tabPageInputImage"; |
| | | tabPageInputImage.Padding = new Padding(3); |
| | | tabPageInputImage.Size = new Size(613, 516); |
| | | tabPageInputImage.Padding = new Padding(4, 4, 4, 4); |
| | | tabPageInputImage.Size = new Size(790, 611); |
| | | tabPageInputImage.TabIndex = 0; |
| | | tabPageInputImage.Text = "è¾å
¥å¾å"; |
| | | tabPageInputImage.UseVisualStyleBackColor = true; |
| | |
| | | // tabPageRecordImage |
| | | // |
| | | tabPageRecordImage.Controls.Add(pnlRecordImage); |
| | | tabPageRecordImage.Location = new Point(4, 26); |
| | | tabPageRecordImage.Location = new Point(4, 29); |
| | | tabPageRecordImage.Margin = new Padding(4, 4, 4, 4); |
| | | tabPageRecordImage.Name = "tabPageRecordImage"; |
| | | tabPageRecordImage.Padding = new Padding(3); |
| | | tabPageRecordImage.Size = new Size(613, 516); |
| | | tabPageRecordImage.Padding = new Padding(4, 4, 4, 4); |
| | | tabPageRecordImage.Size = new Size(790, 611); |
| | | tabPageRecordImage.TabIndex = 1; |
| | | tabPageRecordImage.Text = "ç»æå¾å"; |
| | | tabPageRecordImage.UseVisualStyleBackColor = true; |
| | |
| | | // pnlRecordImage |
| | | // |
| | | pnlRecordImage.Dock = DockStyle.Fill; |
| | | pnlRecordImage.Location = new Point(3, 3); |
| | | pnlRecordImage.Margin = new Padding(4); |
| | | pnlRecordImage.Location = new Point(4, 4); |
| | | pnlRecordImage.Margin = new Padding(5, 5, 5, 5); |
| | | pnlRecordImage.Name = "pnlRecordImage"; |
| | | pnlRecordImage.Size = new Size(607, 510); |
| | | pnlRecordImage.Size = new Size(782, 603); |
| | | pnlRecordImage.TabIndex = 45; |
| | | // |
| | | // HFindCode2dToolEdit |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 17F); |
| | | AutoScaleDimensions = new SizeF(9F, 20F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(MainTableLayoutPanel); |
| | | Controls.Add(BtmStatusStrip); |
| | | Controls.Add(TopToolStrip); |
| | | Margin = new Padding(2, 3, 2, 3); |
| | | Margin = new Padding(3, 4, 3, 4); |
| | | Name = "HFindCode2dToolEdit"; |
| | | Size = new Size(1044, 599); |
| | | Size = new Size(1342, 705); |
| | | Load += HFindCode2dToolEdit_Load; |
| | | tablePanelParas.ResumeLayout(false); |
| | | tablePanelParas.PerformLayout(); |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <metadata name="lblMsgToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>183, 17</value> |
| | | </metadata> |
| | | <metadata name="BtmStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>148, 17</value> |
| | | <value>340, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | using LB_VisionProcesses.Alogrithms.Halcon; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Imaging; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | Result = false; |
| | | return; |
| | | } |
| | | if (InputImage is Bitmap) |
| | | { |
| | | try |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | if (!(InputImage is HObject)) |
| | | { |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºHObject"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | |
| | | #region è£åªåºå |
| | | if (!(Params.ROI is HSegment)) |
| | |
| | | label13 = new Label(); |
| | | cmbTransition = new ComboBox(); |
| | | cmbSelect = new ComboBox(); |
| | | btnShowROI = new Button(); |
| | | pnlInputImage = new Panel(); |
| | | TopToolStrip = new ToolStrip(); |
| | | btnRun = new ToolStripButton(); |
| | |
| | | tabPageInputImage = new TabPage(); |
| | | tabPageRecordImage = new TabPage(); |
| | | pnlRecordImage = new Panel(); |
| | | btnShowROI = new Button(); |
| | | tablePanelParas.SuspendLayout(); |
| | | TopToolStrip.SuspendLayout(); |
| | | BtmStatusStrip.SuspendLayout(); |
| | |
| | | // tablePanelParas |
| | | // |
| | | tablePanelParas.ColumnCount = 4; |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 90F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 116F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 90F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 116F)); |
| | | tablePanelParas.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tablePanelParas.Controls.Add(label1, 0, 0); |
| | | tablePanelParas.Controls.Add(itxtCaliperCount, 1, 0); |
| | |
| | | tablePanelParas.Controls.Add(cmbSelect, 3, 3); |
| | | tablePanelParas.Controls.Add(btnShowROI, 0, 4); |
| | | tablePanelParas.Dock = DockStyle.Fill; |
| | | tablePanelParas.Location = new Point(3, 3); |
| | | tablePanelParas.Margin = new Padding(2, 3, 2, 3); |
| | | tablePanelParas.Location = new Point(4, 4); |
| | | tablePanelParas.Margin = new Padding(3, 4, 3, 4); |
| | | tablePanelParas.Name = "tablePanelParas"; |
| | | tablePanelParas.RowCount = 10; |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10.000001F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10.000001F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tablePanelParas.Size = new Size(397, 510); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F)); |
| | | tablePanelParas.Size = new Size(512, 603); |
| | | tablePanelParas.TabIndex = 0; |
| | | // |
| | | // label1 |
| | | // |
| | | label1.AutoSize = true; |
| | | label1.Location = new Point(2, 0); |
| | | label1.Margin = new Padding(2, 0, 2, 0); |
| | | label1.MaximumSize = new Size(0, 28); |
| | | label1.MinimumSize = new Size(0, 28); |
| | | label1.Location = new Point(3, 0); |
| | | label1.MaximumSize = new Size(0, 33); |
| | | label1.MinimumSize = new Size(0, 33); |
| | | label1.Name = "label1"; |
| | | label1.Size = new Size(56, 28); |
| | | label1.Size = new Size(69, 33); |
| | | label1.TabIndex = 0; |
| | | label1.Text = "å¡å°ºæ°é"; |
| | | label1.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // itxtCaliperCount |
| | | // |
| | | itxtCaliperCount.Location = new Point(92, 3); |
| | | itxtCaliperCount.Margin = new Padding(2, 3, 2, 3); |
| | | itxtCaliperCount.Location = new Point(119, 4); |
| | | itxtCaliperCount.Margin = new Padding(3, 4, 3, 4); |
| | | itxtCaliperCount.Name = "itxtCaliperCount"; |
| | | itxtCaliperCount.Size = new Size(98, 23); |
| | | itxtCaliperCount.Size = new Size(125, 27); |
| | | itxtCaliperCount.TabIndex = 5; |
| | | itxtCaliperCount.Text = "6"; |
| | | // |
| | | // label2 |
| | | // |
| | | label2.AutoSize = true; |
| | | label2.Location = new Point(200, 0); |
| | | label2.Margin = new Padding(2, 0, 2, 0); |
| | | label2.MaximumSize = new Size(0, 28); |
| | | label2.MinimumSize = new Size(0, 28); |
| | | label2.Location = new Point(259, 0); |
| | | label2.MaximumSize = new Size(0, 33); |
| | | label2.MinimumSize = new Size(0, 33); |
| | | label2.Name = "label2"; |
| | | label2.Size = new Size(56, 28); |
| | | label2.Size = new Size(69, 33); |
| | | label2.TabIndex = 1; |
| | | label2.Text = "å¡å°ºé¿åº¦"; |
| | | label2.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtCaliperHeight |
| | | // |
| | | dtxtCaliperHeight.Location = new Point(290, 3); |
| | | dtxtCaliperHeight.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtCaliperHeight.Location = new Point(375, 4); |
| | | dtxtCaliperHeight.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtCaliperHeight.Name = "dtxtCaliperHeight"; |
| | | dtxtCaliperHeight.Size = new Size(98, 23); |
| | | dtxtCaliperHeight.Size = new Size(125, 27); |
| | | dtxtCaliperHeight.TabIndex = 6; |
| | | dtxtCaliperHeight.Text = "30"; |
| | | // |
| | | // label3 |
| | | // |
| | | label3.AutoSize = true; |
| | | label3.Location = new Point(2, 51); |
| | | label3.Margin = new Padding(2, 0, 2, 0); |
| | | label3.MaximumSize = new Size(0, 28); |
| | | label3.MinimumSize = new Size(0, 28); |
| | | label3.Location = new Point(3, 60); |
| | | label3.MaximumSize = new Size(0, 33); |
| | | label3.MinimumSize = new Size(0, 33); |
| | | label3.Name = "label3"; |
| | | label3.Size = new Size(56, 28); |
| | | label3.Size = new Size(69, 33); |
| | | label3.TabIndex = 2; |
| | | label3.Text = "å¡å°ºå®½åº¦"; |
| | | label3.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // dtxtCaliperWidth |
| | | // |
| | | dtxtCaliperWidth.Location = new Point(92, 54); |
| | | dtxtCaliperWidth.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtCaliperWidth.Location = new Point(119, 64); |
| | | dtxtCaliperWidth.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtCaliperWidth.Name = "dtxtCaliperWidth"; |
| | | dtxtCaliperWidth.Size = new Size(98, 23); |
| | | dtxtCaliperWidth.Size = new Size(125, 27); |
| | | dtxtCaliperWidth.TabIndex = 7; |
| | | dtxtCaliperWidth.Text = "10"; |
| | | // |
| | | // label4 |
| | | // |
| | | label4.AutoSize = true; |
| | | label4.Location = new Point(200, 51); |
| | | label4.Margin = new Padding(2, 0, 2, 0); |
| | | label4.MaximumSize = new Size(0, 28); |
| | | label4.MinimumSize = new Size(0, 28); |
| | | label4.Location = new Point(259, 60); |
| | | label4.MaximumSize = new Size(0, 33); |
| | | label4.MinimumSize = new Size(0, 33); |
| | | label4.Name = "label4"; |
| | | label4.Size = new Size(80, 28); |
| | | label4.Size = new Size(99, 33); |
| | | label4.TabIndex = 3; |
| | | label4.Text = "è¿æ»¤ä¸ååç´ "; |
| | | label4.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // itxtSigma |
| | | // |
| | | itxtSigma.Location = new Point(290, 54); |
| | | itxtSigma.Margin = new Padding(2, 3, 2, 3); |
| | | itxtSigma.Location = new Point(375, 64); |
| | | itxtSigma.Margin = new Padding(3, 4, 3, 4); |
| | | itxtSigma.Name = "itxtSigma"; |
| | | itxtSigma.Size = new Size(98, 23); |
| | | itxtSigma.Size = new Size(125, 27); |
| | | itxtSigma.TabIndex = 8; |
| | | itxtSigma.Text = "0"; |
| | | // |
| | | // label10 |
| | | // |
| | | label10.AutoSize = true; |
| | | label10.Location = new Point(2, 102); |
| | | label10.Margin = new Padding(2, 0, 2, 0); |
| | | label10.MaximumSize = new Size(0, 28); |
| | | label10.MinimumSize = new Size(0, 28); |
| | | label10.Location = new Point(3, 120); |
| | | label10.MaximumSize = new Size(0, 33); |
| | | label10.MinimumSize = new Size(0, 33); |
| | | label10.Name = "label10"; |
| | | label10.Size = new Size(68, 28); |
| | | label10.Size = new Size(84, 33); |
| | | label10.TabIndex = 9; |
| | | label10.Text = "对æ¯åº¦éå¼"; |
| | | label10.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // itxtThreshold |
| | | // |
| | | itxtThreshold.Location = new Point(92, 105); |
| | | itxtThreshold.Margin = new Padding(2, 3, 2, 3); |
| | | itxtThreshold.Location = new Point(119, 124); |
| | | itxtThreshold.Margin = new Padding(3, 4, 3, 4); |
| | | itxtThreshold.Name = "itxtThreshold"; |
| | | itxtThreshold.Size = new Size(98, 23); |
| | | itxtThreshold.Size = new Size(125, 27); |
| | | itxtThreshold.TabIndex = 9; |
| | | itxtThreshold.Text = "0"; |
| | | // |
| | | // label11 |
| | | // |
| | | label11.AutoSize = true; |
| | | label11.Location = new Point(200, 102); |
| | | label11.Margin = new Padding(2, 0, 2, 0); |
| | | label11.MaximumSize = new Size(0, 28); |
| | | label11.MinimumSize = new Size(0, 28); |
| | | label11.Location = new Point(259, 120); |
| | | label11.MaximumSize = new Size(0, 33); |
| | | label11.MinimumSize = new Size(0, 33); |
| | | label11.Name = "label11"; |
| | | label11.Size = new Size(56, 28); |
| | | label11.Size = new Size(69, 33); |
| | | label11.TabIndex = 10; |
| | | label11.Text = "忽ç¥ç¹æ°"; |
| | | label11.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // itxtIgnoreCount |
| | | // |
| | | itxtIgnoreCount.Location = new Point(290, 105); |
| | | itxtIgnoreCount.Margin = new Padding(2, 3, 2, 3); |
| | | itxtIgnoreCount.Location = new Point(375, 124); |
| | | itxtIgnoreCount.Margin = new Padding(3, 4, 3, 4); |
| | | itxtIgnoreCount.Name = "itxtIgnoreCount"; |
| | | itxtIgnoreCount.Size = new Size(98, 23); |
| | | itxtIgnoreCount.Size = new Size(125, 27); |
| | | itxtIgnoreCount.TabIndex = 9; |
| | | itxtIgnoreCount.Text = "0"; |
| | | // |
| | | // label12 |
| | | // |
| | | label12.AutoSize = true; |
| | | label12.Location = new Point(2, 153); |
| | | label12.Margin = new Padding(2, 0, 2, 0); |
| | | label12.MaximumSize = new Size(0, 28); |
| | | label12.MinimumSize = new Size(0, 28); |
| | | label12.Location = new Point(3, 180); |
| | | label12.MaximumSize = new Size(0, 33); |
| | | label12.MinimumSize = new Size(0, 33); |
| | | label12.Name = "label12"; |
| | | label12.Size = new Size(32, 28); |
| | | label12.Size = new Size(39, 33); |
| | | label12.TabIndex = 11; |
| | | label12.Text = "ææ§"; |
| | | label12.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // label13 |
| | | // |
| | | label13.AutoSize = true; |
| | | label13.Location = new Point(200, 153); |
| | | label13.Margin = new Padding(2, 0, 2, 0); |
| | | label13.MaximumSize = new Size(0, 28); |
| | | label13.MinimumSize = new Size(0, 28); |
| | | label13.Location = new Point(259, 180); |
| | | label13.MaximumSize = new Size(0, 33); |
| | | label13.MinimumSize = new Size(0, 33); |
| | | label13.Name = "label13"; |
| | | label13.Size = new Size(56, 28); |
| | | label13.Size = new Size(69, 33); |
| | | label13.TabIndex = 12; |
| | | label13.Text = "è¾¹ç¼ä½ç½®"; |
| | | label13.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // cmbTransition |
| | | // |
| | | cmbTransition.FormattingEnabled = true; |
| | | cmbTransition.Location = new Point(93, 156); |
| | | cmbTransition.Location = new Point(120, 184); |
| | | cmbTransition.Margin = new Padding(4); |
| | | cmbTransition.Name = "cmbTransition"; |
| | | cmbTransition.Size = new Size(102, 25); |
| | | cmbTransition.Size = new Size(130, 28); |
| | | cmbTransition.TabIndex = 13; |
| | | // |
| | | // cmbSelect |
| | | // |
| | | cmbSelect.FormattingEnabled = true; |
| | | cmbSelect.Location = new Point(291, 156); |
| | | cmbSelect.Location = new Point(376, 184); |
| | | cmbSelect.Margin = new Padding(4); |
| | | cmbSelect.Name = "cmbSelect"; |
| | | cmbSelect.Size = new Size(103, 25); |
| | | cmbSelect.Size = new Size(131, 28); |
| | | cmbSelect.TabIndex = 14; |
| | | // |
| | | // btnShowROI |
| | | // |
| | | btnShowROI.Dock = DockStyle.Fill; |
| | | btnShowROI.Location = new Point(4, 244); |
| | | btnShowROI.Margin = new Padding(4); |
| | | btnShowROI.Name = "btnShowROI"; |
| | | btnShowROI.Size = new Size(108, 52); |
| | | btnShowROI.TabIndex = 15; |
| | | btnShowROI.Text = "æ¾ç¤ºæ¾çº¿åºå"; |
| | | btnShowROI.UseVisualStyleBackColor = true; |
| | | btnShowROI.Click += btnShowROI_Click; |
| | | // |
| | | // pnlInputImage |
| | | // |
| | | pnlInputImage.Dock = DockStyle.Fill; |
| | | pnlInputImage.Location = new Point(3, 3); |
| | | pnlInputImage.Margin = new Padding(4); |
| | | pnlInputImage.Location = new Point(4, 4); |
| | | pnlInputImage.Margin = new Padding(5); |
| | | pnlInputImage.Name = "pnlInputImage"; |
| | | pnlInputImage.Size = new Size(607, 510); |
| | | pnlInputImage.Size = new Size(782, 603); |
| | | pnlInputImage.TabIndex = 44; |
| | | // |
| | | // TopToolStrip |
| | | // |
| | | TopToolStrip.ImageScalingSize = new Size(20, 20); |
| | | TopToolStrip.Items.AddRange(new ToolStripItem[] { btnRun, btnLoadImage, btnSaveParas, btnLoadParas }); |
| | | TopToolStrip.Location = new Point(0, 0); |
| | | TopToolStrip.Name = "TopToolStrip"; |
| | | TopToolStrip.Size = new Size(1044, 25); |
| | | TopToolStrip.Size = new Size(1342, 27); |
| | | TopToolStrip.TabIndex = 45; |
| | | TopToolStrip.Text = "toolStrip1"; |
| | | // |
| | |
| | | btnRun.BackgroundImageLayout = ImageLayout.Zoom; |
| | | btnRun.ImageTransparentColor = Color.Magenta; |
| | | btnRun.Name = "btnRun"; |
| | | btnRun.Size = new Size(36, 22); |
| | | btnRun.Size = new Size(43, 24); |
| | | btnRun.Text = "è¿è¡"; |
| | | btnRun.Click += btnRun_Click; |
| | | // |
| | |
| | | // |
| | | btnLoadImage.ImageTransparentColor = Color.Magenta; |
| | | btnLoadImage.Name = "btnLoadImage"; |
| | | btnLoadImage.Size = new Size(36, 22); |
| | | btnLoadImage.Size = new Size(43, 24); |
| | | btnLoadImage.Text = "导å¾"; |
| | | btnLoadImage.Click += btnLoadImage_Click; |
| | | // |
| | |
| | | // |
| | | btnSaveParas.ImageTransparentColor = Color.Magenta; |
| | | btnSaveParas.Name = "btnSaveParas"; |
| | | btnSaveParas.Size = new Size(36, 22); |
| | | btnSaveParas.Size = new Size(43, 24); |
| | | btnSaveParas.Text = "ä¿å"; |
| | | btnSaveParas.Click += btnSaveParas_Click; |
| | | // |
| | |
| | | // |
| | | btnLoadParas.ImageTransparentColor = Color.Magenta; |
| | | btnLoadParas.Name = "btnLoadParas"; |
| | | btnLoadParas.Size = new Size(36, 22); |
| | | btnLoadParas.Size = new Size(43, 24); |
| | | btnLoadParas.Text = "å è½½"; |
| | | btnLoadParas.Click += btnLoadParas_Click; |
| | | // |
| | | // BtmStatusStrip |
| | | // |
| | | BtmStatusStrip.ImageScalingSize = new Size(20, 20); |
| | | BtmStatusStrip.Items.AddRange(new ToolStripItem[] { lblResult, lblMsg, lblRunTime }); |
| | | BtmStatusStrip.Location = new Point(0, 577); |
| | | BtmStatusStrip.Location = new Point(0, 679); |
| | | BtmStatusStrip.Name = "BtmStatusStrip"; |
| | | BtmStatusStrip.Size = new Size(1044, 22); |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 18, 0); |
| | | BtmStatusStrip.Size = new Size(1342, 26); |
| | | BtmStatusStrip.TabIndex = 46; |
| | | BtmStatusStrip.Text = "statusStrip1"; |
| | | // |
| | | // lblResult |
| | | // |
| | | lblResult.Name = "lblResult"; |
| | | lblResult.Size = new Size(34, 17); |
| | | lblResult.Size = new Size(42, 20); |
| | | lblResult.Text = "True"; |
| | | // |
| | | // lblMsg |
| | | // |
| | | lblMsg.Name = "lblMsg"; |
| | | lblMsg.Size = new Size(56, 17); |
| | | lblMsg.Size = new Size(69, 20); |
| | | lblMsg.Text = "è¿è¡æå"; |
| | | // |
| | | // lblRunTime |
| | | // |
| | | lblRunTime.Name = "lblRunTime"; |
| | | lblRunTime.Size = new Size(32, 17); |
| | | lblRunTime.Size = new Size(39, 20); |
| | | lblRunTime.Text = "0ms"; |
| | | // |
| | | // MainTableLayoutPanel |
| | |
| | | MainTableLayoutPanel.Controls.Add(parasTabControl, 0, 0); |
| | | MainTableLayoutPanel.Controls.Add(imgTabControl, 1, 0); |
| | | MainTableLayoutPanel.Dock = DockStyle.Fill; |
| | | MainTableLayoutPanel.Location = new Point(0, 25); |
| | | MainTableLayoutPanel.Location = new Point(0, 27); |
| | | MainTableLayoutPanel.Margin = new Padding(4); |
| | | MainTableLayoutPanel.Name = "MainTableLayoutPanel"; |
| | | MainTableLayoutPanel.RowCount = 1; |
| | | MainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | MainTableLayoutPanel.Size = new Size(1044, 552); |
| | | MainTableLayoutPanel.Size = new Size(1342, 652); |
| | | MainTableLayoutPanel.TabIndex = 47; |
| | | // |
| | | // parasTabControl |
| | |
| | | parasTabControl.Controls.Add(tabPage5); |
| | | parasTabControl.Controls.Add(tabPage2); |
| | | parasTabControl.Dock = DockStyle.Fill; |
| | | parasTabControl.Location = new Point(3, 3); |
| | | parasTabControl.Location = new Point(4, 4); |
| | | parasTabControl.Margin = new Padding(4); |
| | | parasTabControl.Name = "parasTabControl"; |
| | | parasTabControl.SelectedIndex = 0; |
| | | parasTabControl.Size = new Size(411, 546); |
| | | parasTabControl.Size = new Size(528, 644); |
| | | parasTabControl.TabIndex = 48; |
| | | // |
| | | // tabPage1 |
| | | // |
| | | tabPage1.Controls.Add(tablePanelParas); |
| | | tabPage1.Location = new Point(4, 26); |
| | | tabPage1.Location = new Point(4, 29); |
| | | tabPage1.Margin = new Padding(4); |
| | | tabPage1.Name = "tabPage1"; |
| | | tabPage1.Padding = new Padding(3); |
| | | tabPage1.Size = new Size(403, 516); |
| | | tabPage1.Padding = new Padding(4); |
| | | tabPage1.Size = new Size(520, 611); |
| | | tabPage1.TabIndex = 0; |
| | | tabPage1.Text = "è¾å
¥åæ°"; |
| | | tabPage1.UseVisualStyleBackColor = true; |
| | |
| | | // tabPage5 |
| | | // |
| | | tabPage5.Controls.Add(tableLayoutPanel2); |
| | | tabPage5.Location = new Point(4, 26); |
| | | tabPage5.Location = new Point(4, 29); |
| | | tabPage5.Margin = new Padding(4); |
| | | tabPage5.Name = "tabPage5"; |
| | | tabPage5.Size = new Size(403, 516); |
| | | tabPage5.Size = new Size(520, 611); |
| | | tabPage5.TabIndex = 2; |
| | | tabPage5.Text = "è¿è¡åæ°"; |
| | | tabPage5.UseVisualStyleBackColor = true; |
| | |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 4; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 150F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 77F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 193F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 26F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Controls.Add(cmbTypeRoi, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(label21, 0, 0); |
| | | tableLayoutPanel2.Controls.Add(label22, 0, 1); |
| | | tableLayoutPanel2.Controls.Add(cmbFixture, 1, 1); |
| | | tableLayoutPanel2.Controls.Add(ckbDrawRoi, 2, 0); |
| | | tableLayoutPanel2.Location = new Point(3, 3); |
| | | tableLayoutPanel2.Location = new Point(4, 4); |
| | | tableLayoutPanel2.Margin = new Padding(4); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | | tableLayoutPanel2.RowCount = 8; |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Size = new Size(323, 309); |
| | | tableLayoutPanel2.Size = new Size(415, 364); |
| | | tableLayoutPanel2.TabIndex = 4; |
| | | // |
| | | // cmbTypeRoi |
| | | // |
| | | cmbTypeRoi.Enabled = false; |
| | | cmbTypeRoi.FormattingEnabled = true; |
| | | cmbTypeRoi.Location = new Point(63, 3); |
| | | cmbTypeRoi.Location = new Point(81, 4); |
| | | cmbTypeRoi.Margin = new Padding(4); |
| | | cmbTypeRoi.Name = "cmbTypeRoi"; |
| | | cmbTypeRoi.Size = new Size(121, 25); |
| | | cmbTypeRoi.Size = new Size(154, 28); |
| | | cmbTypeRoi.TabIndex = 1; |
| | | cmbTypeRoi.SelectedIndexChanged += cmbTypeRoi_SelectedIndexChanged; |
| | | // |
| | |
| | | // |
| | | label21.AutoSize = true; |
| | | label21.Dock = DockStyle.Fill; |
| | | label21.Location = new Point(3, 0); |
| | | label21.Location = new Point(4, 0); |
| | | label21.Margin = new Padding(4, 0, 4, 0); |
| | | label21.Name = "label21"; |
| | | label21.Size = new Size(54, 30); |
| | | label21.Size = new Size(69, 35); |
| | | label21.TabIndex = 3; |
| | | label21.Text = "ROI"; |
| | | label21.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // |
| | | label22.AutoSize = true; |
| | | label22.Dock = DockStyle.Fill; |
| | | label22.Location = new Point(3, 30); |
| | | label22.Location = new Point(4, 35); |
| | | label22.Margin = new Padding(4, 0, 4, 0); |
| | | label22.Name = "label22"; |
| | | label22.Size = new Size(54, 30); |
| | | label22.Size = new Size(69, 35); |
| | | label22.TabIndex = 4; |
| | | label22.Text = "Fixture"; |
| | | label22.TextAlign = ContentAlignment.MiddleCenter; |
| | |
| | | // cmbFixture |
| | | // |
| | | cmbFixture.FormattingEnabled = true; |
| | | cmbFixture.Location = new Point(63, 33); |
| | | cmbFixture.Location = new Point(81, 39); |
| | | cmbFixture.Margin = new Padding(4); |
| | | cmbFixture.Name = "cmbFixture"; |
| | | cmbFixture.Size = new Size(121, 25); |
| | | cmbFixture.Size = new Size(154, 28); |
| | | cmbFixture.TabIndex = 5; |
| | | cmbFixture.SelectedIndexChanged += cmbFixture_SelectedIndexChanged; |
| | | // |
| | |
| | | // |
| | | ckbDrawRoi.AutoSize = true; |
| | | ckbDrawRoi.CheckAlign = ContentAlignment.MiddleCenter; |
| | | ckbDrawRoi.Location = new Point(213, 3); |
| | | ckbDrawRoi.Location = new Point(274, 4); |
| | | ckbDrawRoi.Margin = new Padding(4); |
| | | ckbDrawRoi.Name = "ckbDrawRoi"; |
| | | ckbDrawRoi.Size = new Size(14, 14); |
| | | ckbDrawRoi.Size = new Size(18, 17); |
| | | ckbDrawRoi.TabIndex = 2; |
| | | ckbDrawRoi.UseVisualStyleBackColor = true; |
| | | ckbDrawRoi.CheckedChanged += ckbDrawRoi_CheckedChanged; |
| | |
| | | // tabPage2 |
| | | // |
| | | tabPage2.Controls.Add(tableLayoutResults); |
| | | tabPage2.Location = new Point(4, 26); |
| | | tabPage2.Location = new Point(4, 29); |
| | | tabPage2.Margin = new Padding(4); |
| | | tabPage2.Name = "tabPage2"; |
| | | tabPage2.Padding = new Padding(3); |
| | | tabPage2.Size = new Size(403, 516); |
| | | tabPage2.Padding = new Padding(4); |
| | | tabPage2.Size = new Size(520, 611); |
| | | tabPage2.TabIndex = 1; |
| | | tabPage2.Text = "è¾åºç»æ"; |
| | | tabPage2.UseVisualStyleBackColor = true; |
| | |
| | | // tableLayoutResults |
| | | // |
| | | tableLayoutResults.ColumnCount = 2; |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F)); |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 129F)); |
| | | tableLayoutResults.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutResults.Controls.Add(dtxtHeight, 1, 4); |
| | | tableLayoutResults.Controls.Add(label9, 0, 4); |
| | |
| | | tableLayoutResults.Controls.Add(label18, 0, 5); |
| | | tableLayoutResults.Controls.Add(dtxtCount, 1, 5); |
| | | tableLayoutResults.Dock = DockStyle.Fill; |
| | | tableLayoutResults.Location = new Point(3, 3); |
| | | tableLayoutResults.Margin = new Padding(2, 3, 2, 3); |
| | | tableLayoutResults.Location = new Point(4, 4); |
| | | tableLayoutResults.Margin = new Padding(3, 4, 3, 4); |
| | | tableLayoutResults.Name = "tableLayoutResults"; |
| | | tableLayoutResults.RowCount = 10; |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.RowStyles.Add(new RowStyle(SizeType.Percent, 10F)); |
| | | tableLayoutResults.Size = new Size(397, 510); |
| | | tableLayoutResults.Size = new Size(512, 603); |
| | | tableLayoutResults.TabIndex = 1; |
| | | // |
| | | // dtxtHeight |
| | | // |
| | | dtxtHeight.Dock = DockStyle.Fill; |
| | | dtxtHeight.Location = new Point(102, 207); |
| | | dtxtHeight.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtHeight.Location = new Point(132, 244); |
| | | dtxtHeight.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtHeight.Name = "dtxtHeight"; |
| | | dtxtHeight.ReadOnly = true; |
| | | dtxtHeight.Size = new Size(293, 23); |
| | | dtxtHeight.Size = new Size(377, 27); |
| | | dtxtHeight.TabIndex = 9; |
| | | // |
| | | // label9 |
| | | // |
| | | label9.AutoSize = true; |
| | | label9.Dock = DockStyle.Fill; |
| | | label9.Location = new Point(2, 204); |
| | | label9.Margin = new Padding(2, 0, 2, 0); |
| | | label9.MaximumSize = new Size(0, 28); |
| | | label9.MinimumSize = new Size(0, 28); |
| | | label9.Location = new Point(3, 240); |
| | | label9.MaximumSize = new Size(0, 33); |
| | | label9.MinimumSize = new Size(0, 33); |
| | | label9.Name = "label9"; |
| | | label9.Size = new Size(96, 28); |
| | | label9.Size = new Size(123, 33); |
| | | label9.TabIndex = 3; |
| | | label9.Text = "é«åº¦"; |
| | | label9.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label5.AutoSize = true; |
| | | label5.Dock = DockStyle.Fill; |
| | | label5.Location = new Point(2, 0); |
| | | label5.Margin = new Padding(2, 0, 2, 0); |
| | | label5.MaximumSize = new Size(0, 28); |
| | | label5.MinimumSize = new Size(0, 28); |
| | | label5.Location = new Point(3, 0); |
| | | label5.MaximumSize = new Size(0, 33); |
| | | label5.MinimumSize = new Size(0, 33); |
| | | label5.Name = "label5"; |
| | | label5.Size = new Size(96, 28); |
| | | label5.Size = new Size(123, 33); |
| | | label5.TabIndex = 0; |
| | | label5.Text = "X"; |
| | | label5.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label6.AutoSize = true; |
| | | label6.Dock = DockStyle.Fill; |
| | | label6.Location = new Point(2, 51); |
| | | label6.Margin = new Padding(2, 0, 2, 0); |
| | | label6.MaximumSize = new Size(0, 28); |
| | | label6.MinimumSize = new Size(0, 28); |
| | | label6.Location = new Point(3, 60); |
| | | label6.MaximumSize = new Size(0, 33); |
| | | label6.MinimumSize = new Size(0, 33); |
| | | label6.Name = "label6"; |
| | | label6.Size = new Size(96, 28); |
| | | label6.Size = new Size(123, 33); |
| | | label6.TabIndex = 1; |
| | | label6.Text = "Y"; |
| | | label6.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label7.AutoSize = true; |
| | | label7.Dock = DockStyle.Fill; |
| | | label7.Location = new Point(2, 102); |
| | | label7.Margin = new Padding(2, 0, 2, 0); |
| | | label7.MaximumSize = new Size(0, 28); |
| | | label7.MinimumSize = new Size(0, 28); |
| | | label7.Location = new Point(3, 120); |
| | | label7.MaximumSize = new Size(0, 33); |
| | | label7.MinimumSize = new Size(0, 33); |
| | | label7.Name = "label7"; |
| | | label7.Size = new Size(96, 28); |
| | | label7.Size = new Size(123, 33); |
| | | label7.TabIndex = 2; |
| | | label7.Text = "è§åº¦(°)"; |
| | | label7.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // |
| | | label8.AutoSize = true; |
| | | label8.Dock = DockStyle.Fill; |
| | | label8.Location = new Point(2, 153); |
| | | label8.Margin = new Padding(2, 0, 2, 0); |
| | | label8.MaximumSize = new Size(0, 28); |
| | | label8.MinimumSize = new Size(0, 28); |
| | | label8.Location = new Point(3, 180); |
| | | label8.MaximumSize = new Size(0, 33); |
| | | label8.MinimumSize = new Size(0, 33); |
| | | label8.Name = "label8"; |
| | | label8.Size = new Size(96, 28); |
| | | label8.Size = new Size(123, 33); |
| | | label8.TabIndex = 3; |
| | | label8.Text = "宽度"; |
| | | label8.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // dtxtCenterX |
| | | // |
| | | dtxtCenterX.Dock = DockStyle.Fill; |
| | | dtxtCenterX.Location = new Point(102, 3); |
| | | dtxtCenterX.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtCenterX.Location = new Point(132, 4); |
| | | dtxtCenterX.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtCenterX.Name = "dtxtCenterX"; |
| | | dtxtCenterX.ReadOnly = true; |
| | | dtxtCenterX.Size = new Size(293, 23); |
| | | dtxtCenterX.Size = new Size(377, 27); |
| | | dtxtCenterX.TabIndex = 5; |
| | | // |
| | | // dtxtCenterY |
| | | // |
| | | dtxtCenterY.Dock = DockStyle.Fill; |
| | | dtxtCenterY.Location = new Point(102, 54); |
| | | dtxtCenterY.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtCenterY.Location = new Point(132, 64); |
| | | dtxtCenterY.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtCenterY.Name = "dtxtCenterY"; |
| | | dtxtCenterY.ReadOnly = true; |
| | | dtxtCenterY.Size = new Size(293, 23); |
| | | dtxtCenterY.Size = new Size(377, 27); |
| | | dtxtCenterY.TabIndex = 6; |
| | | // |
| | | // dtxtAngle |
| | | // |
| | | dtxtAngle.Dock = DockStyle.Fill; |
| | | dtxtAngle.Location = new Point(102, 105); |
| | | dtxtAngle.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtAngle.Location = new Point(132, 124); |
| | | dtxtAngle.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtAngle.Name = "dtxtAngle"; |
| | | dtxtAngle.ReadOnly = true; |
| | | dtxtAngle.Size = new Size(293, 23); |
| | | dtxtAngle.Size = new Size(377, 27); |
| | | dtxtAngle.TabIndex = 7; |
| | | // |
| | | // dtxtWidth |
| | | // |
| | | dtxtWidth.Dock = DockStyle.Fill; |
| | | dtxtWidth.Location = new Point(102, 156); |
| | | dtxtWidth.Margin = new Padding(2, 3, 2, 3); |
| | | dtxtWidth.Location = new Point(132, 184); |
| | | dtxtWidth.Margin = new Padding(3, 4, 3, 4); |
| | | dtxtWidth.Name = "dtxtWidth"; |
| | | dtxtWidth.ReadOnly = true; |
| | | dtxtWidth.Size = new Size(293, 23); |
| | | dtxtWidth.Size = new Size(377, 27); |
| | | dtxtWidth.TabIndex = 8; |
| | | // |
| | | // label18 |
| | | // |
| | | label18.AutoSize = true; |
| | | label18.Dock = DockStyle.Fill; |
| | | label18.Location = new Point(3, 255); |
| | | label18.Location = new Point(4, 300); |
| | | label18.Margin = new Padding(4, 0, 4, 0); |
| | | label18.Name = "label18"; |
| | | label18.Size = new Size(94, 51); |
| | | label18.Size = new Size(121, 60); |
| | | label18.TabIndex = 10; |
| | | label18.Text = "æ°é"; |
| | | label18.TextAlign = ContentAlignment.TopCenter; |
| | |
| | | // dtxtCount |
| | | // |
| | | dtxtCount.Dock = DockStyle.Fill; |
| | | dtxtCount.Location = new Point(103, 258); |
| | | dtxtCount.Location = new Point(133, 304); |
| | | dtxtCount.Margin = new Padding(4); |
| | | dtxtCount.Name = "dtxtCount"; |
| | | dtxtCount.ReadOnly = true; |
| | | dtxtCount.Size = new Size(291, 23); |
| | | dtxtCount.Size = new Size(375, 27); |
| | | dtxtCount.TabIndex = 11; |
| | | // |
| | | // imgTabControl |
| | |
| | | imgTabControl.Controls.Add(tabPageInputImage); |
| | | imgTabControl.Controls.Add(tabPageRecordImage); |
| | | imgTabControl.Dock = DockStyle.Fill; |
| | | imgTabControl.Location = new Point(420, 3); |
| | | imgTabControl.Location = new Point(540, 4); |
| | | imgTabControl.Margin = new Padding(4); |
| | | imgTabControl.Name = "imgTabControl"; |
| | | imgTabControl.SelectedIndex = 0; |
| | | imgTabControl.Size = new Size(621, 546); |
| | | imgTabControl.Size = new Size(798, 644); |
| | | imgTabControl.TabIndex = 49; |
| | | // |
| | | // tabPageInputImage |
| | | // |
| | | tabPageInputImage.Controls.Add(pnlInputImage); |
| | | tabPageInputImage.Location = new Point(4, 26); |
| | | tabPageInputImage.Location = new Point(4, 29); |
| | | tabPageInputImage.Margin = new Padding(4); |
| | | tabPageInputImage.Name = "tabPageInputImage"; |
| | | tabPageInputImage.Padding = new Padding(3); |
| | | tabPageInputImage.Size = new Size(613, 516); |
| | | tabPageInputImage.Padding = new Padding(4); |
| | | tabPageInputImage.Size = new Size(790, 611); |
| | | tabPageInputImage.TabIndex = 0; |
| | | tabPageInputImage.Text = "è¾å
¥å¾å"; |
| | | tabPageInputImage.UseVisualStyleBackColor = true; |
| | |
| | | // tabPageRecordImage |
| | | // |
| | | tabPageRecordImage.Controls.Add(pnlRecordImage); |
| | | tabPageRecordImage.Location = new Point(4, 26); |
| | | tabPageRecordImage.Location = new Point(4, 29); |
| | | tabPageRecordImage.Margin = new Padding(4); |
| | | tabPageRecordImage.Name = "tabPageRecordImage"; |
| | | tabPageRecordImage.Padding = new Padding(3); |
| | | tabPageRecordImage.Size = new Size(613, 516); |
| | | tabPageRecordImage.Padding = new Padding(4); |
| | | tabPageRecordImage.Size = new Size(790, 611); |
| | | tabPageRecordImage.TabIndex = 1; |
| | | tabPageRecordImage.Text = "ç»æå¾å"; |
| | | tabPageRecordImage.UseVisualStyleBackColor = true; |
| | |
| | | // pnlRecordImage |
| | | // |
| | | pnlRecordImage.Dock = DockStyle.Fill; |
| | | pnlRecordImage.Location = new Point(3, 3); |
| | | pnlRecordImage.Margin = new Padding(4); |
| | | pnlRecordImage.Location = new Point(4, 4); |
| | | pnlRecordImage.Margin = new Padding(5); |
| | | pnlRecordImage.Name = "pnlRecordImage"; |
| | | pnlRecordImage.Size = new Size(607, 510); |
| | | pnlRecordImage.Size = new Size(782, 603); |
| | | pnlRecordImage.TabIndex = 45; |
| | | // |
| | | // btnShowROI |
| | | // |
| | | btnShowROI.Dock = DockStyle.Fill; |
| | | btnShowROI.Location = new Point(3, 207); |
| | | btnShowROI.Name = "btnShowROI"; |
| | | btnShowROI.Size = new Size(84, 45); |
| | | btnShowROI.TabIndex = 15; |
| | | btnShowROI.Text = "æ¾ç¤ºæ¾çº¿åºå"; |
| | | btnShowROI.UseVisualStyleBackColor = true; |
| | | btnShowROI.Click += btnShowROI_Click; |
| | | // |
| | | // HFindLineToolEdit |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 17F); |
| | | AutoScaleDimensions = new SizeF(9F, 20F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(MainTableLayoutPanel); |
| | | Controls.Add(BtmStatusStrip); |
| | | Controls.Add(TopToolStrip); |
| | | Margin = new Padding(2, 3, 2, 3); |
| | | Margin = new Padding(3, 4, 3, 4); |
| | | Name = "HFindLineToolEdit"; |
| | | Size = new Size(1044, 599); |
| | | Size = new Size(1342, 705); |
| | | Load += HFindLineToolEdit_Load; |
| | | tablePanelParas.ResumeLayout(false); |
| | | tablePanelParas.PerformLayout(); |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <metadata name="lblMsgToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>183, 17</value> |
| | | </metadata> |
| | | <metadata name="BtmStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>129, 17</value> |
| | | <value>340, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Drawing.Imaging; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | Result = false; |
| | | return; |
| | | } |
| | | if (InputImage is Bitmap) |
| | | { |
| | | try |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | if (!(InputImage is HObject)) |
| | | { |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºHObject"; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Drawing.Imaging; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | Result = false; |
| | | return; |
| | | } |
| | | if (InputImage is Bitmap) |
| | | { |
| | | try |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | if (!(InputImage is HObject)) |
| | | { |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºMat"; |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºHObject"; |
| | | Result = false; |
| | | return; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HalconDotNet; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionControl; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Imaging; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using static System.Runtime.InteropServices.JavaScript.JSType; |
| | | |
| | | namespace LB_VisionProcesses.Alogrithms.Halcon |
| | | { |
| | | public enum ImageEnhancementType { Emphasize, EquHisto, ScaleMax } |
| | | |
| | | [Process("Halcon2Då¾åå¢å¼º", Category = "Halcon2Då·¥å
·", Description = "å建å¾åå¢å¼ºå·¥å
·")] |
| | | public class HImageEnhancementTool : TAlgorithm |
| | | { |
| | | public HImageEnhancementTool() |
| | | { |
| | | strProcessClass = "LB_VisionProcesses.Alogrithms.Halcon.HImageEnhancementTool"; |
| | | strProcessName = "Halcon2Då¾åå¢å¼ºå·¥å
·"; |
| | | |
| | | Params.Inputs.Add("滤波å¨ç±»å", "è¾¹ç¼å¢å¼º"); |
| | | Params.Inputs.Add("æ©è宽", 1); |
| | | Params.Inputs.Add("æ©èé«", 1); |
| | | Params.Inputs.Add("å¢å¼ºå å", 1.0); |
| | | //emphasize(Image : ImageEmphasize : MaskWidth, MaskHeight, Factor : ) |
| | | |
| | | Params.Inputs.Add("滤波å¨ç±»å", "ç´æ¹å¾åè¡¡å"); |
| | | //equ_histo_image(Image : ImageEquHisto : : ) |
| | | |
| | | Params.Inputs.Add("滤波å¨ç±»å", "æ¯ä¾å¢å¼º"); |
| | | //scale_image_max(Image : ImageScaleMax : : ) |
| | | |
| | | Params.ROI = new HSegment(0, 0, 250, 250); |
| | | } |
| | | |
| | | List<RecordImageEnhancementData> recordImageEnhancementDatas = new List<RecordImageEnhancementData>(); |
| | | /// <summary> |
| | | /// ç®åé»è¾ |
| | | /// </summary> |
| | | public override void TAlgorithmMain() |
| | | { |
| | | #region åå§ååé |
| | | HObject ho_Regions, ho_LineXld; |
| | | HOperatorSet.GenEmptyObj(out ho_Regions); |
| | | HOperatorSet.GenEmptyObj(out ho_LineXld); |
| | | #endregion |
| | | |
| | | try |
| | | { |
| | | if (InputImage == null) |
| | | { |
| | | Msg = "è¾å
¥å¾ç为空"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | if (InputImage is Bitmap) |
| | | { |
| | | try |
| | | { |
| | | using (HImage hImage = new HImage()) |
| | | { |
| | | Bitmap bitmap = (Bitmap)InputImage; |
| | | Rectangle rect = new Rectangle(0, 0, ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height); |
| | | BitmapData srcBmpData = ((Bitmap)bitmap).LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb); |
| | | hImage.GenImageInterleaved(srcBmpData.Scan0, "rgbx", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, "byte", ((Bitmap)bitmap).Width, ((Bitmap)bitmap).Height, 0, 0, -1, 0); |
| | | ((Bitmap)bitmap).UnlockBits(srcBmpData); |
| | | bitmap.Dispose(); |
| | | bitmap = null; |
| | | InputImage = null; |
| | | InputImage = hImage.Clone(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | if (!(InputImage is HObject)) |
| | | { |
| | | Msg = "è¾å
¥å¾çæ ¼å¼ä¸ä¸ºHObject"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | #region è£åªåºå |
| | | //if (!(Params.ROI is HSegment)) |
| | | //{ |
| | | // Msg = "ROIç±»åé误,å¿
须为HSegmentç±»å"; |
| | | // Result = false; |
| | | // return; |
| | | //} |
| | | |
| | | //if (!(InputImage is HObject)) |
| | | //{ |
| | | // Msg = "è¾å
¥å¾çç±»åé误,å¿
须为HObjectç±»å"; |
| | | // Result = false; |
| | | // return; |
| | | //} |
| | | |
| | | //HObject DomainImage = ((HObject)InputImage)?.CopyObj(1, -1); |
| | | object DomainImage = null; |
| | | if (!ReduceDomainImage(InputImage, ref DomainImage)) |
| | | { |
| | | Msg = "è£åªåºå失败"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | #endregion |
| | | |
| | | #region ç®åé»è¾ |
| | | Record = new ObjectRecord(); |
| | | HObject hoDomainImage = DomainImage as HObject; |
| | | HTuple hv_Channels = new HTuple(); |
| | | //夿æ¯å¦ä¸ºç°åº¦å¾ |
| | | using (HDevDisposeHelper dh = new HDevDisposeHelper()) |
| | | { |
| | | try |
| | | { |
| | | HOperatorSet.CountChannels(hoDomainImage, out hv_Channels); |
| | | if (hv_Channels.TupleInt() != 1) |
| | | HOperatorSet.Rgb1ToGray(hoDomainImage, out hoDomainImage); |
| | | |
| | | //转æ¢å忬¡æ£æ¥æ¯å¦ä¸ºç°åº¦å¾ |
| | | HOperatorSet.CountChannels(hoDomainImage, out hv_Channels); |
| | | if (hv_Channels.TupleInt() != 1) |
| | | { |
| | | HOperatorSet.Rgb1ToGray(hoDomainImage, out hoDomainImage); |
| | | Msg = "è¾å
¥å¾çä¸ä¸ºç°åº¦å¾"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | Msg = "è¾å
¥å¾çä¸ä¸ºç°åº¦å¾ä¸è½¬æ¢å¤±è´¥"; |
| | | Result = false; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | int hv_MaskWidth = Convert.ToInt16(Params.Inputs["æ©è宽"]); |
| | | int hv_MaskHight = Convert.ToInt16(Params.Inputs["æ©èé«"]); |
| | | double hv_Factor = Convert.ToDouble(Params.Inputs["å¢å¼ºå å"]); |
| | | |
| | | recordImageEnhancementDatas = ImageEnhancementManager.Instance.GetAllUsers(); |
| | | |
| | | string hv_ImageEnhancementType = ""; |
| | | foreach (var recordImageEnhancementData in recordImageEnhancementDatas) |
| | | { |
| | | switch (recordImageEnhancementData.FilterName) |
| | | { |
| | | case ImageEnhancementDataType.è¾¹ç¼å¢å¼º_ImageEmphasize: |
| | | hv_ImageEnhancementType = "emphasize"; |
| | | hv_MaskWidth = Convert.ToInt16(recordImageEnhancementData.MaskWidth); |
| | | hv_MaskHight = Convert.ToInt16(recordImageEnhancementData.MaskHight); |
| | | hv_Factor = Convert.ToDouble(recordImageEnhancementData.Factor); |
| | | ImageEnhancement(hoDomainImage, out ho_Regions, hv_ImageEnhancementType, hv_MaskWidth, hv_MaskHight, hv_Factor); |
| | | break; |
| | | case ImageEnhancementDataType.ç´æ¹å¾åè¡¡å_EquHistoImage: |
| | | hv_ImageEnhancementType = "equhisto"; |
| | | ImageEnhancement(hoDomainImage, out ho_Regions, hv_ImageEnhancementType, hv_MaskWidth, hv_MaskHight, hv_Factor); |
| | | break; |
| | | case ImageEnhancementDataType.æ¯ä¾å¢å¼º_ScaleImageMax: |
| | | hv_ImageEnhancementType = "scaleimageMax"; |
| | | ImageEnhancement(hoDomainImage, out ho_Regions, hv_ImageEnhancementType, hv_MaskWidth, hv_MaskHight, hv_Factor); |
| | | break; |
| | | default: |
| | | hv_ImageEnhancementType = "scaleImageMax"; |
| | | ImageEnhancement(hoDomainImage, out ho_Regions, hv_ImageEnhancementType, hv_MaskWidth, hv_MaskHight, hv_Factor); |
| | | break; |
| | | } |
| | | |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region çæOutputImageç»åç»å¤ç |
| | | try |
| | | { |
| | | OutputImage = hoDomainImage; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Msg = "çæOutputImage失败,åå æ¯:" + ex.ToString(); |
| | | Result = false; |
| | | return; |
| | | } |
| | | #endregion |
| | | |
| | | if (Msg == "è¿è¡è¶
æ¶") |
| | | { |
| | | Result = false; |
| | | return; |
| | | } |
| | | |
| | | Msg = "è¿è¡æå"; |
| | | Result = true; |
| | | return; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Msg = "è¿è¡å¤±è´¥,åå æ¯:" + ex.ToString().TrimEnd(); |
| | | OutputImage = null; |
| | | Result = false; |
| | | return; |
| | | } |
| | | finally |
| | | { |
| | | if (!Result) |
| | | { |
| | | Params.Outputs.Add("Segment", new HSegment()); |
| | | } |
| | | |
| | | bCompleted = true; |
| | | #region å
åéæ¾ |
| | | ho_Regions.Dispose(); |
| | | #endregion |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using LB_VisionProcesses.Alogrithms; |
| | | |
| | | namespace LB_VisionProcesses.Alogrithms.Halcon |
| | | { |
| | | partial class HImageEnhancementToolEdit |
| | | { |
| | | /// <summary> |
| | | /// å¿
éç设计å¨åéã |
| | | /// </summary> |
| | | private System.ComponentModel.IContainer components = null; |
| | | |
| | | /// <summary> |
| | | /// æ¸
çæææ£å¨ä½¿ç¨çèµæºã |
| | | /// </summary> |
| | | /// <param name="disposing">妿åºéæ¾æç®¡èµæºï¼ä¸º trueï¼å¦å为 falseã</param> |
| | | protected override void Dispose(bool disposing) |
| | | { |
| | | if (disposing && (components != null)) |
| | | { |
| | | components.Dispose(); |
| | | } |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | #region ç»ä»¶è®¾è®¡å¨çæç代ç |
| | | |
| | | /// <summary> |
| | | /// è®¾è®¡å¨æ¯ææéçæ¹æ³ - ä¸è¦ä¿®æ¹ |
| | | /// 使ç¨ä»£ç ç¼è¾å¨ä¿®æ¹æ¤æ¹æ³çå
容ã |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | pnlInputImage = new Panel(); |
| | | TopToolStrip = new ToolStrip(); |
| | | btnRun = new ToolStripButton(); |
| | | btnLoadImage = new ToolStripButton(); |
| | | btnSaveParas = new ToolStripButton(); |
| | | btnLoadParas = new ToolStripButton(); |
| | | BtmStatusStrip = new StatusStrip(); |
| | | lblResult = new ToolStripStatusLabel(); |
| | | lblMsg = new ToolStripStatusLabel(); |
| | | lblRunTime = new ToolStripStatusLabel(); |
| | | MainTableLayoutPanel = new TableLayoutPanel(); |
| | | parasTabControl = new TabControl(); |
| | | tabPage1 = new TabPage(); |
| | | tableLayoutPanel1 = new TableLayoutPanel(); |
| | | dataGridViewIE = new DataGridView(); |
| | | tableLayoutPanel4 = new TableLayoutPanel(); |
| | | tableLayoutPanel3 = new TableLayoutPanel(); |
| | | cmbImageEnhancement = new ComboBox(); |
| | | btnAdd = new Button(); |
| | | labelImageEnhancement = new Label(); |
| | | btnDel = new Button(); |
| | | tableLayoutPanel5 = new TableLayoutPanel(); |
| | | labelMaskWidth = new Label(); |
| | | labelMaskHeight = new Label(); |
| | | labelFactor = new Label(); |
| | | txtMaskWidth = new TextBox(); |
| | | txtMaskHeight = new TextBox(); |
| | | txtFactor = new TextBox(); |
| | | tabPage5 = new TabPage(); |
| | | tableLayoutPanel2 = new TableLayoutPanel(); |
| | | cmbTypeRoi = new ComboBox(); |
| | | label21 = new Label(); |
| | | label22 = new Label(); |
| | | cmbFixture = new ComboBox(); |
| | | ckbDrawRoi = new CheckBox(); |
| | | imgTabControl = new TabControl(); |
| | | tabPageInputImage = new TabPage(); |
| | | tabPageRecordImage = new TabPage(); |
| | | pnlRecordImage = new Panel(); |
| | | TopToolStrip.SuspendLayout(); |
| | | BtmStatusStrip.SuspendLayout(); |
| | | MainTableLayoutPanel.SuspendLayout(); |
| | | parasTabControl.SuspendLayout(); |
| | | tabPage1.SuspendLayout(); |
| | | tableLayoutPanel1.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)dataGridViewIE).BeginInit(); |
| | | tableLayoutPanel4.SuspendLayout(); |
| | | tableLayoutPanel3.SuspendLayout(); |
| | | tableLayoutPanel5.SuspendLayout(); |
| | | tabPage5.SuspendLayout(); |
| | | tableLayoutPanel2.SuspendLayout(); |
| | | imgTabControl.SuspendLayout(); |
| | | tabPageInputImage.SuspendLayout(); |
| | | tabPageRecordImage.SuspendLayout(); |
| | | SuspendLayout(); |
| | | // |
| | | // pnlInputImage |
| | | // |
| | | pnlInputImage.Dock = DockStyle.Fill; |
| | | pnlInputImage.Location = new Point(4, 4); |
| | | pnlInputImage.Margin = new Padding(5); |
| | | pnlInputImage.Name = "pnlInputImage"; |
| | | pnlInputImage.Size = new Size(768, 603); |
| | | pnlInputImage.TabIndex = 44; |
| | | // |
| | | // TopToolStrip |
| | | // |
| | | TopToolStrip.ImageScalingSize = new Size(20, 20); |
| | | TopToolStrip.Items.AddRange(new ToolStripItem[] { btnRun, btnLoadImage, btnSaveParas, btnLoadParas }); |
| | | TopToolStrip.Location = new Point(0, 0); |
| | | TopToolStrip.Name = "TopToolStrip"; |
| | | TopToolStrip.Size = new Size(1342, 27); |
| | | TopToolStrip.TabIndex = 45; |
| | | TopToolStrip.Text = "toolStrip1"; |
| | | // |
| | | // btnRun |
| | | // |
| | | btnRun.BackgroundImageLayout = ImageLayout.Zoom; |
| | | btnRun.ImageTransparentColor = Color.Magenta; |
| | | btnRun.Name = "btnRun"; |
| | | btnRun.Size = new Size(43, 24); |
| | | btnRun.Text = "è¿è¡"; |
| | | btnRun.Click += btnRun_Click; |
| | | // |
| | | // btnLoadImage |
| | | // |
| | | btnLoadImage.ImageTransparentColor = Color.Magenta; |
| | | btnLoadImage.Name = "btnLoadImage"; |
| | | btnLoadImage.Size = new Size(43, 24); |
| | | btnLoadImage.Text = "导å¾"; |
| | | btnLoadImage.Click += btnLoadImage_Click; |
| | | // |
| | | // btnSaveParas |
| | | // |
| | | btnSaveParas.ImageTransparentColor = Color.Magenta; |
| | | btnSaveParas.Name = "btnSaveParas"; |
| | | btnSaveParas.Size = new Size(43, 24); |
| | | btnSaveParas.Text = "ä¿å"; |
| | | btnSaveParas.Click += btnSaveParas_Click; |
| | | // |
| | | // btnLoadParas |
| | | // |
| | | btnLoadParas.ImageTransparentColor = Color.Magenta; |
| | | btnLoadParas.Name = "btnLoadParas"; |
| | | btnLoadParas.Size = new Size(43, 24); |
| | | btnLoadParas.Text = "å è½½"; |
| | | // |
| | | // BtmStatusStrip |
| | | // |
| | | BtmStatusStrip.ImageScalingSize = new Size(20, 20); |
| | | BtmStatusStrip.Items.AddRange(new ToolStripItem[] { lblResult, lblMsg, lblRunTime }); |
| | | BtmStatusStrip.Location = new Point(0, 679); |
| | | BtmStatusStrip.Name = "BtmStatusStrip"; |
| | | BtmStatusStrip.Padding = new Padding(1, 0, 18, 0); |
| | | BtmStatusStrip.Size = new Size(1342, 26); |
| | | BtmStatusStrip.TabIndex = 46; |
| | | BtmStatusStrip.Text = "statusStrip1"; |
| | | // |
| | | // lblResult |
| | | // |
| | | lblResult.Name = "lblResult"; |
| | | lblResult.Size = new Size(42, 20); |
| | | lblResult.Text = "True"; |
| | | // |
| | | // lblMsg |
| | | // |
| | | lblMsg.Name = "lblMsg"; |
| | | lblMsg.Size = new Size(69, 20); |
| | | lblMsg.Text = "è¿è¡æå"; |
| | | // |
| | | // lblRunTime |
| | | // |
| | | lblRunTime.Name = "lblRunTime"; |
| | | lblRunTime.Size = new Size(39, 20); |
| | | lblRunTime.Text = "0ms"; |
| | | // |
| | | // MainTableLayoutPanel |
| | | // |
| | | MainTableLayoutPanel.ColumnCount = 2; |
| | | MainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 41F)); |
| | | MainTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 59F)); |
| | | MainTableLayoutPanel.Controls.Add(parasTabControl, 0, 0); |
| | | MainTableLayoutPanel.Controls.Add(imgTabControl, 1, 0); |
| | | MainTableLayoutPanel.Dock = DockStyle.Fill; |
| | | MainTableLayoutPanel.Location = new Point(0, 27); |
| | | MainTableLayoutPanel.Margin = new Padding(4); |
| | | MainTableLayoutPanel.Name = "MainTableLayoutPanel"; |
| | | MainTableLayoutPanel.RowCount = 1; |
| | | MainTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | MainTableLayoutPanel.Size = new Size(1342, 652); |
| | | MainTableLayoutPanel.TabIndex = 47; |
| | | // |
| | | // parasTabControl |
| | | // |
| | | parasTabControl.Controls.Add(tabPage1); |
| | | parasTabControl.Controls.Add(tabPage5); |
| | | parasTabControl.Dock = DockStyle.Fill; |
| | | parasTabControl.Location = new Point(4, 4); |
| | | parasTabControl.Margin = new Padding(4); |
| | | parasTabControl.Name = "parasTabControl"; |
| | | parasTabControl.SelectedIndex = 0; |
| | | parasTabControl.Size = new Size(542, 644); |
| | | parasTabControl.TabIndex = 48; |
| | | // |
| | | // tabPage1 |
| | | // |
| | | tabPage1.Controls.Add(tableLayoutPanel1); |
| | | tabPage1.Location = new Point(4, 29); |
| | | tabPage1.Margin = new Padding(4); |
| | | tabPage1.Name = "tabPage1"; |
| | | tabPage1.Padding = new Padding(4); |
| | | tabPage1.Size = new Size(534, 611); |
| | | tabPage1.TabIndex = 0; |
| | | tabPage1.Text = "è¾å
¥åæ°"; |
| | | tabPage1.UseVisualStyleBackColor = true; |
| | | // |
| | | // tableLayoutPanel1 |
| | | // |
| | | tableLayoutPanel1.ColumnCount = 1; |
| | | tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Controls.Add(dataGridViewIE, 0, 1); |
| | | tableLayoutPanel1.Controls.Add(tableLayoutPanel4, 0, 0); |
| | | tableLayoutPanel1.Dock = DockStyle.Fill; |
| | | tableLayoutPanel1.Location = new Point(4, 4); |
| | | tableLayoutPanel1.Name = "tableLayoutPanel1"; |
| | | tableLayoutPanel1.RowCount = 2; |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 135F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Size = new Size(526, 603); |
| | | tableLayoutPanel1.TabIndex = 1; |
| | | // |
| | | // dataGridViewIE |
| | | // |
| | | dataGridViewIE.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; |
| | | dataGridViewIE.Dock = DockStyle.Fill; |
| | | dataGridViewIE.Location = new Point(3, 138); |
| | | dataGridViewIE.Name = "dataGridViewIE"; |
| | | dataGridViewIE.RowHeadersWidth = 51; |
| | | dataGridViewIE.Size = new Size(520, 462); |
| | | dataGridViewIE.TabIndex = 2; |
| | | // |
| | | // tableLayoutPanel4 |
| | | // |
| | | tableLayoutPanel4.ColumnCount = 1; |
| | | tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel4.Controls.Add(tableLayoutPanel3, 0, 0); |
| | | tableLayoutPanel4.Controls.Add(tableLayoutPanel5, 0, 1); |
| | | tableLayoutPanel4.Dock = DockStyle.Fill; |
| | | tableLayoutPanel4.Location = new Point(3, 3); |
| | | tableLayoutPanel4.Name = "tableLayoutPanel4"; |
| | | tableLayoutPanel4.RowCount = 2; |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); |
| | | tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel4.Size = new Size(520, 129); |
| | | tableLayoutPanel4.TabIndex = 3; |
| | | // |
| | | // tableLayoutPanel3 |
| | | // |
| | | tableLayoutPanel3.ColumnCount = 4; |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 172F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel3.Controls.Add(cmbImageEnhancement, 1, 0); |
| | | tableLayoutPanel3.Controls.Add(btnAdd, 2, 0); |
| | | tableLayoutPanel3.Controls.Add(labelImageEnhancement, 0, 0); |
| | | tableLayoutPanel3.Controls.Add(btnDel, 3, 0); |
| | | tableLayoutPanel3.Location = new Point(3, 3); |
| | | tableLayoutPanel3.Name = "tableLayoutPanel3"; |
| | | tableLayoutPanel3.RowCount = 1; |
| | | tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel3.Size = new Size(514, 38); |
| | | tableLayoutPanel3.TabIndex = 0; |
| | | // |
| | | // cmbImageEnhancement |
| | | // |
| | | cmbImageEnhancement.DropDownStyle = ComboBoxStyle.DropDownList; |
| | | cmbImageEnhancement.FormattingEnabled = true; |
| | | cmbImageEnhancement.ImeMode = ImeMode.Off; |
| | | cmbImageEnhancement.Location = new Point(89, 4); |
| | | cmbImageEnhancement.Margin = new Padding(4); |
| | | cmbImageEnhancement.Name = "cmbImageEnhancement"; |
| | | cmbImageEnhancement.Size = new Size(164, 28); |
| | | cmbImageEnhancement.TabIndex = 14; |
| | | cmbImageEnhancement.SelectedIndexChanged += cmbImageEnhancement_SelectedIndexChanged; |
| | | // |
| | | // btnAdd |
| | | // |
| | | btnAdd.Location = new Point(260, 3); |
| | | btnAdd.Name = "btnAdd"; |
| | | btnAdd.Size = new Size(122, 30); |
| | | btnAdd.TabIndex = 15; |
| | | btnAdd.Text = "æ·»å "; |
| | | btnAdd.UseVisualStyleBackColor = true; |
| | | btnAdd.Click += btnAdd_Click; |
| | | // |
| | | // labelImageEnhancement |
| | | // |
| | | labelImageEnhancement.AutoSize = true; |
| | | labelImageEnhancement.Location = new Point(3, 0); |
| | | labelImageEnhancement.MaximumSize = new Size(0, 33); |
| | | labelImageEnhancement.MinimumSize = new Size(0, 33); |
| | | labelImageEnhancement.Name = "labelImageEnhancement"; |
| | | labelImageEnhancement.Size = new Size(69, 33); |
| | | labelImageEnhancement.TabIndex = 1; |
| | | labelImageEnhancement.Text = "滤波类å"; |
| | | labelImageEnhancement.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // btnDel |
| | | // |
| | | btnDel.Location = new Point(388, 3); |
| | | btnDel.Name = "btnDel"; |
| | | btnDel.Size = new Size(123, 32); |
| | | btnDel.TabIndex = 16; |
| | | btnDel.Text = "å é¤"; |
| | | btnDel.UseVisualStyleBackColor = true; |
| | | btnDel.Click += btnDel_Click; |
| | | // |
| | | // tableLayoutPanel5 |
| | | // |
| | | tableLayoutPanel5.ColumnCount = 4; |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 172F)); |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 85F)); |
| | | tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 172F)); |
| | | tableLayoutPanel5.Controls.Add(labelMaskWidth, 0, 0); |
| | | tableLayoutPanel5.Controls.Add(labelMaskHeight, 2, 0); |
| | | tableLayoutPanel5.Controls.Add(labelFactor, 0, 1); |
| | | tableLayoutPanel5.Controls.Add(txtMaskWidth, 1, 0); |
| | | tableLayoutPanel5.Controls.Add(txtMaskHeight, 3, 0); |
| | | tableLayoutPanel5.Controls.Add(txtFactor, 1, 1); |
| | | tableLayoutPanel5.Location = new Point(3, 48); |
| | | tableLayoutPanel5.Name = "tableLayoutPanel5"; |
| | | tableLayoutPanel5.RowCount = 2; |
| | | tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel5.Size = new Size(514, 74); |
| | | tableLayoutPanel5.TabIndex = 1; |
| | | // |
| | | // labelMaskWidth |
| | | // |
| | | labelMaskWidth.AutoSize = true; |
| | | labelMaskWidth.Location = new Point(3, 0); |
| | | labelMaskWidth.Name = "labelMaskWidth"; |
| | | labelMaskWidth.Size = new Size(54, 20); |
| | | labelMaskWidth.TabIndex = 0; |
| | | labelMaskWidth.Text = "æ©è宽"; |
| | | // |
| | | // labelMaskHeight |
| | | // |
| | | labelMaskHeight.AutoSize = true; |
| | | labelMaskHeight.Location = new Point(260, 0); |
| | | labelMaskHeight.Name = "labelMaskHeight"; |
| | | labelMaskHeight.Size = new Size(54, 20); |
| | | labelMaskHeight.TabIndex = 1; |
| | | labelMaskHeight.Text = "æ©èé«"; |
| | | // |
| | | // labelFactor |
| | | // |
| | | labelFactor.AutoSize = true; |
| | | labelFactor.Location = new Point(3, 37); |
| | | labelFactor.Name = "labelFactor"; |
| | | labelFactor.Size = new Size(69, 20); |
| | | labelFactor.TabIndex = 2; |
| | | labelFactor.Text = "å¢å¼ºå å"; |
| | | // |
| | | // txtMaskWidth |
| | | // |
| | | txtMaskWidth.Location = new Point(88, 3); |
| | | txtMaskWidth.Name = "txtMaskWidth"; |
| | | txtMaskWidth.Size = new Size(166, 27); |
| | | txtMaskWidth.TabIndex = 3; |
| | | // |
| | | // txtMaskHeight |
| | | // |
| | | txtMaskHeight.Location = new Point(345, 3); |
| | | txtMaskHeight.Name = "txtMaskHeight"; |
| | | txtMaskHeight.Size = new Size(166, 27); |
| | | txtMaskHeight.TabIndex = 4; |
| | | // |
| | | // txtFactor |
| | | // |
| | | txtFactor.Location = new Point(88, 40); |
| | | txtFactor.Name = "txtFactor"; |
| | | txtFactor.Size = new Size(166, 27); |
| | | txtFactor.TabIndex = 5; |
| | | // |
| | | // tabPage5 |
| | | // |
| | | tabPage5.Controls.Add(tableLayoutPanel2); |
| | | tabPage5.Location = new Point(4, 29); |
| | | tabPage5.Margin = new Padding(4); |
| | | tabPage5.Name = "tabPage5"; |
| | | tabPage5.Size = new Size(534, 611); |
| | | tabPage5.TabIndex = 2; |
| | | tabPage5.Text = "è¿è¡åæ°"; |
| | | tabPage5.UseVisualStyleBackColor = true; |
| | | // |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 4; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 77F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 193F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 26F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Controls.Add(cmbTypeRoi, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(label21, 0, 0); |
| | | tableLayoutPanel2.Controls.Add(label22, 0, 1); |
| | | tableLayoutPanel2.Controls.Add(cmbFixture, 1, 1); |
| | | tableLayoutPanel2.Controls.Add(ckbDrawRoi, 2, 0); |
| | | tableLayoutPanel2.Location = new Point(4, 4); |
| | | tableLayoutPanel2.Margin = new Padding(4); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | | tableLayoutPanel2.RowCount = 8; |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 35F)); |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Size = new Size(415, 364); |
| | | tableLayoutPanel2.TabIndex = 4; |
| | | // |
| | | // cmbTypeRoi |
| | | // |
| | | cmbTypeRoi.FormattingEnabled = true; |
| | | cmbTypeRoi.Location = new Point(81, 4); |
| | | cmbTypeRoi.Margin = new Padding(4); |
| | | cmbTypeRoi.Name = "cmbTypeRoi"; |
| | | cmbTypeRoi.Size = new Size(154, 28); |
| | | cmbTypeRoi.TabIndex = 1; |
| | | cmbTypeRoi.SelectedIndexChanged += cmbTypeRoi_SelectedIndexChanged; |
| | | // |
| | | // label21 |
| | | // |
| | | label21.AutoSize = true; |
| | | label21.Dock = DockStyle.Fill; |
| | | label21.Location = new Point(4, 0); |
| | | label21.Margin = new Padding(4, 0, 4, 0); |
| | | label21.Name = "label21"; |
| | | label21.Size = new Size(69, 35); |
| | | label21.TabIndex = 3; |
| | | label21.Text = "ROI"; |
| | | label21.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // label22 |
| | | // |
| | | label22.AutoSize = true; |
| | | label22.Dock = DockStyle.Fill; |
| | | label22.Location = new Point(4, 35); |
| | | label22.Margin = new Padding(4, 0, 4, 0); |
| | | label22.Name = "label22"; |
| | | label22.Size = new Size(69, 35); |
| | | label22.TabIndex = 4; |
| | | label22.Text = "Fixture"; |
| | | label22.TextAlign = ContentAlignment.MiddleCenter; |
| | | // |
| | | // cmbFixture |
| | | // |
| | | cmbFixture.FormattingEnabled = true; |
| | | cmbFixture.Location = new Point(81, 39); |
| | | cmbFixture.Margin = new Padding(4); |
| | | cmbFixture.Name = "cmbFixture"; |
| | | cmbFixture.Size = new Size(154, 28); |
| | | cmbFixture.TabIndex = 5; |
| | | // |
| | | // ckbDrawRoi |
| | | // |
| | | ckbDrawRoi.AutoSize = true; |
| | | ckbDrawRoi.CheckAlign = ContentAlignment.MiddleCenter; |
| | | ckbDrawRoi.Location = new Point(274, 4); |
| | | ckbDrawRoi.Margin = new Padding(4); |
| | | ckbDrawRoi.Name = "ckbDrawRoi"; |
| | | ckbDrawRoi.Size = new Size(18, 17); |
| | | ckbDrawRoi.TabIndex = 2; |
| | | ckbDrawRoi.UseVisualStyleBackColor = true; |
| | | ckbDrawRoi.CheckedChanged += ckbDrawRoi_CheckedChanged; |
| | | // |
| | | // imgTabControl |
| | | // |
| | | imgTabControl.Controls.Add(tabPageInputImage); |
| | | imgTabControl.Controls.Add(tabPageRecordImage); |
| | | imgTabControl.Dock = DockStyle.Fill; |
| | | imgTabControl.Location = new Point(554, 4); |
| | | imgTabControl.Margin = new Padding(4); |
| | | imgTabControl.Name = "imgTabControl"; |
| | | imgTabControl.SelectedIndex = 0; |
| | | imgTabControl.Size = new Size(784, 644); |
| | | imgTabControl.TabIndex = 49; |
| | | // |
| | | // tabPageInputImage |
| | | // |
| | | tabPageInputImage.Controls.Add(pnlInputImage); |
| | | tabPageInputImage.Location = new Point(4, 29); |
| | | tabPageInputImage.Margin = new Padding(4); |
| | | tabPageInputImage.Name = "tabPageInputImage"; |
| | | tabPageInputImage.Padding = new Padding(4); |
| | | tabPageInputImage.Size = new Size(776, 611); |
| | | tabPageInputImage.TabIndex = 0; |
| | | tabPageInputImage.Text = "è¾å
¥å¾å"; |
| | | tabPageInputImage.UseVisualStyleBackColor = true; |
| | | // |
| | | // tabPageRecordImage |
| | | // |
| | | tabPageRecordImage.Controls.Add(pnlRecordImage); |
| | | tabPageRecordImage.Location = new Point(4, 29); |
| | | tabPageRecordImage.Margin = new Padding(4); |
| | | tabPageRecordImage.Name = "tabPageRecordImage"; |
| | | tabPageRecordImage.Padding = new Padding(4); |
| | | tabPageRecordImage.Size = new Size(776, 611); |
| | | tabPageRecordImage.TabIndex = 1; |
| | | tabPageRecordImage.Text = "ç»æå¾å"; |
| | | tabPageRecordImage.UseVisualStyleBackColor = true; |
| | | // |
| | | // pnlRecordImage |
| | | // |
| | | pnlRecordImage.Dock = DockStyle.Fill; |
| | | pnlRecordImage.Location = new Point(4, 4); |
| | | pnlRecordImage.Margin = new Padding(5); |
| | | pnlRecordImage.Name = "pnlRecordImage"; |
| | | pnlRecordImage.Size = new Size(768, 603); |
| | | pnlRecordImage.TabIndex = 45; |
| | | // |
| | | // HImageEnhancementToolEdit |
| | | // |
| | | AutoScaleDimensions = new SizeF(9F, 20F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(MainTableLayoutPanel); |
| | | Controls.Add(BtmStatusStrip); |
| | | Controls.Add(TopToolStrip); |
| | | Margin = new Padding(3, 4, 3, 4); |
| | | Name = "HImageEnhancementToolEdit"; |
| | | Size = new Size(1342, 705); |
| | | Load += HImageEnhancementToolEdit_Load; |
| | | TopToolStrip.ResumeLayout(false); |
| | | TopToolStrip.PerformLayout(); |
| | | BtmStatusStrip.ResumeLayout(false); |
| | | BtmStatusStrip.PerformLayout(); |
| | | MainTableLayoutPanel.ResumeLayout(false); |
| | | parasTabControl.ResumeLayout(false); |
| | | tabPage1.ResumeLayout(false); |
| | | tableLayoutPanel1.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)dataGridViewIE).EndInit(); |
| | | tableLayoutPanel4.ResumeLayout(false); |
| | | tableLayoutPanel3.ResumeLayout(false); |
| | | tableLayoutPanel3.PerformLayout(); |
| | | tableLayoutPanel5.ResumeLayout(false); |
| | | tableLayoutPanel5.PerformLayout(); |
| | | tabPage5.ResumeLayout(false); |
| | | tableLayoutPanel2.ResumeLayout(false); |
| | | tableLayoutPanel2.PerformLayout(); |
| | | imgTabControl.ResumeLayout(false); |
| | | tabPageInputImage.ResumeLayout(false); |
| | | tabPageRecordImage.ResumeLayout(false); |
| | | ResumeLayout(false); |
| | | PerformLayout(); |
| | | } |
| | | |
| | | #endregion |
| | | private System.Windows.Forms.Panel pnlInputImage; |
| | | private ToolStrip TopToolStrip; |
| | | private ToolStripButton btnRun; |
| | | private StatusStrip BtmStatusStrip; |
| | | private ToolStripStatusLabel lblResult; |
| | | private ToolStripStatusLabel lblMsg; |
| | | private TableLayoutPanel MainTableLayoutPanel; |
| | | private ToolStripButton btnLoadImage; |
| | | private TabControl parasTabControl; |
| | | private TabPage tabPage1; |
| | | private TabPage tabPage5; |
| | | private TabControl imgTabControl; |
| | | private TabPage tabPageInputImage; |
| | | private TabPage tabPageRecordImage; |
| | | private ToolStripButton btnSaveParas; |
| | | private ToolStripButton btnLoadParas; |
| | | private Panel pnlRecordImage; |
| | | private ToolStripStatusLabel lblRunTime; |
| | | private TableLayoutPanel tableLayoutPanel2; |
| | | public ComboBox cmbTypeRoi; |
| | | private Label label21; |
| | | private Label label22; |
| | | private ComboBox cmbFixture; |
| | | private CheckBox ckbDrawRoi; |
| | | private TableLayoutPanel tableLayoutPanel1; |
| | | private TableLayoutPanel tableLayoutPanel3; |
| | | private Label labelImageEnhancement; |
| | | private ComboBox cmbImageEnhancement; |
| | | private DataGridView dataGridViewIE; |
| | | private TableLayoutPanel tableLayoutPanel4; |
| | | private Button btnAdd; |
| | | private TableLayoutPanel tableLayoutPanel5; |
| | | private Label labelMaskWidth; |
| | | private Label labelMaskHeight; |
| | | private TextBox txtMaskWidth; |
| | | private TextBox txtMaskHeight; |
| | | private Label labelFactor; |
| | | private TextBox txtFactor; |
| | | private Button btnDel; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HalconDotNet; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionControl; |
| | | using LB_VisionProcesses.Alogrithms.Halcon; |
| | | using Microsoft.VisualBasic.ApplicationServices; |
| | | using OpenCvSharp; |
| | | using Sunny.UI.Win32; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using static System.Windows.Forms.VisualStyles.VisualStyleElement; |
| | | |
| | | namespace LB_VisionProcesses.Alogrithms.Halcon |
| | | { |
| | | public partial class HImageEnhancementToolEdit : TAlgorithmEdit |
| | | { |
| | | List<RecordImageEnhancementData> recordImageEnhancementDatas = new List<RecordImageEnhancementData>(); |
| | | private int rowriginalHeight; |
| | | public HImageEnhancementToolEdit(HImageEnhancementTool subject = null) |
| | | { |
| | | if (subject != null && subject is HImageEnhancementTool) |
| | | Subject = subject; |
| | | else |
| | | Subject = new HImageEnhancementTool(); |
| | | |
| | | //if (!(Subject.Params.ROI is HSegment)) |
| | | // Subject.Params.ROI = new HSegment(0, 0, 250, 250); |
| | | |
| | | this.Dock = DockStyle.Fill; |
| | | InitializeComponent(); |
| | | // ä¿ååå§è¡é«åº¦ |
| | | rowriginalHeight = (int)tableLayoutPanel4.RowStyles[1].Height; |
| | | |
| | | InitializeComboBox(); |
| | | InitializeDataGridView(); |
| | | |
| | | recordImageEnhancementDatas = ImageEnhancementManager.Instance.GetAllUsers(); |
| | | this.dataGridViewIE.DataSource = recordImageEnhancementDatas; |
| | | this.dataGridViewIE.AutoGenerateColumns = true; |
| | | } |
| | | |
| | | private void InitializeComboBox() |
| | | { |
| | | // æ·»å æéé项 |
| | | foreach (var item in Enum.GetValues(typeof(ImageEnhancementDataType))) |
| | | { |
| | | cmbImageEnhancement.Items.Add(item.ToString()); |
| | | } |
| | | |
| | | // 设置é»è®¤éæ©é¡¹ |
| | | cmbImageEnhancement.SelectedIndex = 2; |
| | | } |
| | | #region ç®æ³éæ©ä¸ææ¡ |
| | | private void cmbImageEnhancement_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | System.Windows.Forms.ComboBox cb = sender as System.Windows.Forms.ComboBox; |
| | | |
| | | if (cb.SelectedIndex == 0) |
| | | { |
| | | ShowRow(); |
| | | } |
| | | else if (cb.SelectedIndex == 1) |
| | | { |
| | | HideRow(); |
| | | } |
| | | else |
| | | { |
| | | HideRow(); |
| | | } |
| | | } |
| | | private void ShowRow() |
| | | { |
| | | // æ¾ç¤ºRow2ï¼æ¢å¤é«åº¦ï¼ |
| | | tableLayoutPanel4.RowStyles[1].SizeType = SizeType.Absolute; |
| | | tableLayoutPanel4.RowStyles[1].Height = rowriginalHeight; |
| | | |
| | | // æ¾ç¤ºRow2ä¸çæ§ä»¶ |
| | | foreach (Control ctrl in tableLayoutPanel4.Controls) |
| | | { |
| | | int row = tableLayoutPanel4.GetRow(ctrl); |
| | | if (row == 1) |
| | | ctrl.Visible = true; |
| | | } |
| | | } |
| | | |
| | | private void HideRow() |
| | | { |
| | | // æ¾ç¤ºRow2ï¼æ¢å¤é«åº¦ï¼ |
| | | tableLayoutPanel4.RowStyles[1].SizeType = SizeType.Absolute; |
| | | tableLayoutPanel4.RowStyles[1].Height = 0; |
| | | |
| | | // æ¾ç¤ºRow2ä¸çæ§ä»¶ |
| | | foreach (Control ctrl in tableLayoutPanel4.Controls) |
| | | { |
| | | int row = tableLayoutPanel4.GetRow(ctrl); |
| | | if (row == 1) |
| | | ctrl.Visible = false; |
| | | } |
| | | } |
| | | #endregion |
| | | private void InitializeDataGridView() |
| | | { |
| | | this.dataGridViewIE.DataSource = recordImageEnhancementDatas; |
| | | |
| | | // 设置DataGridViewå宽 |
| | | dataGridViewIE.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ§ä»¶å è½½äºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void HImageEnhancementToolEdit_Load(object sender, EventArgs e) |
| | | { |
| | | pnlInputImage.Controls.Add(inputImageHSmartWindowControl); |
| | | inputImageHSmartWindowControl.Dock = DockStyle.Fill; |
| | | |
| | | pnlRecordImage.Controls.Add(recordImageHSmartWindowControl); |
| | | recordImageHSmartWindowControl.Dock = DockStyle.Fill; |
| | | |
| | | //éåå¯ä»¥éæ©çRoiç±»åæä¸¾ |
| | | foreach (var value in Enum.GetValues(typeof(RoiType))) |
| | | cmbTypeRoi.Items.Add(value.ToString()); |
| | | |
| | | //éåå¯ä»¥éæ©çå¾åå¢å¼ºç±»åæä¸¾ |
| | | //foreach (var value in Enum.GetValues(typeof(ImageEnhancementType))) |
| | | // cmbImageEnhancement.Items.Add(value.ToString()); |
| | | |
| | | //éåå¯ä»¥éæ©çFixtureæä¸¾ |
| | | cmbFixture.Items.Add(""); |
| | | foreach (string value in IProcess.dicFixtures.Keys) |
| | | cmbFixture.Items.Add(value.ToString()); |
| | | |
| | | ckbDrawRoi.Checked = true; |
| | | cmbTypeRoi.Text = RoiType.Segment.ToString(); |
| | | cmbImageEnhancement.Text = ImageEnhancementType.ScaleMax.ToString(); |
| | | LoadParas(); |
| | | |
| | | if (Subject.Result) |
| | | { |
| | | lblResult.BackColor = Color.Green; |
| | | lblResult.Text = "True"; |
| | | } |
| | | else |
| | | { |
| | | lblResult.BackColor = Color.Red; |
| | | lblResult.Text = "False"; |
| | | } |
| | | |
| | | lblMsg.Text = Msg.Length > 50 ? Msg.Substring(0, 50) : Msg; |
| | | lblMsgToolTip.SetToolTip(BtmStatusStrip, Msg); |
| | | lblRunTime.Text = $"{Subject.RunTime}ms"; |
| | | } |
| | | private void ClearInputFields() |
| | | { |
| | | txtMaskWidth.Clear(); |
| | | txtMaskHeight.Clear(); |
| | | txtFactor.Clear(); |
| | | cmbImageEnhancement.SelectedIndex = 0; |
| | | } |
| | | private void btnAdd_Click(object sender, EventArgs e) |
| | | { |
| | | // éªè¯è¾å
¥ |
| | | if (cmbImageEnhancement.SelectedIndex == 0) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(txtMaskWidth.Text) || string.IsNullOrWhiteSpace(txtMaskHeight.Text) || string.IsNullOrWhiteSpace(txtFactor.Text)) |
| | | { |
| | | MessageBox.Show("è¯·å¡«åææå¿
å¡«åæ®µï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | RecordImageEnhancementData filter = new RecordImageEnhancementData(); |
| | | filter.MaskWidth = this.txtMaskWidth.Text; |
| | | filter.MaskHight = this.txtMaskHeight.Text; |
| | | filter.Factor = this.txtFactor.Text; |
| | | filter.FilterName = (ImageEnhancementDataType)this.cmbImageEnhancement.SelectedIndex; |
| | | // æ·»å å° UserManager |
| | | bool success = ImageEnhancementManager.Instance.AddUser(filter); |
| | | if (success) |
| | | { |
| | | recordImageEnhancementDatas.Add(filter); |
| | | //MessageBox.Show("ç¨æ·æ·»å æåï¼", "æç¤º", |
| | | // MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | |
| | | // æ¸
空è¾å
¥æ¡ |
| | | ClearInputFields(); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æ·»å ç¨æ·å¤±è´¥ï¼", "é误", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | recordImageEnhancementDatas = ImageEnhancementManager.Instance.GetAllUsers(); |
| | | this.dataGridViewIE.DataSource = recordImageEnhancementDatas; |
| | | this.dataGridViewIE.AutoGenerateColumns = true; |
| | | } |
| | | |
| | | private void btnDel_Click(object sender, EventArgs e) |
| | | { |
| | | // æ£æ¥æ¯å¦æéä¸ç滤波类å |
| | | if (cmbImageEnhancement.SelectedIndex < 0) |
| | | { |
| | | MessageBox.Show("è¯·éæ©è¦å é¤ç滤波类åï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | | DataGridViewRow selectedRow = dataGridViewIE.SelectedRows[0]; |
| | | string filterToDel = selectedRow.Cells[0].Value?.ToString(); |
| | | |
| | | ImageEnhancementDataType filterToDelete = (ImageEnhancementDataType)cmbImageEnhancement.SelectedIndex; |
| | | |
| | | // æ¥æ¾å¯¹åºçè®°å½ |
| | | RecordImageEnhancementData filterToRemove = null; |
| | | |
| | | // 仿¬å°åè¡¨ä¸æ¥æ¾ |
| | | foreach (var filter in recordImageEnhancementDatas) |
| | | { |
| | | if (filter.FilterName.ToString() == filterToDel) |
| | | { |
| | | filterToRemove = filter; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (filterToRemove == null) |
| | | { |
| | | MessageBox.Show("æªæ¾å°å¯¹åºçè®°å½ï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Warning); |
| | | return; |
| | | } |
| | | |
| | | // 确认å é¤ |
| | | DialogResult result = MessageBox.Show( |
| | | $"ç¡®å®è¦å é¤ '{filterToDel}' è®°å½åï¼", |
| | | "确认å é¤", |
| | | MessageBoxButtons.YesNo, |
| | | MessageBoxIcon.Question, |
| | | MessageBoxDefaultButton.Button2); // é»è®¤éæ©"å¦" |
| | | |
| | | if (result == DialogResult.No) |
| | | return; |
| | | |
| | | // ä»ç®¡çå¨ä¸å é¤ |
| | | bool success = ImageEnhancementManager.Instance.DeleteUser(filterToRemove); |
| | | |
| | | if (success) |
| | | { |
| | | // 仿¬å°å表ä¸å é¤ |
| | | recordImageEnhancementDatas.Remove(filterToRemove); |
| | | |
| | | MessageBox.Show("å 餿åï¼", "æç¤º", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("å é¤å¤±è´¥ï¼", "é误", |
| | | MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | recordImageEnhancementDatas = ImageEnhancementManager.Instance.GetAllUsers(); |
| | | this.dataGridViewIE.DataSource = recordImageEnhancementDatas; |
| | | this.dataGridViewIE.AutoGenerateColumns = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show("è¯·éæ©è¦å é¤çç®å"); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ´æ°è¿è¡åæ° |
| | | /// </summary> |
| | | public override void UpdataInputs() |
| | | { |
| | | //设置è¿è¡åæ° |
| | | double dResult = 0; |
| | | int iResult = 0; |
| | | |
| | | if (cmbFixture.Text == "") |
| | | Subject.Params.Fixture = new Fixture(); |
| | | else if (IProcess.dicFixtures.ContainsKey(cmbFixture.Text)) |
| | | Subject.Params.Fixture = IProcess.dicFixtures[cmbFixture.Text]; |
| | | |
| | | Type type = inputImageHSmartWindowControl.oRoi?.GetType(); |
| | | switch (type) |
| | | { |
| | | case Type t when t == typeof(HRectangle2): |
| | | HRectangle2 hRectangle2 = (HRectangle2)inputImageHSmartWindowControl.oRoi; |
| | | Subject.Params.ROI |
| | | = new HRectangle2(hRectangle2.X - Subject.Params.Fixture.X, hRectangle2.Y - Subject.Params.Fixture.Y |
| | | , hRectangle2.Phi - Subject.Params.Fixture.Phi, hRectangle2.Width, hRectangle2.Height); |
| | | break; |
| | | case Type t when t == typeof(HCircle): |
| | | HCircle hCircle = (HCircle)inputImageHSmartWindowControl.oRoi; |
| | | Subject.Params.ROI |
| | | = new HCircle(hCircle.X - Subject.Params.Fixture.X, hCircle.Y - Subject.Params.Fixture.Y, hCircle.Radius); |
| | | break; |
| | | case Type t when t == typeof(HSegment): |
| | | HSegment hSegment = (HSegment)inputImageHSmartWindowControl.oRoi; |
| | | Subject.Params.ROI |
| | | = new HSegment(hSegment.StartX - Subject.Params.Fixture.X, hSegment.StartY - Subject.Params.Fixture.Y |
| | | , hSegment.EndX - Subject.Params.Fixture.X, hSegment.EndY - Subject.Params.Fixture.Y); |
| | | break; |
| | | default: |
| | | Subject.Params.ROI = new ROI(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½è¿è¡åæ° |
| | | /// </summary> |
| | | public override void LoadParas() |
| | | { |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | |
| | | if (Subject.InputImage != null && Subject.InputImage is HObject) |
| | | inputImageHSmartWindowControl.ShowHoImage((HObject)Subject.InputImage); |
| | | |
| | | Type type = Subject.Params.ROI?.GetType(); |
| | | if (Subject.Params.ROI != null) |
| | | { |
| | | switch (type) |
| | | { |
| | | case Type t when t == typeof(HRectangle2): |
| | | cmbTypeRoi.Text = RoiType.Rectangle2.ToString(); |
| | | break; |
| | | case Type t when t == typeof(HCircle): |
| | | cmbTypeRoi.Text = RoiType.Circle.ToString(); |
| | | break; |
| | | case Type t when t == typeof(HSegment): |
| | | cmbTypeRoi.Text = RoiType.Segment.ToString(); |
| | | break; |
| | | default: |
| | | cmbTypeRoi.Text = RoiType.None.ToString(); |
| | | break; |
| | | } |
| | | if (cmbTypeRoi.Text.ToString() != "None") |
| | | ckbDrawRoi.Checked = true; |
| | | else |
| | | ckbDrawRoi.Checked = false; |
| | | |
| | | inputImageHSmartWindowControl.oRoi = Subject.Params.ROI; |
| | | } |
| | | |
| | | if (Subject.Params.Fixture != null) |
| | | cmbFixture.Text = Subject.Params.Fixture.strName; |
| | | else |
| | | cmbFixture.Text = ""; |
| | | |
| | | switch (type) |
| | | { |
| | | case Type t when t == typeof(HRectangle2): |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HRectangle2(Subject.Params.ROI.X + Subject.Params.Fixture.X, Subject.Params.ROI.Y + Subject.Params.Fixture.Y |
| | | , Subject.Params.ROI.Phi + Subject.Params.Fixture.Phi, ((HRectangle2)Subject.Params.ROI).Width, ((HRectangle2)Subject.Params.ROI).Height); |
| | | break; |
| | | case Type t when t == typeof(HCircle): |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HCircle(Subject.Params.ROI.X + Subject.Params.Fixture.X, Subject.Params.ROI.Y + Subject.Params.Fixture.Y |
| | | , ((HCircle)Subject.Params.ROI).Radius); |
| | | break; |
| | | case Type t when t == typeof(HSegment): |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HSegment(((HSegment)Subject.Params.ROI).StartX + Subject.Params.Fixture.X, ((HSegment)Subject.Params.ROI).StartY + Subject.Params.Fixture.Y |
| | | , ((HSegment)Subject.Params.ROI).EndX + Subject.Params.Fixture.X, ((HSegment)Subject.Params.ROI).EndY + Subject.Params.Fixture.Y); |
| | | break; |
| | | default: |
| | | inputImageHSmartWindowControl.oRoi = null; |
| | | break; |
| | | } |
| | | })); |
| | | } |
| | | |
| | | #region å·¥å
·æ æé®äºä»¶ |
| | | /// <summary> |
| | | /// ç¹å»è¿è¡ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void btnRun_Click(object sender, EventArgs e) |
| | | { |
| | | if (Subject.InputImage != null) |
| | | InputImage = Subject.InputImage; |
| | | |
| | | DateTime StartTime = DateTime.Now; |
| | | Run(); |
| | | |
| | | //æ´æ°æ¥å¿ä¸ç»æ |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | if (Subject.Result) |
| | | { |
| | | lblResult.BackColor = Color.Green; |
| | | lblResult.Text = "True"; |
| | | recordImageHSmartWindowControl.SetColor("green"); |
| | | } |
| | | else |
| | | { |
| | | lblResult.BackColor = Color.Red; |
| | | lblResult.Text = "False"; |
| | | recordImageHSmartWindowControl.SetColor("red"); |
| | | } |
| | | |
| | | lblMsg.Text = Msg.Length > 50 ? Msg.Substring(0, 50) : Msg; |
| | | lblMsgToolTip.SetToolTip(BtmStatusStrip, Msg); |
| | | lblRunTime.Text = $"{(DateTime.Now - StartTime).TotalMilliseconds}ms"; |
| | | |
| | | UpdataOutputs(); |
| | | imgTabControl.SelectedTab = tabPageRecordImage; |
| | | |
| | | if (Subject.InputImage != null && Subject.InputImage is HObject) |
| | | { |
| | | HOperatorSet.GetImageSize((HObject)Subject.InputImage, out HTuple ho_ImageWidth, out HTuple ho_ImageHeight); |
| | | recordImageHSmartWindowControl.ShowHoImage((HObject)Subject.InputImage); |
| | | } |
| | | |
| | | //å
夿åç±»å夿ç¶ç±» |
| | | if (Subject.Record != null && Subject.Record is MsgRecord msgRecord) |
| | | { |
| | | recordImageHSmartWindowControl.DispObj(msgRecord.RecordObject_OK, true); |
| | | recordImageHSmartWindowControl.DispObj(msgRecord.RecordObject_NG, false); |
| | | |
| | | for (int i = 0; i < msgRecord.Msg.Length; i++) |
| | | recordImageHSmartWindowControl.ShowMsg(msgRecord.Msg[i] |
| | | , 1 == msgRecord.Result[i] ? true : false, msgRecord.Column[i], msgRecord.Row[i]); |
| | | } |
| | | else if (Subject.Record != null && Subject.Record is ObjectRecord objRecord) |
| | | { |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_OK, true); |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_NG, false); |
| | | } |
| | | |
| | | GC.Collect(); |
| | | })); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å·¥å
·æ â导å¾â |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void btnLoadImage_Click(object sender, EventArgs e) |
| | | { |
| | | OpenFileDialog openFileDialog = new OpenFileDialog(); |
| | | |
| | | // 设置æä»¶å¯¹è¯æ¡ç屿§ |
| | | openFileDialog.Multiselect = false; // ä¸å
许å¤é |
| | | // 设置æä»¶è¿æ»¤å¨ï¼æ¯æå¤ç§æä»¶ç±»å |
| | | openFileDialog.Filter = "Image Files (*.png;*.jpg;*.jpeg;*.bmp)|*.png;*.jpg;*.jpeg;*.bmp|All Files (*.*)|*.*"; |
| | | // æ¾ç¤ºæä»¶å¯¹è¯æ¡ |
| | | DialogResult result = openFileDialog.ShowDialog(); |
| | | |
| | | // å¤çå¯¹è¯æ¡è¿åç»æ |
| | | if (result == DialogResult.OK) |
| | | { |
| | | // è·åç¨æ·éæ©çæä»¶å |
| | | string[] selectedFiles = openFileDialog.FileNames; |
| | | if (selectedFiles.Length > 0) |
| | | { |
| | | HOperatorSet.ReadImage(out HObject ho_Image, selectedFiles[0]); |
| | | //夿æ¯å¦ä¸ºç°åº¦å¾ |
| | | using (HDevDisposeHelper dh = new HDevDisposeHelper()) |
| | | { |
| | | HOperatorSet.CountChannels(ho_Image, out HTuple hv_Channels); |
| | | if (hv_Channels.TupleInt() != 1) |
| | | { |
| | | HOperatorSet.Rgb1ToGray(ho_Image, out ho_Image); |
| | | //æ´æ°æ¥å¿ä¸ç»æ |
| | | this.BeginInvoke(new Action(() => |
| | | { |
| | | lblMsg.Text = "导å
¥å¾çéç°åº¦å¾,èªå¨è½¬æ¢ä¸ºç°åº¦å¾"; |
| | | })); |
| | | } |
| | | InputImage = ho_Image; |
| | | imgTabControl.SelectedTab = tabPageInputImage; |
| | | inputImageHSmartWindowControl.oRoi = inputImageHSmartWindowControl.oRoi; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å·¥å
·æ âä¿åâ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void btnSaveParas_Click(object sender, EventArgs e) { base.btnSaveParas_Click(sender, e); } |
| | | #endregion |
| | | #region ROIåè½ |
| | | /// <summary> |
| | | /// æ¯å¦å¯ç¨ROI |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void ckbDrawRoi_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | if (ckbDrawRoi.Checked) |
| | | { |
| | | inputImageHSmartWindowControl.bAollowDraw = true; |
| | | imgTabControl.SelectedTab = tabPageInputImage; |
| | | } |
| | | else |
| | | { |
| | | inputImageHSmartWindowControl.bAollowDraw = false; |
| | | Subject.Params.ROI = new ROI(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// ROIä¸ææ¡æ¹åäºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | public override void cmbTypeRoi_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (Enum.TryParse(cmbTypeRoi.Text.ToString(), out RoiType type)) |
| | | { |
| | | HTuple hv_imageWidth = 0; |
| | | HTuple hv_imageHeight = 0; |
| | | if (InputImage != null && InputImage is HObject) |
| | | HOperatorSet.GetImageSize((HObject)InputImage, out hv_imageWidth, out hv_imageHeight); |
| | | switch (type) |
| | | { |
| | | case RoiType.Rectangle2: |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HRectangle2(hv_imageWidth.TupleReal() / 2, hv_imageHeight.TupleReal() / 2, 0 |
| | | , hv_imageWidth.TupleReal() / 4, hv_imageHeight.TupleReal() / 4); |
| | | break; |
| | | case RoiType.Circle: |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HCircle(hv_imageWidth.TupleReal() / 2, hv_imageHeight.TupleReal() / 2, hv_imageWidth.TupleReal() / 4); |
| | | break; |
| | | case RoiType.Segment: |
| | | inputImageHSmartWindowControl.oRoi |
| | | = new HSegment(0, 0, hv_imageWidth.TupleReal() / 4, hv_imageHeight.TupleReal() / 4); |
| | | break; |
| | | case RoiType.None: |
| | | default: |
| | | inputImageHSmartWindowControl.oRoi = null; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | public override void cmbFixture_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (IProcess.dicFixtures.ContainsKey(cmbFixture.Text)) |
| | | Subject.Params.Fixture = IProcess.dicFixtures[cmbFixture.Text]; |
| | | else |
| | | Subject.Params.Fixture = new Fixture(); |
| | | } |
| | | catch { } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="lblMsgToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <metadata name="TopToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>183, 17</value> |
| | | </metadata> |
| | | <metadata name="BtmStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>340, 17</value> |
| | | </metadata> |
| | | </root> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace LB_VisionProcesses.Alogrithms.VisualLargeModel |
| | | { |
| | | [Process("è§è§å岿¨¡å", Category = "深度å¦ä¹ å·¥å
·", Description = "å建è§è§å岿¨¡åå·¥å
·")] |
| | | public class VisualSegmentationModel : TAlgorithm |
| | | { |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace LB_VisionProcesses.BarcodeReaders |
| | | { |
| | | /// <summary> |
| | | /// 读ç 卿½è±¡åºç±» |
| | | /// </summary> |
| | | public abstract class BarcodeReaderBase : IBarcodeReader |
| | | { |
| | | public virtual event EventHandler<BarcodeEventArgs> BarcodeRead; |
| | | |
| | | public virtual string SN { get; protected set; } = string.Empty; |
| | | |
| | | public virtual bool IsConnected { get; protected set; } = false; |
| | | |
| | | public virtual bool IsGrabbing { get; protected set; } = false; |
| | | |
| | | public abstract BarcodeReaderBrand Brand { get; } |
| | | |
| | | protected BarcodeReaderBase() { } |
| | | |
| | | /// <summary> |
| | | /// 触åè¯»ç æåäºä»¶ |
| | | /// </summary> |
| | | protected virtual void OnBarcodeRead(BarcodeEventArgs e) |
| | | { |
| | | BarcodeRead?.Invoke(this, e); |
| | | } |
| | | |
| | | public abstract List<string> GetDeviceList(); |
| | | |
| | | public abstract bool Open(string sn); |
| | | |
| | | public abstract bool Close(); |
| | | |
| | | public abstract bool StartGrabbing(); |
| | | |
| | | public abstract bool StopGrabbing(); |
| | | |
| | | public abstract bool SoftTrigger(); |
| | | |
| | | public abstract bool SetTriggerMode(bool isSoftware); |
| | | |
| | | public virtual void Dispose() |
| | | { |
| | | try |
| | | { |
| | | if (IsConnected) |
| | | { |
| | | Close(); |
| | | } |
| | | } |
| | | catch { } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using LB_VisionProcesses.BarcodeReaders.Huayray; |
| | | |
| | | namespace LB_VisionProcesses.BarcodeReaders |
| | | { |
| | | /// <summary> |
| | | /// 读ç å¨å·¥åç±» |
| | | /// </summary> |
| | | public static class BarcodeReaderFactory |
| | | { |
| | | /// <summary> |
| | | /// æ ¹æ®åçå建读ç å¨å®ä¾ |
| | | /// </summary> |
| | | /// <param name="brand">读ç å¨åç</param> |
| | | /// <returns>读ç å¨å®ä¾</returns> |
| | | public static IBarcodeReader CreateReader(BarcodeReaderBrand brand) |
| | | { |
| | | switch (brand) |
| | | { |
| | | case BarcodeReaderBrand.Huayray: |
| | | return new HRBarcodeReader(); |
| | | default: |
| | | throw new NotSupportedException($"䏿¯æç读ç å¨åç: {brand}"); |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace LB_VisionProcesses.BarcodeReaders |
| | | { |
| | | partial class BarcodeReaderForm |
| | | { |
| | | private System.ComponentModel.IContainer components = null; |
| | | |
| | | protected override void Dispose(bool disposing) |
| | | { |
| | | if (disposing && (components != null)) |
| | | { |
| | | components.Dispose(); |
| | | } |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | private void InitializeComponent() |
| | | { |
| | | this.themeForm = new ReaLTaiizor.Forms.ThemeForm(); |
| | | this.pnlMain = new ReaLTaiizor.Controls.Panel(); |
| | | this.controlBox1 = new ReaLTaiizor.Controls.ControlBox(); |
| | | this.grpControl = new System.Windows.Forms.GroupBox(); |
| | | this.btnRefresh = new System.Windows.Forms.Button(); |
| | | this.btnSoftTrigger = new System.Windows.Forms.Button(); |
| | | this.btnStop = new System.Windows.Forms.Button(); |
| | | this.btnStart = new System.Windows.Forms.Button(); |
| | | this.btnClose = new System.Windows.Forms.Button(); |
| | | this.btnOpen = new System.Windows.Forms.Button(); |
| | | this.cmbSN = new System.Windows.Forms.ComboBox(); |
| | | this.lblSN = new System.Windows.Forms.Label(); |
| | | this.cmbBrand = new System.Windows.Forms.ComboBox(); |
| | | this.lblBrand = new System.Windows.Forms.Label(); |
| | | this.grpParams = new System.Windows.Forms.GroupBox(); |
| | | this.txtTimeout = new System.Windows.Forms.TextBox(); |
| | | this.lblTimeout = new System.Windows.Forms.Label(); |
| | | this.radHardTrigger = new System.Windows.Forms.RadioButton(); |
| | | this.radSoftTrigger = new System.Windows.Forms.RadioButton(); |
| | | this.grpResult = new System.Windows.Forms.GroupBox(); |
| | | this.lstBarcodes = new System.Windows.Forms.ListBox(); |
| | | this.pnlImage = new System.Windows.Forms.Panel(); |
| | | this.picPreview = new System.Windows.Forms.PictureBox(); |
| | | this.statusStrip = new System.Windows.Forms.StatusStrip(); |
| | | this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel(); |
| | | |
| | | this.themeForm.SuspendLayout(); |
| | | this.pnlMain.SuspendLayout(); |
| | | this.grpControl.SuspendLayout(); |
| | | this.grpParams.SuspendLayout(); |
| | | this.grpResult.SuspendLayout(); |
| | | this.pnlImage.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.picPreview)).BeginInit(); |
| | | this.statusStrip.SuspendLayout(); |
| | | this.SuspendLayout(); |
| | | |
| | | // themeForm |
| | | this.themeForm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); |
| | | this.themeForm.Controls.Add(this.controlBox1); |
| | | this.themeForm.Controls.Add(this.pnlMain); |
| | | this.themeForm.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.themeForm.Font = new System.Drawing.Font("Segoe UI", 9F); |
| | | this.themeForm.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(142)))), ((int)(((byte)(142)))), ((int)(((byte)(142))))); |
| | | this.themeForm.Location = new System.Drawing.Point(0, 0); |
| | | this.themeForm.Name = "themeForm"; |
| | | this.themeForm.Padding = new System.Windows.Forms.Padding(10, 70, 10, 9); |
| | | this.themeForm.Size = new System.Drawing.Size(820, 600); |
| | | this.themeForm.Text = "读ç å¨é
ç½®"; |
| | | |
| | | // controlBox1 |
| | | this.controlBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |
| | | this.controlBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); |
| | | this.controlBox1.Location = new System.Drawing.Point(740, 15); |
| | | this.controlBox1.Name = "controlBox1"; |
| | | this.controlBox1.Size = new System.Drawing.Size(77, 19); |
| | | |
| | | // pnlMain |
| | | this.pnlMain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); |
| | | this.pnlMain.Controls.Add(this.pnlImage); |
| | | this.pnlMain.Controls.Add(this.grpResult); |
| | | this.pnlMain.Controls.Add(this.grpParams); |
| | | this.pnlMain.Controls.Add(this.grpControl); |
| | | this.pnlMain.Controls.Add(this.statusStrip); |
| | | this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.pnlMain.Location = new System.Drawing.Point(10, 70); |
| | | this.pnlMain.Name = "pnlMain"; |
| | | this.pnlMain.Size = new System.Drawing.Size(800, 521); |
| | | |
| | | // grpControl |
| | | this.grpControl.Controls.Add(this.btnRefresh); |
| | | this.grpControl.Controls.Add(this.btnSoftTrigger); |
| | | this.grpControl.Controls.Add(this.btnStop); |
| | | this.grpControl.Controls.Add(this.btnStart); |
| | | this.grpControl.Controls.Add(this.btnClose); |
| | | this.grpControl.Controls.Add(this.btnOpen); |
| | | this.grpControl.Controls.Add(this.cmbSN); |
| | | this.grpControl.Controls.Add(this.lblSN); |
| | | this.grpControl.Controls.Add(this.cmbBrand); |
| | | this.grpControl.Controls.Add(this.lblBrand); |
| | | this.grpControl.ForeColor = System.Drawing.Color.White; |
| | | this.grpControl.Location = new System.Drawing.Point(15, 15); |
| | | this.grpControl.Name = "grpControl"; |
| | | this.grpControl.Size = new System.Drawing.Size(260, 240); |
| | | this.grpControl.Text = "è®¾å¤æ§å¶"; |
| | | |
| | | this.lblBrand.Location = new System.Drawing.Point(10, 25); |
| | | this.lblBrand.Text = "åç:"; |
| | | this.cmbBrand.Location = new System.Drawing.Point(70, 22); |
| | | this.cmbBrand.Size = new System.Drawing.Size(170, 25); |
| | | this.cmbBrand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; |
| | | |
| | | this.lblSN.Location = new System.Drawing.Point(10, 60); |
| | | this.lblSN.Text = "åºåå·:"; |
| | | this.cmbSN.Location = new System.Drawing.Point(70, 57); |
| | | this.cmbSN.Size = new System.Drawing.Size(130, 25); |
| | | |
| | | this.btnRefresh.Location = new System.Drawing.Point(205, 56); |
| | | this.btnRefresh.Size = new System.Drawing.Size(35, 25); |
| | | this.btnRefresh.Text = "R"; |
| | | this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); |
| | | |
| | | this.btnOpen.Location = new System.Drawing.Point(13, 100); |
| | | this.btnOpen.Size = new System.Drawing.Size(110, 35); |
| | | this.btnOpen.Text = "æå¼è®¾å¤"; |
| | | this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click); |
| | | |
| | | this.btnClose.Location = new System.Drawing.Point(130, 100); |
| | | this.btnClose.Size = new System.Drawing.Size(110, 35); |
| | | this.btnClose.Text = "å
³é设å¤"; |
| | | this.btnClose.Click += new System.EventHandler(this.btnClose_Click); |
| | | |
| | | this.btnStart.Location = new System.Drawing.Point(13, 145); |
| | | this.btnStart.Size = new System.Drawing.Size(110, 35); |
| | | this.btnStart.Text = "å¼å§éé"; |
| | | this.btnStart.Click += new System.EventHandler(this.btnStart_Click); |
| | | |
| | | this.btnStop.Location = new System.Drawing.Point(130, 145); |
| | | this.btnStop.Size = new System.Drawing.Size(110, 35); |
| | | this.btnStop.Text = "忢éé"; |
| | | this.btnStop.Click += new System.EventHandler(this.btnStop_Click); |
| | | |
| | | this.btnSoftTrigger.Location = new System.Drawing.Point(13, 190); |
| | | this.btnSoftTrigger.Size = new System.Drawing.Size(227, 35); |
| | | this.btnSoftTrigger.Text = "软触å䏿¬¡"; |
| | | this.btnSoftTrigger.Click += new System.EventHandler(this.btnSoftTrigger_Click); |
| | | |
| | | // grpParams |
| | | this.grpParams.Controls.Add(this.txtTimeout); |
| | | this.grpParams.Controls.Add(this.lblTimeout); |
| | | this.grpParams.Controls.Add(this.radHardTrigger); |
| | | this.grpParams.Controls.Add(this.radSoftTrigger); |
| | | this.grpParams.ForeColor = System.Drawing.Color.White; |
| | | this.grpParams.Location = new System.Drawing.Point(15, 260); |
| | | this.grpParams.Name = "grpParams"; |
| | | this.grpParams.Size = new System.Drawing.Size(260, 110); |
| | | this.grpParams.Text = "åæ°è®¾ç½®"; |
| | | |
| | | this.radSoftTrigger.Location = new System.Drawing.Point(15, 25); |
| | | this.radSoftTrigger.Text = "软触å"; |
| | | this.radSoftTrigger.Checked = true; |
| | | this.radSoftTrigger.CheckedChanged += new System.EventHandler(this.radTrigger_CheckedChanged); |
| | | |
| | | this.radHardTrigger.Location = new System.Drawing.Point(130, 25); |
| | | this.radHardTrigger.Text = "èªå¨/硬触å"; |
| | | |
| | | this.lblTimeout.Location = new System.Drawing.Point(15, 65); |
| | | this.lblTimeout.Text = "è¶
æ¶(ms):"; |
| | | this.txtTimeout.Location = new System.Drawing.Point(100, 62); |
| | | this.txtTimeout.Size = new System.Drawing.Size(140, 25); |
| | | this.txtTimeout.Text = "2000"; |
| | | |
| | | // grpResult |
| | | this.grpResult.Controls.Add(this.lstBarcodes); |
| | | this.grpResult.ForeColor = System.Drawing.Color.White; |
| | | this.grpResult.Location = new System.Drawing.Point(15, 380); |
| | | this.grpResult.Name = "grpResult"; |
| | | this.grpResult.Size = new System.Drawing.Size(260, 115); |
| | | this.grpResult.Text = "读åç»æ"; |
| | | |
| | | this.lstBarcodes.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(51)))), ((int)(((byte)(60))))); |
| | | this.lstBarcodes.ForeColor = System.Drawing.Color.White; |
| | | this.lstBarcodes.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.lstBarcodes.Location = new System.Drawing.Point(3, 19); |
| | | this.lstBarcodes.Name = "lstBarcodes"; |
| | | this.lstBarcodes.Size = new System.Drawing.Size(254, 93); |
| | | |
| | | // pnlImage |
| | | this.pnlImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; |
| | | this.pnlImage.Controls.Add(this.picPreview); |
| | | this.pnlImage.Location = new System.Drawing.Point(285, 23); |
| | | this.pnlImage.Name = "pnlImage"; |
| | | this.pnlImage.Size = new System.Drawing.Size(500, 472); |
| | | |
| | | this.picPreview.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.picPreview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; |
| | | |
| | | // statusStrip |
| | | this.statusStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); |
| | | this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.lblStatus }); |
| | | this.statusStrip.Location = new System.Drawing.Point(0, 499); |
| | | this.statusStrip.Size = new System.Drawing.Size(800, 22); |
| | | |
| | | this.lblStatus.ForeColor = System.Drawing.Color.White; |
| | | this.lblStatus.Text = "åå¤å°±ç»ª"; |
| | | |
| | | // BarcodeReaderForm |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.ClientSize = new System.Drawing.Size(820, 600); |
| | | this.Controls.Add(this.themeForm); |
| | | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; |
| | | this.Name = "BarcodeReaderForm"; |
| | | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
| | | this.Text = "读ç å¨é
ç½®"; |
| | | this.Load += new System.EventHandler(this.BarcodeReaderForm_Load); |
| | | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BarcodeReaderForm_FormClosing); |
| | | |
| | | this.themeForm.ResumeLayout(false); |
| | | this.pnlMain.ResumeLayout(false); |
| | | this.pnlMain.PerformLayout(); |
| | | this.grpControl.ResumeLayout(false); |
| | | this.grpParams.ResumeLayout(false); |
| | | this.grpParams.PerformLayout(); |
| | | this.grpResult.ResumeLayout(false); |
| | | this.pnlImage.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)(this.picPreview)).EndInit(); |
| | | this.statusStrip.ResumeLayout(false); |
| | | this.statusStrip.PerformLayout(); |
| | | this.ResumeLayout(false); |
| | | } |
| | | |
| | | private ReaLTaiizor.Forms.ThemeForm themeForm; |
| | | private ReaLTaiizor.Controls.Panel pnlMain; |
| | | private ReaLTaiizor.Controls.ControlBox controlBox1; |
| | | private System.Windows.Forms.GroupBox grpControl; |
| | | private System.Windows.Forms.Label lblBrand; |
| | | private System.Windows.Forms.ComboBox cmbBrand; |
| | | private System.Windows.Forms.Label lblSN; |
| | | private System.Windows.Forms.ComboBox cmbSN; |
| | | private System.Windows.Forms.Button btnRefresh; |
| | | private System.Windows.Forms.Button btnOpen; |
| | | private System.Windows.Forms.Button btnClose; |
| | | private System.Windows.Forms.Button btnStart; |
| | | private System.Windows.Forms.Button btnStop; |
| | | private System.Windows.Forms.Button btnSoftTrigger; |
| | | private System.Windows.Forms.GroupBox grpParams; |
| | | private System.Windows.Forms.RadioButton radHardTrigger; |
| | | private System.Windows.Forms.RadioButton radSoftTrigger; |
| | | private System.Windows.Forms.Label lblTimeout; |
| | | private System.Windows.Forms.TextBox txtTimeout; |
| | | private System.Windows.Forms.GroupBox grpResult; |
| | | private System.Windows.Forms.ListBox lstBarcodes; |
| | | private System.Windows.Forms.StatusStrip statusStrip; |
| | | private System.Windows.Forms.ToolStripStatusLabel lblStatus; |
| | | private System.Windows.Forms.Panel pnlImage; |
| | | private System.Windows.Forms.PictureBox picPreview; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Windows.Forms; |
| | | using LB_VisionProcesses.BarcodeReaders; |
| | | |
| | | namespace LB_VisionProcesses.BarcodeReaders |
| | | { |
| | | /// <summary> |
| | | /// 读ç å¨é
ç½®ä¸æµè¯çªä½ |
| | | /// </summary> |
| | | public partial class BarcodeReaderForm : Form |
| | | { |
| | | private IBarcodeReader _reader; |
| | | private string _currentSN; |
| | | private LB_VisionProcesses.Processes.BarcodeReaderProcess _process; |
| | | private string _processPath; |
| | | |
| | | public BarcodeReaderForm() |
| | | { |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | public BarcodeReaderForm(LB_VisionProcesses.Processes.BarcodeReaderProcess process, string processPath) |
| | | { |
| | | InitializeComponent(); |
| | | _process = process; |
| | | _processPath = processPath; |
| | | |
| | | // å è½½æµç¨åæ°å° UI |
| | | if (_process.Params.Inputs.ContainsKey("设å¤åç")) |
| | | cmbBrand.Text = _process.Params.Inputs["设å¤åç"].ToString(); |
| | | if (_process.Params.Inputs.ContainsKey("设å¤SN")) |
| | | cmbSN.Text = _process.Params.Inputs["设å¤SN"].ToString(); |
| | | if (_process.Params.Inputs.ContainsKey("è§¦åæ¨¡å¼")) |
| | | radSoftTrigger.Checked = _process.Params.Inputs["è§¦åæ¨¡å¼"].ToString() == "软触å"; |
| | | if (_process.Params.Inputs.ContainsKey("è¶
æ¶æ¶é´")) |
| | | txtTimeout.Text = _process.Params.Inputs["è¶
æ¶æ¶é´"].ToString(); |
| | | } |
| | | |
| | | private void BarcodeReaderForm_Load(object sender, EventArgs e) |
| | | { |
| | | // åå§ååçå表 |
| | | cmbBrand.Items.Clear(); |
| | | foreach (var brand in Enum.GetValues(typeof(BarcodeReaderBrand))) |
| | | { |
| | | if ((BarcodeReaderBrand)brand != BarcodeReaderBrand.Unsupported) |
| | | { |
| | | cmbBrand.Items.Add(brand); |
| | | } |
| | | } |
| | | |
| | | if (cmbBrand.Items.Count > 0) |
| | | cmbBrand.SelectedIndex = 0; |
| | | |
| | | UpdateUIStatus(); |
| | | } |
| | | |
| | | private void btnRefresh_Click(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (cmbBrand.SelectedItem == null) return; |
| | | |
| | | var brand = (BarcodeReaderBrand)cmbBrand.SelectedItem; |
| | | using (var tempReader = BarcodeReaderFactory.CreateReader(brand)) |
| | | { |
| | | var devices = tempReader.GetDeviceList(); |
| | | cmbSN.Items.Clear(); |
| | | if (devices != null && devices.Count > 0) |
| | | { |
| | | cmbSN.Items.AddRange(devices.ToArray()); |
| | | cmbSN.SelectedIndex = 0; |
| | | } |
| | | } |
| | | lblStatus.Text = $"设å¤åè¡¨å·²å·æ°ï¼æ¾å° {cmbSN.Items.Count} 个设å¤"; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"å·æ°è®¾å¤å表失败: {ex.Message}", "é误", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | } |
| | | |
| | | private void btnOpen_Click(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (cmbSN.SelectedItem == null && string.IsNullOrEmpty(cmbSN.Text)) |
| | | { |
| | | MessageBox.Show("è¯·éæ©æè¾å
¥è®¾å¤åºåå·"); |
| | | return; |
| | | } |
| | | |
| | | _currentSN = cmbSN.Text; |
| | | var brand = (BarcodeReaderBrand)cmbBrand.SelectedItem; |
| | | |
| | | if (_reader != null) |
| | | { |
| | | _reader.BarcodeRead -= Reader_BarcodeRead; |
| | | _reader.Dispose(); |
| | | } |
| | | |
| | | _reader = BarcodeReaderFactory.CreateReader(brand); |
| | | _reader.BarcodeRead += Reader_BarcodeRead; |
| | | |
| | | if (_reader.Open(_currentSN)) |
| | | { |
| | | lblStatus.Text = $"è®¾å¤ {_currentSN} å·²æå¼"; |
| | | UpdateUIStatus(); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("è®¾å¤æå¼å¤±è´¥ï¼è¯·æ£æ¥è¿æ¥æå ç¨ç¶æ"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show($"æå¼è®¾å¤å¼å¸¸: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | private void btnClose_Click(object sender, EventArgs e) |
| | | { |
| | | if (_reader != null) |
| | | { |
| | | _reader.Close(); |
| | | lblStatus.Text = "设å¤å·²å
³é"; |
| | | UpdateUIStatus(); |
| | | } |
| | | } |
| | | |
| | | private void btnStart_Click(object sender, EventArgs e) |
| | | { |
| | | if (_reader != null && _reader.IsConnected) |
| | | { |
| | | // è®¾ç½®è§¦åæ¨¡å¼ï¼æ ¹æ® UI éæ©ï¼ |
| | | _reader.SetTriggerMode(radSoftTrigger.Checked); |
| | | |
| | | if (_reader.StartGrabbing()) |
| | | { |
| | | lblStatus.Text = "ééå·²å¼å§"; |
| | | UpdateUIStatus(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void btnStop_Click(object sender, EventArgs e) |
| | | { |
| | | if (_reader != null && _reader.IsGrabbing) |
| | | { |
| | | if (_reader.StopGrabbing()) |
| | | { |
| | | lblStatus.Text = "éé已忢"; |
| | | UpdateUIStatus(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void btnSoftTrigger_Click(object sender, EventArgs e) |
| | | { |
| | | if (_reader != null && _reader.IsGrabbing) |
| | | { |
| | | _reader.SoftTrigger(); |
| | | lblStatus.Text = "å·²æ§è¡è½¯è§¦å"; |
| | | } |
| | | else |
| | | { |
| | | lblStatus.Text = "请å
å¼å§ééåæ§è¡è§¦å"; |
| | | } |
| | | } |
| | | |
| | | private void radTrigger_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | if (_reader != null && _reader.IsConnected) |
| | | { |
| | | _reader.SetTriggerMode(radSoftTrigger.Checked); |
| | | lblStatus.Text = radSoftTrigger.Checked ? "已忢è³è½¯è§¦å模å¼" : "已忢è³ç¡¬è§¦å/èªå¨æ¨¡å¼"; |
| | | } |
| | | } |
| | | |
| | | private void Reader_BarcodeRead(object sender, BarcodeEventArgs e) |
| | | { |
| | | // 弿¥æ´æ° UI |
| | | if (this.InvokeRequired) |
| | | { |
| | | this.BeginInvoke(new Action<object, BarcodeEventArgs>(Reader_BarcodeRead), sender, e); |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | | // æ´æ°ç»æå表 |
| | | lstBarcodes.Items.Clear(); |
| | | if (e.Barcodes != null && e.Barcodes.Count > 0) |
| | | { |
| | | foreach (var code in e.Barcodes) |
| | | { |
| | | lstBarcodes.Items.Add($"{DateTime.Now:HH:mm:ss} - {code}"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | lstBarcodes.Items.Add($"{DateTime.Now:HH:mm:ss} - æªè¯»å°æ¡ç "); |
| | | } |
| | | |
| | | // æ´æ°é¢è§å¾å |
| | | if (e.Image != null) |
| | | { |
| | | // éæ¾æ§å¾åï¼é²æ¢å
åæ³æ¼ |
| | | var oldImg = picPreview.Image; |
| | | picPreview.Image = new Bitmap(e.Image); // æ·è´ä¸ä»½é²æ¢è¢« SDK å
é¨éæ¾ |
| | | oldImg?.Dispose(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // éé»å¤ç UI æ´æ°å¼å¸¸ |
| | | Console.WriteLine($"UIæ´æ°å¼å¸¸: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | private void UpdateUIStatus() |
| | | { |
| | | bool isConnected = _reader?.IsConnected ?? false; |
| | | bool isGrabbing = _reader?.IsGrabbing ?? false; |
| | | |
| | | btnOpen.Enabled = !isConnected; |
| | | btnClose.Enabled = isConnected; |
| | | cmbBrand.Enabled = !isConnected; |
| | | cmbSN.Enabled = !isConnected; |
| | | btnRefresh.Enabled = !isConnected; |
| | | |
| | | btnStart.Enabled = isConnected && !isGrabbing; |
| | | btnStop.Enabled = isGrabbing; |
| | | btnSoftTrigger.Enabled = isGrabbing && radSoftTrigger.Checked; |
| | | |
| | | grpParams.Enabled = isConnected; |
| | | } |
| | | |
| | | private void BarcodeReaderForm_FormClosing(object sender, FormClosingEventArgs e) |
| | | { |
| | | // å
³éåä¿ååæ°å°æµç¨ |
| | | if (_process != null) |
| | | { |
| | | _process.Params.Inputs["设å¤åç"] = cmbBrand.Text; |
| | | _process.Params.Inputs["设å¤SN"] = cmbSN.Text; |
| | | _process.Params.Inputs["è§¦åæ¨¡å¼"] = radSoftTrigger.Checked ? "软触å" : "硬触å"; |
| | | if (int.TryParse(txtTimeout.Text, out int timeout)) |
| | | _process.Params.Inputs["è¶
æ¶æ¶é´"] = timeout; |
| | | |
| | | _process.Save(_processPath); |
| | | } |
| | | |
| | | if (_reader != null) |
| | | { |
| | | if (_reader.IsGrabbing) _reader.StopGrabbing(); |
| | | _reader.Close(); |
| | | _reader.BarcodeRead -= Reader_BarcodeRead; |
| | | _reader.Dispose(); |
| | | _reader = null; |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | </root> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Runtime.InteropServices; |
| | | using System.Text; |
| | | using EasyIDSDK_Net; |
| | | |
| | | namespace LB_VisionProcesses.BarcodeReaders.Huayray |
| | | { |
| | | /// <summary> |
| | | /// åç¿è¯»ç å¨å®ç°ç±» |
| | | /// </summary> |
| | | public class HRBarcodeReader : BarcodeReaderBase |
| | | { |
| | | private EidCamera _camera; |
| | | private EidCamera.EidFrameCallback _frameCallback; |
| | | private GCHandle _callbackHandle; |
| | | |
| | | public override BarcodeReaderBrand Brand => BarcodeReaderBrand.Huayray; |
| | | |
| | | public HRBarcodeReader() |
| | | { |
| | | _camera = new EidCamera(); |
| | | _frameCallback = OnFrameReceived; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¨çº¿çåç¿è¯»ç å¨å表 |
| | | /// </summary> |
| | | public override List<string> GetDeviceList() |
| | | { |
| | | List<string> snList = new List<string>(); |
| | | try |
| | | { |
| | | EidCamera.EidDeviceList devList = new EidCamera.EidDeviceList(); |
| | | int nRet = EidCamera.eidEnumDevices_Net(ref devList, 0); |
| | | if (nRet == EidCamera.eidErrorOK && devList.num > 0) |
| | | { |
| | | for (int i = 0; i < devList.num; i++) |
| | | { |
| | | EidCamera.EidDeviceInfo deviceInfo = (EidCamera.EidDeviceInfo)Marshal.PtrToStructure( |
| | | devList.infos + Marshal.SizeOf(typeof(EidCamera.EidDeviceInfo)) * i, |
| | | typeof(EidCamera.EidDeviceInfo)); |
| | | snList.Add(deviceInfo.serialNumber); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // TODO: Log error |
| | | } |
| | | return snList; |
| | | } |
| | | |
| | | public override bool Open(string sn) |
| | | { |
| | | if (IsConnected) Close(); |
| | | |
| | | try |
| | | { |
| | | // åå»ºå¥æ |
| | | int nRet = _camera.eidCreateDevice_Net(sn, EidCamera.EidDeviceDataType.eidDeviceDataTypeSN); |
| | | if (nRet != EidCamera.eidErrorOK) return false; |
| | | |
| | | // æå¼è®¾å¤ |
| | | nRet = _camera.eidOpenDevice_Net(); |
| | | if (nRet != EidCamera.eidErrorOK) |
| | | { |
| | | _camera.eidReleaseHandle_Net(); |
| | | return false; |
| | | } |
| | | |
| | | // 注ååè° |
| | | nRet = _camera.eidRegisterFrameCallback_Net(_frameCallback, IntPtr.Zero); |
| | | if (nRet != EidCamera.eidErrorOK) |
| | | { |
| | | _camera.eidCloseDevice_Net(); |
| | | _camera.eidReleaseHandle_Net(); |
| | | return false; |
| | | } |
| | | |
| | | this.SN = sn; |
| | | this.IsConnected = true; |
| | | return true; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public override bool Close() |
| | | { |
| | | if (!IsConnected) return true; |
| | | |
| | | try |
| | | { |
| | | StopGrabbing(); |
| | | _camera.eidCloseDevice_Net(); |
| | | _camera.eidReleaseHandle_Net(); |
| | | this.IsConnected = false; |
| | | this.SN = string.Empty; |
| | | return true; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public override bool StartGrabbing() |
| | | { |
| | | if (!IsConnected) return false; |
| | | if (IsGrabbing) return true; |
| | | |
| | | int nRet = _camera.eidStartGrabbing_Net(0); |
| | | if (nRet == EidCamera.eidErrorOK) |
| | | { |
| | | this.IsGrabbing = true; |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public override bool StopGrabbing() |
| | | { |
| | | if (!IsGrabbing) return true; |
| | | |
| | | int nRet = _camera.eidStopGrabbing_Net(); |
| | | this.IsGrabbing = false; |
| | | return nRet == EidCamera.eidErrorOK; |
| | | } |
| | | |
| | | public override bool SoftTrigger() |
| | | { |
| | | if (!IsConnected || !IsGrabbing) return false; |
| | | int nRet = _camera.eidExecCommandFeature_Net("TriggerSoftware"); |
| | | return nRet == EidCamera.eidErrorOK; |
| | | } |
| | | |
| | | public override bool SetTriggerMode(bool isSoftware) |
| | | { |
| | | if (!IsConnected) return false; |
| | | |
| | | int nRet; |
| | | if (isSoftware) |
| | | { |
| | | // è½¯è§¦åæ¨¡å¼ |
| | | nRet = _camera.eidSetEnumFeatureSymbol_Net("TriggerType", "SingleFrame"); |
| | | if (nRet != EidCamera.eidErrorOK) return false; |
| | | nRet = _camera.eidSetEnumFeatureSymbol_Net("TriggerSource", "Software"); |
| | | } |
| | | else |
| | | { |
| | | // èªç±è¿è¡æç¡¬è§¦å (æ¤å¤é»è®¤è®¾ä¸ºèªç±è¿è¡ï¼å¯æ ¹æ®éè¦æ©å±) |
| | | nRet = _camera.eidSetEnumFeatureSymbol_Net("TriggerType", "FreeRun"); |
| | | } |
| | | return nRet == EidCamera.eidErrorOK; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// SDK帧åè°å¤ç |
| | | /// </summary> |
| | | private void OnFrameReceived(ref EidCamera.EidFrameInfo frameInfo, IntPtr userData) |
| | | { |
| | | try |
| | | { |
| | | List<string> barcodes = new List<string>(); |
| | | // è§£ææ¡ç |
| | | for (int i = 0; i < frameInfo.codeNum; i++) |
| | | { |
| | | EidCamera.EidCodeInfo codeInfo = (EidCamera.EidCodeInfo)Marshal.PtrToStructure( |
| | | frameInfo.codeList + Marshal.SizeOf(typeof(EidCamera.EidCodeInfo)) * i, |
| | | typeof(EidCamera.EidCodeInfo)); |
| | | |
| | | string data = Marshal.PtrToStringAnsi(codeInfo.data); |
| | | if (!string.IsNullOrEmpty(data)) |
| | | { |
| | | barcodes.Add(data); |
| | | } |
| | | } |
| | | |
| | | // 转æ¢å¾å (妿éè¦) |
| | | Bitmap bitmap = null; |
| | | if (frameInfo.imageDataLen > 0 && frameInfo.imageData != IntPtr.Zero) |
| | | { |
| | | // è¿éç®åå¤çï¼å¦ææ¯Jpegåç´æ¥ä»å
åå è½½ï¼å¦ææ¯Rawåéè½¬æ¢ |
| | | // å®é
项ç®ä¸å¯æ ¹æ® frameInfo.format è¿è¡å¤ç |
| | | if (frameInfo.isJpeg) |
| | | { |
| | | byte[] managedArray = new byte[frameInfo.imageDataLen]; |
| | | Marshal.Copy(frameInfo.imageData, managedArray, 0, (int)frameInfo.imageDataLen); |
| | | using (var ms = new System.IO.MemoryStream(managedArray)) |
| | | { |
| | | bitmap = new Bitmap(ms); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 触åäºä»¶ |
| | | OnBarcodeRead(new BarcodeEventArgs(this.SN, barcodes, bitmap)); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // TODO: Log error |
| | | } |
| | | } |
| | | |
| | | public override void Dispose() |
| | | { |
| | | Close(); |
| | | base.Dispose(); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing; |
| | | |
| | | namespace LB_VisionProcesses.BarcodeReaders |
| | | { |
| | | /// <summary> |
| | | /// 读ç å¨åçæä¸¾ |
| | | /// </summary> |
| | | public enum BarcodeReaderBrand |
| | | { |
| | | Huayray, // åç¿ |
| | | Unsupported |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读ç ç»æåæ°ç±» |
| | | /// </summary> |
| | | public class BarcodeEventArgs : EventArgs |
| | | { |
| | | /// <summary> |
| | | /// 设å¤åºåå· |
| | | /// </summary> |
| | | public string SN { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 读ç ç»æå
容 |
| | | /// </summary> |
| | | public List<string> Barcodes { get; set; } = new List<string>(); |
| | | |
| | | /// <summary> |
| | | /// å
³èå¾å (å¯é) |
| | | /// </summary> |
| | | public Bitmap Image { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦è¯»åæå |
| | | /// </summary> |
| | | public bool IsSuccess => Barcodes.Count > 0; |
| | | |
| | | public BarcodeEventArgs(string sn, List<string> barcodes, Bitmap image = null) |
| | | { |
| | | SN = sn; |
| | | Barcodes = barcodes; |
| | | Image = image; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读ç 卿½è±¡æ¥å£ |
| | | /// </summary> |
| | | public interface IBarcodeReader : IDisposable |
| | | { |
| | | /// <summary> |
| | | /// 读ç ç»æåè°äºä»¶ |
| | | /// </summary> |
| | | event EventHandler<BarcodeEventArgs> BarcodeRead; |
| | | |
| | | /// <summary> |
| | | /// è·å设å¤å表æä¸¾ |
| | | /// </summary> |
| | | /// <returns>SNå表</returns> |
| | | List<string> GetDeviceList(); |
| | | |
| | | /// <summary> |
| | | /// åå§åå¹¶æå¼è¯»ç å¨ |
| | | /// </summary> |
| | | /// <param name="sn">åºåå·</param> |
| | | /// <returns>æ¯å¦æå</returns> |
| | | bool Open(string sn); |
| | | |
| | | /// <summary> |
| | | /// å
³é读ç å¨ |
| | | /// </summary> |
| | | /// <returns>æ¯å¦æå</returns> |
| | | bool Close(); |
| | | |
| | | /// <summary> |
| | | /// å¼å§éé/çå¬ |
| | | /// </summary> |
| | | /// <returns>æ¯å¦æå</returns> |
| | | bool StartGrabbing(); |
| | | |
| | | /// <summary> |
| | | /// 忢éé/çå¬ |
| | | /// </summary> |
| | | /// <returns>æ¯å¦æå</returns> |
| | | bool StopGrabbing(); |
| | | |
| | | /// <summary> |
| | | /// æ§è¡è½¯è§¦å䏿¬¡ |
| | | /// </summary> |
| | | /// <returns>æ¯å¦æå</returns> |
| | | bool SoftTrigger(); |
| | | |
| | | /// <summary> |
| | | /// è®¾ç½®è§¦åæ¨¡å¼ |
| | | /// </summary> |
| | | /// <param name="isSoftware">true为软触å, false为硬触åæèªå¨çå¬</param> |
| | | /// <returns>æ¯å¦æå</returns> |
| | | bool SetTriggerMode(bool isSoftware); |
| | | |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å¨çº¿ |
| | | /// </summary> |
| | | bool IsConnected { get; } |
| | | |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦æ£å¨éé |
| | | /// </summary> |
| | | bool IsGrabbing { get; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç |
| | | /// </summary> |
| | | BarcodeReaderBrand Brand { get; } |
| | | } |
| | | } |
| | |
| | | using HalconDotNet; |
| | | using LB_SmartVisionCommon; |
| | | using LB_VisionProcesses.Cameras.LBCameras; |
| | | using MVSDK_Net; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | private Thread _callbackThread; // åè°å¤ççº¿ç¨ |
| | | private List<IMVDefine.IMV_Frame> _frameList; // å¾åç¼åå表 |
| | | private readonly object _frameLock = new object(); // 帧ç¼åé |
| | | // æ°å¢ï¼CollectedImagesæä½éï¼ä¿è¯çº¿ç¨å®å
¨ |
| | | private readonly object _collectedImagesLock = new object(); |
| | | private IMVDefine.IMV_EPixelType type = IMVDefine.IMV_EPixelType.gvspPixelMono8; |
| | | private IMVDefine.IMV_PixelConvertParam stPixelConvertParam = new IMVDefine.IMV_PixelConvertParam(); |
| | | |
| | |
| | | } |
| | | try |
| | | { |
| | | // 1. å°å¸§è½¬æ¢ä¸ºBitmap |
| | | Bitmap bitmap = ConvertFrameToBitmap(frame); |
| | | // éæ¾å¸§æ°æ® |
| | | // release frame |
| | | // éæ¾åå§å¸§æ°æ®ï¼SDKå±é¢éæ¾ï¼ |
| | | _camera.IMV_ReleaseFrame(ref frame); |
| | | Task.Factory.StartNew(() => |
| | | |
| | | // 2. ç©ºå¼æ ¡éªï¼è½¬æ¢å¤±è´¥åç´æ¥è¿å |
| | | if (bitmap == null) |
| | | { |
| | | CallBackImg = (Bitmap)bitmap.Clone(); |
| | | if (CallBackImg == null) |
| | | AsyncLogHelper.Warn(SN + "帧转æ¢ä¸ºBitmap失败ï¼è·³è¿å¤ç"); |
| | | return; |
| | | } |
| | | // 3. 线ç¨å®å
¨å°å°Bitmapæ·»å å°CollectedImagesåå
¸ |
| | | lock (_collectedImagesLock) |
| | | { |
| | | // ç¡®ä¿å½åç¸æºSN对åºçå表åå¨ |
| | | if (!CollectedImages.ContainsKey(SN)) |
| | | { |
| | | return; |
| | | CollectedImages[SN] = new List<Bitmap>(); |
| | | } |
| | | if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | { |
| | | if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | TriggerRunMessageReceived?.Invoke(SN, source.ToString()); // 触åè¿è¡äºä»¶ |
| | | } |
| | | bitmap.Dispose(); |
| | | }); |
| | | CollectedImages[SN].Add(bitmap); |
| | | AsyncLogHelper.Info(SN + $"å¾åå·²å å
¥ç¼åï¼å½åç¼åæ°éï¼{CollectedImages[SN].Count}"); |
| | | } |
| | | |
| | | // 4. å¤çCollectedImagesä¸çå¾åï¼éåæ¶è´¹å表第ä¸ä¸ªå
ç´ ç´å°ä¸ºç©º |
| | | ProcessCollectedImages(); |
| | | //Task.Factory.StartNew(() => |
| | | //{ |
| | | // CallBackImg = (Bitmap)bitmap.Clone(); |
| | | // if (CallBackImg == null) |
| | | // { |
| | | // return; |
| | | // } |
| | | // if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | // { |
| | | // if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | // TriggerRunMessageReceived?.Invoke(SN, source.ToString()); // 触åè¿è¡äºä»¶ |
| | | // } |
| | | // bitmap.Dispose(); |
| | | //}); |
| | | } |
| | | catch { } |
| | | AsyncLogHelper.Info(SN + "Get frame blockId = {0}" + frame.frameInfo.blockId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤çCollectedImagesä¸çç¼åå¾å |
| | | /// æ ¸å¿é»è¾ï¼éåå第ä¸ä¸ªå¾å -> èµå¼ç»CallBackImg -> 触åäºä»¶ -> éæ¾å¹¶ç§»é¤ |
| | | /// </summary> |
| | | private void ProcessCollectedImages() |
| | | { |
| | | Task.Factory.StartNew(() => |
| | | { |
| | | // å éä¿è¯çº¿ç¨å®å
¨ï¼é²æ¢å¤çº¿ç¨åæ¶æä½å表 |
| | | lock (_collectedImagesLock) |
| | | { |
| | | // æ ¡éªå½åç¸æºçå¾åå表æ¯å¦åå¨ä¸ææ°æ® |
| | | if (!CollectedImages.ContainsKey(SN) || CollectedImages[SN].Count == 0) |
| | | { |
| | | AsyncLogHelper.Info(SN + "å½åæ ç¼åå¾åï¼è·³è¿å¤ç"); |
| | | return; |
| | | } |
| | | // 循ç¯å¤çï¼ç´å°å表为空 |
| | | while (CollectedImages[SN].Count > 0) |
| | | { |
| | | try |
| | | { |
| | | // 1 åå表第ä¸ä¸ªç´¢å¼çå¾åèµå¼ç»CallBackImg |
| | | Bitmap firstBitmap = CollectedImages[SN][0]; |
| | | ImageGrabbed?.Invoke(this, new LBCameraEventArgs(SN, firstBitmap, true)); |
| | | CallBackImg = (Bitmap)firstBitmap.Clone(); // å
éé¿å
åå¯¹è±¡è¢«éæ¾åå¼ç¨å¤±æ |
| | | |
| | | // 2 è·åè§¦åæ¨¡å¼å¹¶å¤ææ¯å¦è§¦åè¿è¡äºä»¶ |
| | | if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | { |
| | | // ç¡¬è§¦åæ¨¡å¼ä¸è§¦åè¿è¡äºä»¶ |
| | | if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | { |
| | | AsyncLogHelper.Info(SN + $"触å硬触åäºä»¶ï¼è§¦åæºï¼{source}"); |
| | | TriggerRunMessageReceived?.Invoke(SN, source.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | AsyncLogHelper.Warn(SN + "è·åè§¦åæ¨¡å¼å¤±è´¥ï¼è·³è¿äºä»¶è§¦å"); |
| | | } |
| | | |
| | | // 3 éæ¾ç¬¬ä¸ä¸ªå¾åèµæºå¹¶ä»åè¡¨ç§»é¤ |
| | | // å
éæ¾Bitmapå
åï¼åç§»é¤å表å
ç´ |
| | | firstBitmap.Dispose(); |
| | | CollectedImages[SN].RemoveAt(0); |
| | | AsyncLogHelper.Info(SN + $"å·²æ¶è´¹ç¼åå¾åï¼å©ä½ç¼åæ°éï¼{CollectedImages[SN].Count}"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | AsyncLogHelper.Error(SN + $"å¤çç¼åå¾åå¼å¸¸ï¼{ex.Message}", ex); |
| | | // å个å¾åå¤ç失败æ¶ï¼ç§»é¤è¯¥å¾åé¿å
é»å¡åç»å¤ç |
| | | if (CollectedImages[SN].Count > 0) |
| | | { |
| | | try |
| | | { |
| | | CollectedImages[SN][0]?.Dispose(); // å°è¯éæ¾ |
| | | CollectedImages[SN].RemoveAt(0); |
| | | } |
| | | catch (Exception innerEx) |
| | | { |
| | | AsyncLogHelper.Error(SN + $"æ¸
çå¼å¸¸å¾å失败ï¼{innerEx.Message}", innerEx); |
| | | } |
| | | } |
| | | // å个å¾åå¤ç失败ä¸ç»æ¢å¾ªç¯ï¼ç»§ç»å¤çä¸ä¸ä¸ª |
| | | // 4. ææå¾åå¤ç宿åï¼æ¸
空CallBackImg |
| | | if (CallBackImg != null) |
| | | { |
| | | CallBackImg.Dispose(); |
| | | CallBackImg = null; |
| | | } |
| | | continue; |
| | | } |
| | | // 4. ææå¾åå¤ç宿åï¼æ¸
空CallBackImg |
| | | if (CallBackImg != null) |
| | | { |
| | | CallBackImg.Dispose(); |
| | | CallBackImg = null; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¾åæ¯å¦ä¸ºMonoæ ¼å¼ |
| | | /// </summary> |
| | | /// <param name="enType"></param> |
| | |
| | | // 临æ¶è¡ç¼å²ï¼ç¨äºæ¥æ¶åè°æ°æ® |
| | | private byte[] _tempLineBuffer = null; |
| | | private bool _isContinuous = false; |
| | | // æ°å¢ï¼CollectedImagesæä½éï¼ä¿è¯çº¿ç¨å®å
¨ |
| | | private readonly object _collectedImagesLock = new object(); |
| | | |
| | | public LBCamera() |
| | | { |
| | |
| | | |
| | | _frameCount++; |
| | | AsyncLogHelper.Info($"LBCamera[{SN}]: Frame {_frameCount} generated ({width}x{height})"); |
| | | |
| | | // 弿¥è§¦åäºä»¶ï¼é¿å
é»å¡SDKåè°çº¿ç¨ |
| | | Task.Factory.StartNew(() => |
| | | //ç©ºå¼æ ¡éªï¼è½¬æ¢å¤±è´¥åç´æ¥è¿å |
| | | if (bmp == null) |
| | | { |
| | | try |
| | | AsyncLogHelper.Warn(SN + "帧转æ¢ä¸ºBitmap失败ï¼è·³è¿å¤ç"); |
| | | return; |
| | | } |
| | | // 线ç¨å®å
¨å°å°Bitmapæ·»å å°CollectedImagesåå
¸ |
| | | lock (_collectedImagesLock) |
| | | { |
| | | // ç¡®ä¿å½åç¸æºSN对åºçå表åå¨ |
| | | if (!CollectedImages.ContainsKey(SN)) |
| | | { |
| | | ImageGrabbed?.Invoke(this, new LBCameraEventArgs(SN, bmp, true)); |
| | | CallBackImg = (Bitmap)bmp.Clone(); |
| | | if (CallBackImg == null) |
| | | { |
| | | return; |
| | | } |
| | | if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | { |
| | | if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | TriggerRunMessageReceived?.Invoke(SN, source.ToString()); // 触åè¿è¡äºä»¶ |
| | | } |
| | | bmp.Dispose(); |
| | | CollectedImages[SN] = new List<Bitmap>(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | AsyncLogHelper.Error($"LBCamera: Event Invoke error - {ex.Message}"); |
| | | bmp.Dispose(); // å¼å¸¸æ¶éæ¾èµæº |
| | | } |
| | | }); |
| | | CollectedImages[SN].Add(bmp); |
| | | AsyncLogHelper.Info(SN + $"å¾åå·²å å
¥ç¼åï¼å½åç¼åæ°éï¼{CollectedImages[SN].Count}"); |
| | | } |
| | | |
| | | // å¤çCollectedImagesä¸çå¾åï¼éåæ¶è´¹å表第ä¸ä¸ªå
ç´ ç´å°ä¸ºç©º |
| | | ProcessCollectedImages(); |
| | | //// 弿¥è§¦åäºä»¶ï¼é¿å
é»å¡SDKåè°çº¿ç¨ |
| | | //Task.Factory.StartNew(() => |
| | | //{ |
| | | // try |
| | | // { |
| | | // ImageGrabbed?.Invoke(this, new LBCameraEventArgs(SN, bmp, true)); |
| | | // CallBackImg = (Bitmap)bmp.Clone(); |
| | | // if (CallBackImg == null) |
| | | // { |
| | | // return; |
| | | // } |
| | | // if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | // { |
| | | // if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | // TriggerRunMessageReceived?.Invoke(SN, source.ToString()); // 触åè¿è¡äºä»¶ |
| | | // } |
| | | // bmp.Dispose(); |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // AsyncLogHelper.Error($"LBCamera: Event Invoke error - {ex.Message}"); |
| | | // bmp.Dispose(); // å¼å¸¸æ¶éæ¾èµæº |
| | | // } |
| | | //}); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | AsyncLogHelper.Error($"LBCamera: CreateBitmap error - {ex.Message}"); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å¤çCollectedImagesä¸çç¼åå¾å |
| | | /// æ ¸å¿é»è¾ï¼éåå第ä¸ä¸ªå¾å -> èµå¼ç»CallBackImg -> 触åäºä»¶ -> éæ¾å¹¶ç§»é¤ |
| | | /// </summary> |
| | | private void ProcessCollectedImages() |
| | | { |
| | | Task.Factory.StartNew(() => |
| | | { |
| | | // å éä¿è¯çº¿ç¨å®å
¨ï¼é²æ¢å¤çº¿ç¨åæ¶æä½å表 |
| | | lock (_collectedImagesLock) |
| | | { |
| | | // æ ¡éªå½åç¸æºçå¾åå表æ¯å¦åå¨ä¸ææ°æ® |
| | | if (!CollectedImages.ContainsKey(SN) || CollectedImages[SN].Count == 0) |
| | | { |
| | | AsyncLogHelper.Info(SN + "å½åæ ç¼åå¾åï¼è·³è¿å¤ç"); |
| | | return; |
| | | } |
| | | // 循ç¯å¤çï¼ç´å°å表为空 |
| | | while (CollectedImages[SN].Count > 0) |
| | | { |
| | | try |
| | | { |
| | | // 1 åå表第ä¸ä¸ªç´¢å¼çå¾åèµå¼ç»CallBackImg |
| | | Bitmap firstBitmap = CollectedImages[SN][0]; |
| | | ImageGrabbed?.Invoke(this, new LBCameraEventArgs(SN, firstBitmap, true)); |
| | | CallBackImg = (Bitmap)firstBitmap.Clone(); // å
éé¿å
åå¯¹è±¡è¢«éæ¾åå¼ç¨å¤±æ |
| | | |
| | | // 2 è·åè§¦åæ¨¡å¼å¹¶å¤ææ¯å¦è§¦åè¿è¡äºä»¶ |
| | | if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | { |
| | | // ç¡¬è§¦åæ¨¡å¼ä¸è§¦åè¿è¡äºä»¶ |
| | | if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | { |
| | | AsyncLogHelper.Info(SN + $"触å硬触åäºä»¶ï¼è§¦åæºï¼{source}"); |
| | | TriggerRunMessageReceived?.Invoke(SN, source.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | AsyncLogHelper.Warn(SN + "è·åè§¦åæ¨¡å¼å¤±è´¥ï¼è·³è¿äºä»¶è§¦å"); |
| | | } |
| | | |
| | | // 3 éæ¾ç¬¬ä¸ä¸ªå¾åèµæºå¹¶ä»åè¡¨ç§»é¤ |
| | | // å
éæ¾Bitmapå
åï¼åç§»é¤å表å
ç´ |
| | | firstBitmap.Dispose(); |
| | | CollectedImages[SN].RemoveAt(0); |
| | | AsyncLogHelper.Info(SN + $"å·²æ¶è´¹ç¼åå¾åï¼å©ä½ç¼åæ°éï¼{CollectedImages[SN].Count}"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | AsyncLogHelper.Error(SN + $"å¤çç¼åå¾åå¼å¸¸ï¼{ex.Message}", ex); |
| | | // å个å¾åå¤ç失败æ¶ï¼ç§»é¤è¯¥å¾åé¿å
é»å¡åç»å¤ç |
| | | if (CollectedImages[SN].Count > 0) |
| | | { |
| | | try |
| | | { |
| | | CollectedImages[SN][0]?.Dispose(); // å°è¯éæ¾ |
| | | CollectedImages[SN].RemoveAt(0); |
| | | } |
| | | catch (Exception innerEx) |
| | | { |
| | | AsyncLogHelper.Error(SN + $"æ¸
çå¼å¸¸å¾å失败ï¼{innerEx.Message}", innerEx); |
| | | } |
| | | } |
| | | // å个å¾åå¤ç失败ä¸ç»æ¢å¾ªç¯ï¼ç»§ç»å¤çä¸ä¸ä¸ª |
| | | // 4. ææå¾åå¤ç宿åï¼æ¸
空CallBackImg |
| | | if (CallBackImg != null) |
| | | { |
| | | CallBackImg.Dispose(); |
| | | CallBackImg = null; |
| | | } |
| | | continue; |
| | | } |
| | | // 4. ææå¾åå¤ç宿åï¼æ¸
空CallBackImg |
| | | if (CallBackImg != null) |
| | | { |
| | | CallBackImg.Dispose(); |
| | | CallBackImg = null; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | private void SyncConfigFromCamera() |
| | | { |
| | |
| | | namespace LB_VisionProcesses.Communicators |
| | | using Newtonsoft.Json; |
| | | |
| | | namespace LB_VisionProcesses.Communicators |
| | | { |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | public abstract class BaseCommunicator : ICommunicator |
| | | { |
| | | /// <summary> |
| | | /// åç±»åç§° |
| | | /// </summary> |
| | | public string ClassName { get; set; } = string.Empty; |
| | | /// <summary> |
| | | /// é讯åç§° |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// è·åæ¶æ¯åè° |
| | | /// </summary> |
| | | [JsonIgnore] |
| | | public Action<string> MessageReceived; |
| | | |
| | | /// <summary> |
| | | /// è·åæ¶æ¯åè° |
| | | /// </summary> |
| | | [JsonIgnore] |
| | | public Action<string, string> TriggerRunMessageReceived; |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// å¿è·³åéçº¿ç¨ |
| | | /// </summary> |
| | | [JsonIgnore] |
| | | public Thread heartbeatThread; |
| | | |
| | | public BaseCommunicator(string name = "") |
| | | { |
| | | CommunicatorName = name; |
| | | } |
| | | |
| | | public virtual void SendHeartbeat() |
| | | { |
| | | while (true) |
| | |
| | | using Newtonsoft.Json; |
| | | using LB_SmartVisionCommon; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System.Collections.Concurrent; |
| | | using System.Diagnostics; |
| | |
| | | |
| | | if (!fullPath.Contains(".json")) |
| | | { |
| | | Debug.WriteLine("æä»¶è·¯å¾ä¸å®æ´"); |
| | | AsyncLogHelper.Info("æä»¶è·¯å¾ä¸å®æ´"); |
| | | return false; |
| | | } |
| | | if (string.IsNullOrEmpty(fullPath) || fullPath.Trim() == "") |
| | | { |
| | | Debug.WriteLine("æä»¶è·¯å¾ä¸å®æ´"); |
| | | AsyncLogHelper.Info("æä»¶è·¯å¾ä¸å®æ´"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | |
| | | if (!File.Exists(fullPath)) |
| | | { |
| | | Debug.WriteLine("æä»¶ä¸åå¨å建空æä»¶"); |
| | | AsyncLogHelper.Info("æä»¶ä¸åå¨å建空æä»¶"); |
| | | Save(directoryPath); |
| | | return true; |
| | | } |
| | |
| | | { |
| | | if (string.IsNullOrEmpty(filePath) || filePath.Trim() == "") |
| | | { |
| | | Debug.WriteLine("æä»¶è·¯å¾ä¸å®æ´"); |
| | | AsyncLogHelper.Info("æä»¶è·¯å¾ä¸å®æ´"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | using System; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | |
| | | namespace LB_VisionProcesses.Communicators.TCom |
| | | { |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | public class LocalMonitor : BaseCommunicator |
| | | { |
| | | // ä½¿ç¨ FileSystemWatcher æ¥å®æ¶ç嬿件夹åå |
| | |
| | | using System; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Linq; |
| | |
| | | |
| | | namespace LB_VisionProcesses.Communicators.TCom |
| | | { |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | public class TCPClient : BaseCommunicator |
| | | { |
| | | private TcpClient _tcpClient = new TcpClient(); |
| | |
| | | using System; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Linq; |
| | |
| | | |
| | | namespace LB_VisionProcesses.Communicators.TCom |
| | | { |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | public class TCPServer : BaseCommunicator |
| | | { |
| | | private TcpListener _tcpListener; |
| | |
| | | using RJCP.IO.Ports; |
| | | using Newtonsoft.Json; |
| | | using RJCP.IO.Ports; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | |
| | | namespace LB_VisionProcesses.Communicators.TCom |
| | | { |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | public class UARTPort : BaseCommunicator |
| | | { |
| | | private RJCP.IO.Ports.SerialPortStream SerialPort = new RJCP.IO.Ports.SerialPortStream(); |
| | |
| | | using LB_VisionProcesses.Communicators.TCom; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Concurrent; |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | namespace LB_VisionProcesses.Communicators.UserCommunicator.T306Command |
| | | { |
| | | [JsonObject(MemberSerialization.OptOut)] |
| | | internal class T306CommandTool : CommunicatorConfig |
| | | { |
| | | string HDCP14CHECK = "0422CCF2"; |
| | |
| | | <Reference Include="MVSDK_Net"> |
| | | <HintPath>ref\MVSDK_Net.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Alogrithms\VisualLargeModel\" /> |
| | | <Reference Include="EasyIDSDK_Net"> |
| | | <HintPath>ref\EasyIDSDK_Net.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <None Update="ref\CLIDelegate.dll"> |
| | | <None Update="ref\*.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\halcondotnet.dll"> |
| | | <None Update="ref\*.XML"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\MVSDKmd.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\MVSDK_Net.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\MVSDK_Net.XML"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\PHM6000.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\PHM6000API.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\PHM6000API.lib"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\Pilot2D.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\PointCloud3D.dll"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | <None Update="ref\ThridLibray.dll"> |
| | | <None Update="ref\*.lib"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </None> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | theme_AlgorithmForm.Font = new Font("Microsoft Sans Serif", 9F); |
| | | theme_AlgorithmForm.Image = (Image)resources.GetObject("theme_AlgorithmForm.Image"); |
| | | theme_AlgorithmForm.Location = new Point(0, 0); |
| | | theme_AlgorithmForm.Margin = new Padding(4); |
| | | theme_AlgorithmForm.Name = "theme_AlgorithmForm"; |
| | | theme_AlgorithmForm.Padding = new Padding(10, 70, 10, 9); |
| | | theme_AlgorithmForm.Padding = new Padding(12, 88, 12, 11); |
| | | theme_AlgorithmForm.RoundCorners = true; |
| | | theme_AlgorithmForm.Sizable = true; |
| | | theme_AlgorithmForm.Size = new Size(944, 601); |
| | | theme_AlgorithmForm.Size = new Size(1366, 751); |
| | | theme_AlgorithmForm.SmartBounds = true; |
| | | theme_AlgorithmForm.StartPosition = FormStartPosition.WindowsDefaultLocation; |
| | | theme_AlgorithmForm.TabIndex = 0; |
| | |
| | | pnl_ProcessEditForm.BackColor = Color.FromArgb(39, 51, 63); |
| | | pnl_ProcessEditForm.Dock = DockStyle.Fill; |
| | | pnl_ProcessEditForm.EdgeColor = Color.FromArgb(32, 41, 50); |
| | | pnl_ProcessEditForm.Location = new Point(10, 70); |
| | | pnl_ProcessEditForm.Location = new Point(12, 88); |
| | | pnl_ProcessEditForm.Margin = new Padding(4); |
| | | pnl_ProcessEditForm.Name = "pnl_ProcessEditForm"; |
| | | pnl_ProcessEditForm.Padding = new Padding(5); |
| | | pnl_ProcessEditForm.Size = new Size(924, 522); |
| | | pnl_ProcessEditForm.Padding = new Padding(6); |
| | | pnl_ProcessEditForm.Size = new Size(1342, 652); |
| | | pnl_ProcessEditForm.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; |
| | | pnl_ProcessEditForm.TabIndex = 1; |
| | | // |
| | |
| | | controlB_ProcessEditForm.EnableMaximizeButton = false; |
| | | controlB_ProcessEditForm.EnableMinimizeButton = false; |
| | | controlB_ProcessEditForm.ForeColor = Color.FromArgb(155, 155, 155); |
| | | controlB_ProcessEditForm.Location = new Point(844, 18); |
| | | controlB_ProcessEditForm.Location = new Point(1241, 18); |
| | | controlB_ProcessEditForm.Margin = new Padding(4); |
| | | controlB_ProcessEditForm.MaximizeHoverColor = Color.FromArgb(74, 74, 74); |
| | | controlB_ProcessEditForm.MinimizeHoverColor = Color.FromArgb(63, 63, 65); |
| | | controlB_ProcessEditForm.Name = "controlB_ProcessEditForm"; |
| | |
| | | // |
| | | // ProcessEditForm |
| | | // |
| | | AutoScaleDimensions = new SizeF(96F, 96F); |
| | | AutoScaleDimensions = new SizeF(120F, 120F); |
| | | AutoScaleMode = AutoScaleMode.Dpi; |
| | | ClientSize = new Size(944, 601); |
| | | ClientSize = new Size(1366, 751); |
| | | Controls.Add(theme_AlgorithmForm); |
| | | FormBorderStyle = FormBorderStyle.None; |
| | | MinimumSize = new Size(261, 61); |
| | | Margin = new Padding(4); |
| | | MinimumSize = new Size(326, 76); |
| | | Name = "ProcessEditForm"; |
| | | Text = "AlgorithmForm"; |
| | | TransparencyKey = Color.Fuchsia; |
| | |
| | | e.Cancel = true; //åæ¶å
³éçªä½ |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (res == DialogResult.Yes && OriProcess != null) //ä¿åVPP |
| | | { |
| | | //å©ç¨åå°å建å®ä¾ï¼å½åè§èï¼Tool+Edit |
| | |
| | | <data name="theme_AlgorithmForm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO |
| | | wAAADsABataJCQAAA+JJREFUWEftVkuIHGUQbt34iMEoq2S2q3p3yTJsuqpnJ+L6WBRdwaigohfFgEou |
| | | BkVBUPCBCEG8BXNQ48GLeImCehIJxMsqhsSZruod46K4HtSIGjU+4iOr0c1I9fSsM3/PLNtCPO0H36m/ |
| | | evz/X11VnreKVRTAHPOZumkY6lFwqURws3BwZ8ywTQnuiCP/+iTCzY1qaUPzdm/Atf3PaHre6XPsjyQM |
| | | 2xLGV4XwIyX4QRj+UMK/lPFvJTyhBMeV8IgQvmRJuH4Ko+l5p9UjGBbCJ5RxTgj+VMZmXxKcSAjekHE/ |
| | | NNs5DgaTKLinEQYVO4Trf1mkV81wixLUslPmA3bzF2XcKeP+hWY/u3n0fCXcrQwLyjAvjNsb1dI6N05P |
| | | mFAIHlHG73sEypPgGwnhfpn0zzH7jzddcK4Q7kqfKNMI4a9K+MwBDgbdeF04MBWsFYYdQvhbLlBvfhKT |
| | | f+vMtLfG7C0JJXxKGY67WnvCmPAFGRs7z42boul5AzHBfdK6TjdQtzPGk8oos5F/5Y7sfVvPhg+lp+1h |
| | | 0yIsxARPmtaN78WEl8eEX+SNclxUhne0glUrNrN9zfMGlPAuZTzaQ99FYfwuDv3ruoLvq5bWaQSvZCfL |
| | | GXUYLwrj240Qxtu2lkSN4FpdWfKZH9jb9RQ1Cq62f9sVOlxUxn3KQXnJ0PO8QxU/jBm1h74v7ZniEG9K |
| | | Hdg/quzvXO709k0Y3u08ucGqWgheX862H4XgxbR47SqU8D1X0EXC2VmGizqDz0xPr0kYH9eO360gNe0b |
| | | jWppozB+1kOQEb5MCLa0C64NoeGrhOGrvH6lhK81GiIvnggmrDLzgvTkvwvDA+5wsU4nhG/m9AUoBD/F |
| | | HFzWN4H0XQn2vF8eXN8Z3FAPYasl59oUYjuB+sTImDB+nhfgYQ39STf4fmu1DHtz+oIUgiM1KkWtwcFw |
| | | sOujVT3hrnaL7UQc+hcL5W+sKIXhw0OVjaW0iwnBc47gqIQ45QY32PKRzv8eTguRYM9SS5YouEEZjv37 |
| | | EffbzbjBDdZyxZYQ12EB2qS0bWrJqRVazPDWkojwZbuZrsgZtDJ0iY1g12khEtTicMTvclwn2CKE32YJ |
| | | 7G5PORfZ1HtMCH7MOV4BrQ3XCe92+4onk5Nn2PolDAvWXnuOzAwzo6Nnx4Q3SrojwqfKeMxWMpsXWVs+ |
| | | 2WrfKRdbW1W6Hf0shM/33Y7my4PrleFZIfhAaWjU/e5ivlw+y3S2FySMtynjvcrwsFiLJv/RhPBB2ws1 |
| | | hK2WcBLBFf1qawlplwvxaQlxe786OOU4PBWsjSO85mBlQ8n99r/BisSdAas4FfgHpdEUZpwUX7sAAAAA |
| | | SUVORK5CYII= |
| | | vgAADr4B6kKxwAAAA+xJREFUWEftV0loFUkYbvcNFzJi0lWdBEPQruqXKEYdcRgz4AYqeplBwYiXEUVB |
| | | UHAhCEG8iR509OBlmIsOjJ5EBvQSRVHzuvslxjAy8eCG+75GozF+f716L6873fqe2ykffDR59e9/1V8V |
| | | ow99KARtUg72J5aypGNN8xy2yJPWcleylb5gS13HnJdy+KSW6uJx3b8ZA7TKl6PbMPq3SbMsBUcpyf/2 |
| | | BP8PDh96kr32BX/rS/4O30789grfO1j/k4LQ6p8POO6XdFgpDNbDSZsn2Bt8u2MpWGdKsCPeBNMm3TZp |
| | | FaUc6/cW20pQEtpsflCllmwxjDbpLKOd9vAZuBPOx5J+86TyMdDbBxsdYLsn+SpUZYQy/imQILLdBIP3 |
| | | cxzEU7Dbns3WejXmcNK/NPGHkajabtUiLYO/nyOgXWdRFeUkDmdnWMOg2ACFFwEn8fzfFeaSxlpjIOlT |
| | | EHC0HVm/CstSC13B93sVFaOVszDQpwGuYGtQLipnQDlMyLzH12t2zJ8adH/TbeMbVLYROmmyDvjYRrLK |
| | | aS4Q3Y/gtWjFALtg6KSf4NW02Uj3HwSPzOuw9iAk24sI/p5rm3OV0wyOo+++ww7pzCIViVjvAk+02GyC |
| | | VlWnpUmw2Qggn+AV0eZ/A61oEtYsOttRwjlE5vy4L61KrabQmjBtV3I/JPtRUptcmy9UBuiM+tLc+bHs |
| | | aQ1Rn8rNnEC7Gpvr8KcqF0XoHVCbl0qB8p2OEspS8OZmySZrvwqNtbUDMRm3Yj9kj1uB9NXcwLkfjwyu |
| | | RAhoshuYcHMyGy4DT5T+jKrcjNbJh+yW75QIw62yqhDAvUghwV/Cybrw5UKTDn08GqmTJ9GCx660pscG |
| | | oPoq2MHzlUWjtN8skjZbRsGFdQpiJoBkVVkFnF3tLcCv+7ZZo31mcYZGLY5RL/kCiQrcaRLFTvrikOxc |
| | | YJF2PeZ5ZsTmAkNkCtaiW1YAkcTF1sT4YjXFEM3ekMADz+YztM8AULqlqE5nSL5wor3Zkew51nxU4WnP |
| | | Ij9DlVGLIWCtDhV6FzBWIJH9a3pNaZOGQRsNT6tjWSHB/6LK6OUA/ETJVER/O9dgwcQ7w7XLTG0yjSTO |
| | | Onp7Ny3A92VuuTD0rbcFbXsUMJonaQwnBV8Rniu4y2sGYbEe5emA8cORV6ZGY3n5UNycC9AKvBHZZRh+ |
| | | iqxoX9BlRWMZozvLLiSEV5V6HT2Bjz9iX0ftaAWE9sDoBV+UlOufY9FeWTmE5OhdgLH8Kxyvhv5GON3q |
| | | C3NzSvD19C70MTco4JTDZsbtrSzUlLP5DnBV3D745riOp5nr8F/OJcYV65++P2iTfNV/MPoQCcP4AKXR |
| | | FGYxo/VGAAAAAElFTkSuQmCC |
| | | </value> |
| | | </data> |
| | | <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
| | | <value>True</value> |
| | | </metadata> |
| | | </root> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Concurrent; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Drawing; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using LB_VisionProcesses.BarcodeReaders; |
| | | |
| | | namespace LB_VisionProcesses.Processes |
| | | { |
| | | [Process("读ç å·¥å
·", Category = "ååå·¥å
·", Description = "éè¿è¯»ç å¨è·åæ¡ç æ°æ®")] |
| | | public class BarcodeReaderProcess : IProcess |
| | | { |
| | | /// <summary> |
| | | /// 读ç å¨å®ä¾éå (ç±ä¸»ç¨åºç®¡çå¹¶ä¼ å
¥) |
| | | /// </summary> |
| | | [JsonIgnore] |
| | | public ConcurrentDictionary<string, BarcodeReaderBase> dicBarcodeReaders { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åå
³èç读ç å¨ |
| | | /// </summary> |
| | | [JsonIgnore] |
| | | public BarcodeReaderBase Reader { get; set; } |
| | | |
| | | public BarcodeReaderProcess() |
| | | { |
| | | strProcessName = "读ç å·¥å
·"; |
| | | strProcessClass = "LB_VisionProcesses.Processes.BarcodeReaderProcess"; |
| | | |
| | | Params.Inputs.Add("设å¤åç", "Huayray"); |
| | | Params.Inputs.Add("设å¤SN", ""); |
| | | Params.Inputs.Add("è§¦åæ¨¡å¼", "软触å"); |
| | | Params.Inputs.Add("è¶
æ¶æ¶é´", 2000); |
| | | |
| | | Params.Outputs.Add("æ¡ç ç»æ", ""); |
| | | Params.Outputs.Add("ç æ°é", 0); |
| | | } |
| | | |
| | | public override void InitRunParams() |
| | | { |
| | | Result = true; |
| | | Msg = "åå¤è¿è¡"; |
| | | bCompleted = false; |
| | | } |
| | | |
| | | public override bool Run() |
| | | { |
| | | DateTime StartTime = DateTime.Now; |
| | | try |
| | | { |
| | | InitRunParams(); |
| | | |
| | | string sn = Params.Inputs["设å¤SN"]?.ToString(); |
| | | if (string.IsNullOrEmpty(sn)) |
| | | { |
| | | Msg = "设å¤SNæªé
ç½®"; |
| | | Result = false; |
| | | return false; |
| | | } |
| | | |
| | | // ä»å
¨å±åéæä¼ å
¥åå
¸è·å |
| | | if (dicBarcodeReaders == null) |
| | | { |
| | | // å°è¯ä»å
¨å± dicGlobalVars è·å (å设主ç¨åºå·²æ¾å
¥) |
| | | if (dicGlobalVars.ContainsKey("dicBarcodeReaders")) |
| | | { |
| | | dicBarcodeReaders = dicGlobalVars["dicBarcodeReaders"] as ConcurrentDictionary<string, BarcodeReaderBase>; |
| | | } |
| | | } |
| | | |
| | | if (dicBarcodeReaders != null && dicBarcodeReaders.ContainsKey(sn)) |
| | | { |
| | | Reader = dicBarcodeReaders[sn]; |
| | | } |
| | | |
| | | if (Reader == null) |
| | | { |
| | | Msg = $"读ç å¨[{sn}]æªåå§å"; |
| | | Result = false; |
| | | return false; |
| | | } |
| | | |
| | | string triggerMode = Params.Inputs["è§¦åæ¨¡å¼"]?.ToString(); |
| | | if (triggerMode == "软触å") |
| | | { |
| | | bool success = Reader.SoftTrigger(); |
| | | Msg = success ? "触åæå" : "触å失败"; |
| | | Result = success; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Msg = "è¿è¡å¼å¸¸: " + ex.Message; |
| | | Result = false; |
| | | } |
| | | finally |
| | | { |
| | | RunTime = (DateTime.Now - StartTime).TotalMilliseconds; |
| | | bCompleted = true; |
| | | } |
| | | return Result; |
| | | } |
| | | |
| | | public override bool Load(string fullPath) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(fullPath) || !File.Exists(fullPath)) return false; |
| | | string json = File.ReadAllText(fullPath, Encoding.UTF8); |
| | | Params = JsonConvert.DeserializeObject<ProcessParams>(json); |
| | | Params?.FixDeserializedData(); |
| | | return true; |
| | | } |
| | | catch { return false; } |
| | | } |
| | | |
| | | public override bool Save(string filePath) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(filePath)) return false; |
| | | if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath); |
| | | string fullPath = Path.Combine(filePath, strProcessName + ".json"); |
| | | string json = JsonConvert.SerializeObject(Params, Formatting.Indented); |
| | | File.WriteAllText(fullPath, json, Encoding.UTF8); |
| | | return true; |
| | | } |
| | | catch { return false; } |
| | | } |
| | | |
| | | public override object Clone() |
| | | { |
| | | try |
| | | { |
| | | var obj = (BarcodeReaderProcess)MemberwiseClone(); |
| | | string json = JsonConvert.SerializeObject(this.Params); |
| | | obj.Params = JsonConvert.DeserializeObject<ProcessParams>(json); |
| | | return obj; |
| | | } |
| | | catch { return (BarcodeReaderProcess)MemberwiseClone(); } |
| | | } |
| | | |
| | | public override void Dispose() { } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0"?> |
| | | <doc> |
| | | <assembly> |
| | | <name>EasyIDSDK_Net</name> |
| | | </assembly> |
| | | <members> |
| | | <member name="T:EasyIDSDK_Net.EidCamera"> |
| | | <summary> |
| | | <para><ch>EidCamera</ch></para> |
| | | <para><en>EidCamera</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorOK"> |
| | | <summary> |
| | | <para><ch>æå</ch></para> |
| | | <para><en>OK</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorUnknown"> |
| | | <summary> |
| | | <para><ch>æªç¥é误</ch></para> |
| | | <para><en>Unknown error</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorInternalError"> |
| | | <summary> |
| | | <para><ch>å
é¨é误</ch></para> |
| | | <para><en>Internal error</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorInvalidParameter"> |
| | | <summary> |
| | | <para><ch>æ æåæ°</ch></para> |
| | | <para><en>Invalid parameter</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorNotConnected"> |
| | | <summary> |
| | | <para><ch>ç¸æºæªè¿æ¥</ch></para> |
| | | <para><en>Camera not connected</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorNotFound"> |
| | | <summary> |
| | | <para><ch>æªæ¾å°</ch></para> |
| | | <para><en>Not found</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorTimeout"> |
| | | <summary> |
| | | <para><ch>è¶
æ¶</ch></para> |
| | | <para><en>Timeout</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorNotImplemented"> |
| | | <summary> |
| | | <para><ch>æªå®ç°</ch></para> |
| | | <para><en>Not implemented</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorRepeatOperation"> |
| | | <summary> |
| | | <para><ch>é夿ä½</ch></para> |
| | | <para><en>Repeat operation</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorNullPtr"> |
| | | <summary> |
| | | <para><ch>空æé</ch></para> |
| | | <para><en>Null pointer</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorReadDataFail"> |
| | | <summary> |
| | | <para><ch>è¯»åæ°æ®å¤±è´¥</ch></para> |
| | | <para><en>Failed to read data</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorWriteDataFail"> |
| | | <summary> |
| | | <para><ch>åå
¥æ°æ®å¤±è´¥</ch></para> |
| | | <para><en>Failed to write data</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorDataCheckFail"> |
| | | <summary> |
| | | <para><ch>æ°æ®æ ¡éªå¤±è´¥</ch></para> |
| | | <para><en>Data verification failed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorImageSizeError"> |
| | | <summary> |
| | | <para><ch>å¾å大å°é误</ch></para> |
| | | <para><en>Wrong image size</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorImageTypeError"> |
| | | <summary> |
| | | <para><ch>å¾åç±»åé误</ch></para> |
| | | <para><en>Wrong image type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorImageDataTypeError"> |
| | | <summary> |
| | | <para><ch>å¾åæ°æ®ç±»åé误</ch></para> |
| | | <para><en>Wrong image data type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorSerializeFail"> |
| | | <summary> |
| | | <para><ch>åºåå失败</ch></para> |
| | | <para><en>Serialization failed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorDeserializeFail"> |
| | | <summary> |
| | | <para><ch>ååºåå失败</ch></para> |
| | | <para><en>Deserialization failed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorOpenFileFail"> |
| | | <summary> |
| | | <para><ch>æå¼æä»¶å¤±è´¥</ch></para> |
| | | <para><en>Failed to open file</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorWriteFileFail"> |
| | | <summary> |
| | | <para><ch>æä»¶åå
¥å¤±è´¥</ch></para> |
| | | <para><en>File writing failed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorInvalidHandle"> |
| | | <summary> |
| | | <para><ch>æ æå¥æ</ch></para> |
| | | <para><en>Invalid handle</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.eidErrorInsufficientBuffer"> |
| | | <summary> |
| | | <para><ch>ç¼å²åºè¿å°</ch></para> |
| | | <para><en>Insufficient buffers</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.#ctor"> |
| | | <summary> |
| | | <para><ch>æé 彿°</ch></para> |
| | | <para><en>Constructor</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetVersion_Net"> |
| | | <summary> |
| | | <para><ch>è·åçæ¬ä¿¡æ¯</ch></para> |
| | | <para><en>Get version information</en></para> |
| | | </summary> |
| | | <returns><para><ch>çæ¬ä¿¡æ¯</ch></para><para><en>Version infomation</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidEnumDevices_Net(EasyIDSDK_Net.EidCamera.EidDeviceList@,System.UInt32)"> |
| | | <summary> |
| | | <para><ch>æ ¹æ®æ¥å£ç±»åæä¸¾ç¸æº, åæ¶è¾åºææç¸æºä¿¡æ¯å° deviceList</ch></para> |
| | | <para><en>Enumerate devices according to the interface type, and outputting all devices information to the deviceList</en></para> |
| | | </summary> |
| | | <param name="deviceList"><para><ch>[out] 设å¤ä¿¡æ¯å表</ch></para><para><en>[out] Device information list</en></para></param> |
| | | <param name="type"><para><ch>[in] æ¥å£ç±»å, å¯ä»¥æ¯å¤ä¸ªæ¥å£ç±»åçç»å. è¥ä¼ å
¥å¼ä¸º0表示ææç±»å, ä¸ eidInterfaceTypeAll å«ä¹ç¸å, å
¶ä½åå¼åè #EidInterfaceType</ch></para> |
| | | <para><en>[in] Interface type, which can be a combination of multiple interface types.If the value of the parameter is 0, it means all types, which is the same as eidInterfaceTypeAll. other value see #EidInterfaceType</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidCreateDevice_Net(System.String,EasyIDSDK_Net.EidCamera.EidDeviceDataType)"> |
| | | <summary> |
| | | <para><ch>æ ¹æ®è®¾å¤æ°æ®ä¿¡æ¯å建ç¸åºç设å¤å¯¹è±¡, å¦å¯ä»¥éè¿è®¾å¤åºåå·å建ã</ch></para> |
| | | <para><en>Create a device handle according to the device data, for example, you can create a device object through the serial number. |
| | | This interface will not enumerate devices and needs to be called after #eidEnumDevices.</en></para> |
| | | </summary> |
| | | <param name="data"><para><ch>[in] è®¾å¤æ°æ®, æ°æ®å
容çå«ä¹ç± type åæ°å³å®</ch></para><para><en>[in] Device data, the meaning of the data content is determined by the type parameter</en></para></param> |
| | | <param name="type"><para><ch>[in] æ°æ®ç±»å, é»è®¤å¼æ¯è®¾å¤åºåå·</ch></para><para><en>[in] Data type</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | <remarks><para><ch>注æéè¦è°ç¨ #eidReleaseHandle_Net éæ¾èµæºã</ch></para><para><en>Note that need to call #eidReleaseHandle_Net to release resources.</en></para></remarks> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidReleaseHandle_Net"> |
| | | <summary> |
| | | <para><ch>éæ¾ç¸æºå¥æèµæº</ch></para> |
| | | <para><en>Release device handle resources</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetDeviceInfo_Net(EasyIDSDK_Net.EidCamera.EidDeviceInfo@)"> |
| | | <summary> |
| | | <para><ch>è·å设å¤ä¿¡æ¯</ch></para> |
| | | <para><en>Get device infomation</en></para> |
| | | </summary> |
| | | <param name="info"><para><ch>[out] 设å¤ä¿¡æ¯</ch></para><para><en>[out] Pointer to a EidDeviceInfo structure to receive the device information</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidOpenDevice_Net"> |
| | | <summary> |
| | | <para><ch>æå¼è®¾å¤</ch></para> |
| | | <para><en>Open a device</en></para> |
| | | </summary> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidCloseDevice_Net"> |
| | | <summary> |
| | | <para><ch>å
³é设å¤</ch></para> |
| | | <para><en>Close a device</en></para> |
| | | </summary> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsDeviceOpen_Net"> |
| | | <summary> |
| | | <para><ch>è®¾å¤æ¯å¦å·²ç»æå¼</ch></para> |
| | | <para><en>Gets a value indicating whether the media source is currently open. .</en></para> |
| | | </summary> |
| | | <returns><para><ch>å¦æè®¾å¤å¤äºæå¼ç¶æï¼è¿å trueï¼å¦åï¼false</ch></para><para><en>True if the device is open; otherwise, false</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidForceIpAddress_Net(System.String,System.String,System.String)"> |
| | | <summary> |
| | | <para><ch>ä¿®æ¹ç¸æºIP. 该æ¥å£åªé对éè¿ç½å¡æ¥å
¥ç设å¤ï¼å¯¹äºå
¶ä½è®¾å¤ï¼è°ç¨æ¤æ¥å£æ æä¹</ch></para> |
| | | <para><en>Modify the device IP. This interface is only for devices connected through a network card. |
| | | For other devices, it is meaningless to call this interface.</en></para> |
| | | </summary> |
| | | <param name="ipAddr"><para><ch>[in] 设å¤IPå°å</ch></para><para><en>[in] New IP address</en></para></param> |
| | | <param name="subnetMask"><para><ch>[in] åç½æ©ç </ch></para><para><en>[in] New subnet mask</en></para></param> |
| | | <param name="gateway"><para><ch>[in] é»è®¤ç½å
³</ch></para><para><en>[in] New default gateway</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidDownloadGenICamXML_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>ä¸è½½è®¾å¤æè¿°XMLæä»¶ï¼å¹¶ä¿åå°æå®è·¯å¾</ch></para> |
| | | <para><en>Download device description XML file, and save the file to specified path</en></para> |
| | | </summary> |
| | | <param name="path"><para><ch>[in] æä»¶ä¿åè·¯å¾</ch></para><para><en>[in] The file path where the downloaded XMl file would be saved to</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSaveDeviceConfig_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>ä¿å设å¤é
ç½®å°æå®çè·¯å¾</ch></para> |
| | | <para><en>Save the configuration of the device to specified path</en></para> |
| | | </summary> |
| | | <param name="path"><para><ch>[in] æä»¶ä¿åè·¯å¾</ch></para><para><en>[in] The file path where the downloaded XMl file would be saved to</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidLoadDeviceConfig_Net(System.String,EasyIDSDK_Net.EidCamera.EidErrorList@)"> |
| | | <summary> |
| | | <para><ch>仿件å 载设å¤é
ç½®</ch></para> |
| | | <para><en>Load the device configuration from a file</en></para> |
| | | </summary> |
| | | <param name="path"><para><ch>[in] é
ç½®æä»¶è·¯å¾</ch></para><para><en>[in] Configuration file path</en></para></param> |
| | | <param name="errorList"><para><ch>[out] é误å表æé, åå
¥å¤±è´¥ç设å¤å±æ§åç§°å°éè¿è¯¥åæ°è¿å</ch></para><para><en>[out] Pointor to error list. The device feature names that failed to write will be returned with this parameter</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetFeatureType_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>è·å设å¤å±æ§ç±»å</ch></para> |
| | | <para><en>Get device feature type</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <returns><para><ch>设å¤å±æ§ç±»å, è§ #EidFeatureType</ch></para><para><en>Device feature type, see enum #EidFeatureType</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsFeatureValid_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>设å¤å±æ§æ¯å¦ææ</ch></para> |
| | | <para><en>Is the device feature valid</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <returns><para><ch>true ææ,false æ æ</ch></para><para><en>true Valid,false Not valid</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsFeatureAvailable_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>设å¤å±æ§æ¯å¦å¯ç¨</ch></para> |
| | | <para><en>Is the device feature available</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <returns><para><ch>true å¯ç¨,false ä¸å¯ç¨</ch></para><para><en>true Available,false Not available</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsFeatureReadable_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>设å¤å±æ§æ¯å¦å¯è¯»</ch></para> |
| | | <para><en>Is the device feature readable</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <returns><para><ch>true å¯è¯»,false ä¸å¯è¯»</ch></para><para><en>true Readable,false Not readable</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsFeatureWriteable_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>设å¤å±æ§æ¯å¦å¯å</ch></para> |
| | | <para><en>Is the device feature writeable</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <returns><para><ch>true å¯å,false ä¸å¯å</ch></para><para><en>true Writeable,false Not writeable</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetIntFeatureValue_Net(System.String,System.Int64@)"> |
| | | <summary> |
| | | <para><ch>è·åæ´å屿§å¼</ch></para> |
| | | <para><en>Get integer feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[out] 屿§å¼</ch></para><para><en>[out] Pointer to feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSetIntFeatureValue_Net(System.String,System.Int64)"> |
| | | <summary> |
| | | <para><ch>设置æ´å屿§å¼</ch></para> |
| | | <para><en>Set integer feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[in] 屿§å¼</ch></para><para><en>[in] Feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetIntFeatureInfo_Net(System.String,EasyIDSDK_Net.EidCamera.EidIntFeatureInfo@)"> |
| | | <summary> |
| | | <para><ch>è·åæ´å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>Gets integer feature information</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="info"><para><ch>[out] 屿§ä¿¡æ¯</ch></para><para><en>[out] A pointer to a buffer that receives the feature information</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetFloatFeatureValue_Net(System.String,System.Double@)"> |
| | | <summary> |
| | | <para><ch>è·åæµ®ç¹å屿§å¼</ch></para> |
| | | <para><en>Get float feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[out] 屿§å¼</ch></para><para><en>[out] Pointer to feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSetFloatFeatureValue_Net(System.String,System.Double)"> |
| | | <summary> |
| | | <para><ch>设置浮ç¹å屿§å¼</ch></para> |
| | | <para><en>Set float feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[in] 屿§å¼</ch></para><para><en>[in] Feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetFloatFeatureInfo_Net(System.String,EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo@)"> |
| | | <summary> |
| | | <para><ch>è·åæµ®ç¹å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>Gets float feature information</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="info"><para><ch>[out] 屿§ä¿¡æ¯</ch></para><para><en>[out] A pointer to a buffer that receives the feature information</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetBoolFeatureValue_Net(System.String,System.Boolean@)"> |
| | | <summary> |
| | | <para><ch>è·åå¸å°å屿§å¼</ch></para> |
| | | <para><en>Get bool feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[out] 屿§å¼</ch></para><para><en>[out] Pointer to feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSetBoolFeatureValue_Net(System.String,System.Boolean)"> |
| | | <summary> |
| | | <para><ch>设置å¸å°å屿§å¼</ch></para> |
| | | <para><en>Set bool feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[in] 屿§å¼</ch></para><para><en>[in] Feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetStringFeatureValue_Net(System.String,System.Byte@,System.UInt32@)"> |
| | | <summary> |
| | | <para><ch>è·åå符串å屿§å¼</ch></para> |
| | | <para><en>Get string feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[out] 屿§å¼å符串ç¼å²åº, ç¨æ·åé
å
å空é´</ch></para><para><en>[out] Pointer to string feature value buffer that is allocated memory space by the user</en></para></param> |
| | | <param name="size"><para><ch>[in,out] 屿§å¼å符串ç¼å²åºé¿åº¦.</ch></para><para><en>[in,out] The length of the string buffer.</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | <remarks><para><ch>å½å½æ°è¿åæ¶, 妿ç¼å²åºè¶³å¤å¤§, ææçæ°æ®é½ä¼æ·è´å° value ç¼å²åº, 并䏿¤åæ°ç弿¯å®é
å符串çé¿åº¦(ä¸å
å«nullç»æç¬¦); |
| | | 妿ç¼å²åºä¸å¤å¤§, ç¼å²åºçæ°æ®æ¯æªæåçå符串å
容, 并䏿¤åæ°å
å«å符串çå®é
é¿åº¦(ä¸å
å«nullç»æç¬¦)</ch></para><para><en>When the function returns, if the buffer is large enough, |
| | | all data is copied to the value buffer, and the value of this parameter is the length of the actual string (without the null terminator); |
| | | If the buffer is not large enough, the buffer's data is the truncated string content, |
| | | and this parameter contains the actual length of the string (without the null terminator)</en></para></remarks> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSetStringFeatureValue_Net(System.String,System.Byte@)"> |
| | | <summary> |
| | | <para><ch>设置å符串å屿§å¼</ch></para> |
| | | <para><en>Set string feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[in] 屿§å¼</ch></para><para><en>[in] Feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetStringFeatureInfo_Net(System.String,EasyIDSDK_Net.EidCamera.EidStringFeatureInfo@)"> |
| | | <summary> |
| | | <para><ch>è·åå符串å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>Gets string feature information</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="info"><para><ch>[out] 屿§ä¿¡æ¯</ch></para><para><en>[out] A pointer to a buffer that receives the feature information</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetEnumFeatureValue_Net(System.String,System.UInt64@)"> |
| | | <summary> |
| | | <para><ch>è·åæä¸¾å屿§å¼</ch></para> |
| | | <para><en>Get enum feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[out] 屿§å¼</ch></para><para><en>[out] Pointer to feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSetEnumFeatureValue_Net(System.String,System.UInt64)"> |
| | | <summary> |
| | | <para><ch>设置æä¸¾å屿§å¼</ch></para> |
| | | <para><en>Set enum feature value</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[in] 屿§å¼</ch></para><para><en>[in] Feature value</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetEnumFeatureSymbol_Net(System.String,System.Byte@,System.UInt32)"> |
| | | <summary> |
| | | <para><ch>è·åæä¸¾å屿§ç¬¦å·</ch></para> |
| | | <para><en>Get enum feature symbol</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[out] 屿§ç¬¦å·</ch></para><para><en>[out] Pointer to enum feature symbol buffer</en></para></param> |
| | | <param name="size"><para><ch>[in] 屿§ç¬¦å·ç¼å²é¿åº¦</ch></para><para><en>[in] The length of symbol buffer</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidSetEnumFeatureSymbol_Net(System.String,System.String)"> |
| | | <summary> |
| | | <para><ch>设置æä¸¾å屿§ç¬¦å·</ch></para> |
| | | <para><en>Set enum feature symbol</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="value"><para><ch>[in] 屿§ç¬¦å·</ch></para><para><en>[in] Feature symbol</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetEnumFeatureEntryList_Net(System.String,EasyIDSDK_Net.EidCamera.EidEnumFeatureEntryList@)"> |
| | | <summary> |
| | | <para><ch>è·åæä¸¾å屿§æ¡ç®å表</ch></para> |
| | | <para><en>Get enum feature entry list</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="entryList"><para><ch>[out] æä¸¾æ¡ç®å表</ch></para><para><en>[out] Pointer to a EidEnumFeatureEntryList structure to receive the enum entry list</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidExecCommandFeature_Net(System.String)"> |
| | | <summary> |
| | | <para><ch>æ§è¡å½ä»¤è¡å±æ§</ch></para> |
| | | <para><en>Execute command feature</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidEnumFeatureChildren_Net(System.String,EasyIDSDK_Net.EidCamera.EidEnumFeatureChildrenCallback,System.IntPtr)"> |
| | | <summary> |
| | | <para><ch>æä¸¾å屿§</ch></para> |
| | | <para><en>Enum Feature Children</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>[in] 屿§åç§°</ch></para><para><en>[in] Feature name</en></para></param> |
| | | <param name="fn"><para><ch>[in] åè°å½æ°, æ¯ä¸ªå屿§é½å°ä¼è§¦å䏿¬¡è¯¥å½æ°çè°ç¨</ch></para><para><en>[in] callback function, each child feature will invoke this method</en></para></param> |
| | | <param name="userData"><para><ch>[in] ç¨æ·æ°æ®</ch></para><para><en>[in] user data for callback function</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidStartGrabbing_Net(System.Int32)"> |
| | | <summary> |
| | | <para><ch>å¼å§åæµ</ch></para> |
| | | <para><en>Start grabbing, then you can get the camera frame through #eidGetFrame</en></para> |
| | | </summary> |
| | | <param name="bufferCount"><para><ch>[in] 帧ç¼åæ°é, 0表示使ç¨é»è®¤ç¼åæ°, >0使ç¨è®¾ç½®çç¼åæ°</ch></para><para><en>[in] The number of frame buffers, 0 means to use the default number of buffers, >0 to use the set number of buffers</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidStopGrabbing_Net"> |
| | | <summary> |
| | | <para><ch>忢念</ch></para> |
| | | <para><en>Stop grabbing</en></para> |
| | | </summary> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsGrabbing_Net"> |
| | | <summary> |
| | | <para><ch>æ¯å¦æ£å¨åæµ</ch></para> |
| | | <para><en>Check whether it is grabbing or not</en></para> |
| | | </summary> |
| | | <returns><para><ch>妿æ£å¨åæµ, è¿åtrue; å¦åè¿åfalse</ch></para><para><en>Returns true if it is grabbing; otherwise returns false</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidClearFrameBuffer_Net"> |
| | | <summary> |
| | | <para><ch>æ¸
é¤å¸§æ°æ®ç¼å</ch></para> |
| | | <para><en>clear frame buffer cache</en></para> |
| | | </summary> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetFrame_Net(System.UInt32)"> |
| | | <summary> |
| | | <para><ch>è·åä¸å¸§å¾å, è¥ç¸æºå¼å¯äºè¯»ç åè½, å¸§æ°æ®ä¸åæ¶æºå¸¦æ¡ç ä¿¡æ¯.</ch></para> |
| | | <para><en>Get a frame. If the code reading function is enabled, the frame data also carries the barcode information.</en></para> |
| | | </summary> |
| | | <param name="timeout"><para><ch>[in] è¶
æ¶æ¶é´, åä½: 毫ç§. å½å¼ä¸º-1æ¶è¡¨ç¤ºæ éçå¾
</ch></para><para><en>[in] Timeout, in ms, when the value is -1, it means infinite wait</en></para></param> |
| | | <returns><para><ch>å¸§æ°æ®å¥æ, 失败è¿å nullptr</ch></para><para><en>Frame handle, failure returns nullptr</en></para></returns> |
| | | <remarks><para><ch>该æ¥å£å°å¯¼è´çº¿ç¨é»å¡, ç´å°æ¶å°å¾åæè
å°è¾¾è¶
æ¶æ¶é´. è¿åç奿éè¦éè¿ #eidReleaseFrame_Net è¿è¡éæ¾</ch></para><para><en>This method will block the thread until the timeout is reached. |
| | | The returned handle needs to be released through #eidReleaseFrame_Net</en></para></remarks> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidReleaseFrame_Net(System.IntPtr@)"> |
| | | <summary> |
| | | <para><ch>éæ¾ä¸å¸§å¾å</ch></para> |
| | | <para><en>Release a frame</en></para> |
| | | </summary> |
| | | <param name="frame"><para><ch>å¸§æ°æ®å¥æ</ch></para><para><en>Frame handle</en></para></param> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidIsFrameValid_Net(System.IntPtr)"> |
| | | <summary> |
| | | <para><ch>叧奿æ¯å¦ææ</ch></para> |
| | | <para><en>Is the frame handle valid</en></para> |
| | | </summary> |
| | | <param name="frame"><para><ch>[in] 叧奿</ch></para><para><en>[in] Frame handle</en></para></param> |
| | | <returns><para><ch>true ææ,false æ æ</ch></para><para><en>true Valid,false Not valid</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidGetFrameInfo_Net(System.IntPtr,EasyIDSDK_Net.EidCamera.EidFrameInfo@)"> |
| | | <summary> |
| | | <para><ch>è·å帧信æ¯. 帧信æ¯éåæ¶å
å«å¾åæ°æ®åæ¡ç æ°æ®</ch></para> |
| | | <para><en>Get frame information. The frame information contains both image data and barcode data</en></para> |
| | | </summary> |
| | | <param name="frame"><para><ch>[in] 叧奿</ch></para><para><en>[in] Frame handle</en></para></param> |
| | | <param name="info"><para><ch>[out] 帧信æ¯</ch></para><para><en>[out] Frame information</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidRegisterFrameCallback_Net(EasyIDSDK_Net.EidCamera.EidFrameCallback,System.IntPtr)"> |
| | | <summary> |
| | | <para><ch>注åå¸§æ°æ®åè°</ch></para> |
| | | <para><en>Register frame data callback</en></para> |
| | | </summary> |
| | | <param name="cb"><para><ch>[in] å¸§æ°æ®åè°å½æ°</ch></para><para><en>[in] A pointer to frame data callback function</en></para></param> |
| | | <param name="userData"><para><ch>[in] ç¨æ·æ°æ®</ch></para><para><en>[in] User data to be passed to callback function</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidRegisterConnectionCallback_Net(EasyIDSDK_Net.EidCamera.EidConnectionCallback,System.IntPtr)"> |
| | | <summary> |
| | | <para><ch>注å设å¤è¿æ¥ä¿¡æ¯åè°</ch></para> |
| | | <para><en>Register device connection information callback</en></para> |
| | | </summary> |
| | | <param name="cb"><para><ch>[in] è¿æ¥ä¿¡æ¯åè°å½æ°</ch></para><para><en>[in] A pointer to device connection information callback function</en></para></param> |
| | | <param name="userData"><para><ch>[in] ç¨æ·æ°æ®</ch></para><para><en>[in] User data to be passed to callback function</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="M:EasyIDSDK_Net.EidCamera.eidRegisterFeatureUpdateCallback_Net(EasyIDSDK_Net.EidCamera.EidFeatureUpdateCallback,System.IntPtr)"> |
| | | <summary> |
| | | <para><ch>注å设å¤å±æ§æ´æ°åè°</ch></para> |
| | | <para><en>Register device feature update callback</en></para> |
| | | </summary> |
| | | <param name="cb"><para><ch>[in] 屿§æ´æ°åè°å½æ°</ch></para><para><en>[in] A pointer to device feature update callback function</en></para></param> |
| | | <param name="userData"><para><ch>[in] ç¨æ·æ°æ®</ch></para><para><en>[in] User data to be passed to callback function</en></para></param> |
| | | <returns><para><ch>é误ç , 0-æå, å
¶ä»-é误ç </ch></para><para><en>Error code, 0-success, other-error code</en></para></returns> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidFeatureType"> |
| | | <summary> |
| | | <para><ch>屿§ç±»å</ch></para> |
| | | <para><en>Feature type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeUnknown"> |
| | | <summary> |
| | | <para><ch>æªå®ä¹</ch></para> |
| | | <para><en>Undefined</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeInt"> |
| | | <summary> |
| | | <para><ch>æ´åæ°</ch></para> |
| | | <para><en>Integer</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeFloat"> |
| | | <summary> |
| | | <para><ch>æµ®ç¹æ°</ch></para> |
| | | <para><en>Float</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeEnum"> |
| | | <summary> |
| | | <para><ch>æä¸¾</ch></para> |
| | | <para><en>Enumeration</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeBool"> |
| | | <summary> |
| | | <para><ch>å¸å°</ch></para> |
| | | <para><en>Bool</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeString"> |
| | | <summary> |
| | | <para><ch>å符串</ch></para> |
| | | <para><en>String</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeCommand"> |
| | | <summary> |
| | | <para><ch>å½ä»¤</ch></para> |
| | | <para><en>Command</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFeatureType.eidFeatureTypeGroup"> |
| | | <summary> |
| | | <para><ch>åç»</ch></para> |
| | | <para><en>Group</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidInterfaceType"> |
| | | <summary> |
| | | <para><ch>æ¥å£ç±»å</ch></para> |
| | | <para><en>Interface type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidInterfaceType.eidInterfaceTypeUnknown"> |
| | | <summary> |
| | | <para><ch>æªç¥æ¥å£ç±»å</ch></para> |
| | | <para><en>Unknown interface type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidInterfaceType.eidInterfaceTypeGige"> |
| | | <summary> |
| | | <para><ch>ç½å¡æ¥å£ç±»å</ch></para> |
| | | <para><en>NIC type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidInterfaceType.eidInterfaceTypeUsb"> |
| | | <summary> |
| | | <para><ch>USBæ¥å£ç±»å</ch></para> |
| | | <para><en>USB interface type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidInterfaceType.eidInterfaceTypeAll"> |
| | | <summary> |
| | | <para><ch>æææ¥å£ç±»å</ch></para> |
| | | <para><en>All interface type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidDeviceType"> |
| | | <summary> |
| | | <para><ch>设å¤ç±»å</ch></para> |
| | | <para><en>Device type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceType.eidDeviceTypeUnknown"> |
| | | <summary> |
| | | <para><ch>æªç¥ç±»å</ch></para> |
| | | <para><en>Unknown type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceType.eidDeviceTypeGige"> |
| | | <summary> |
| | | <para><ch>GIGEç¸æº</ch></para> |
| | | <para><en>GigE Camera</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceType.eidDeviceTypeUSB"> |
| | | <summary> |
| | | <para><ch>USBç¸æº</ch></para> |
| | | <para><en>USB Camera</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidDeviceDataType"> |
| | | <summary> |
| | | <para><ch>è®¾å¤æ°æ®ç±»å, ç¨äº #eidCreateDevice 彿°</ch></para> |
| | | <para><en>Device data type, used in the #eidCreateDevice function</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceDataType.eidDeviceDataTypeID"> |
| | | <summary> |
| | | <para><ch>设å¤ID</ch></para> |
| | | <para><en>Device ID</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceDataType.eidDeviceDataTypeSN"> |
| | | <summary> |
| | | <para><ch>åºåå·</ch></para> |
| | | <para><en>Serial number</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceDataType.eidDeviceDataTypeIP"> |
| | | <summary> |
| | | <para><ch>IPå°å</ch></para> |
| | | <para><en>IP address</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceDataType.eidDeviceDataTypeMAC"> |
| | | <summary> |
| | | <para><ch>MACå°å</ch></para> |
| | | <para><en>MAC address</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidPixelFormat"> |
| | | <summary> |
| | | <para><ch>å¾ååç´ æ ¼å¼</ch></para> |
| | | <para><en>Image pixel format</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelUnknwon"> |
| | | <summary> |
| | | <para><ch>æªç¥</ch></para> |
| | | <para><en>Unknown</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono1p"> |
| | | <summary> |
| | | <para><ch>Mono1p</ch></para> |
| | | <para><en>Mono1p</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono2p"> |
| | | <summary> |
| | | <para><ch>Mono2p</ch></para> |
| | | <para><en>Mono2p</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono4p"> |
| | | <summary> |
| | | <para><ch>Mono4p</ch></para> |
| | | <para><en>Mono4p</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono8"> |
| | | <summary> |
| | | <para><ch>Mono8</ch></para> |
| | | <para><en>Mono8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono8S"> |
| | | <summary> |
| | | <para><ch>Mono8S</ch></para> |
| | | <para><en>Mono8S</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono10"> |
| | | <summary> |
| | | <para><ch>Mono10</ch></para> |
| | | <para><en>Mono10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono10Packed"> |
| | | <summary> |
| | | <para><ch>Mono10Packed</ch></para> |
| | | <para><en>Mono10Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono12"> |
| | | <summary> |
| | | <para><ch>Mono12</ch></para> |
| | | <para><en>Mono12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono12Packed"> |
| | | <summary> |
| | | <para><ch>Mono12Packed</ch></para> |
| | | <para><en>Mono12Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono14"> |
| | | <summary> |
| | | <para><ch>Mono14</ch></para> |
| | | <para><en>Mono14</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelMono16"> |
| | | <summary> |
| | | <para><ch>Mono16</ch></para> |
| | | <para><en>Mono16</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGR8"> |
| | | <summary> |
| | | <para><ch>BayGR8</ch></para> |
| | | <para><en>BayGR8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayRG8"> |
| | | <summary> |
| | | <para><ch>BayRG8</ch></para> |
| | | <para><en>BayRG8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGB8"> |
| | | <summary> |
| | | <para><ch>BayGB8</ch></para> |
| | | <para><en>BayGB8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayBG8"> |
| | | <summary> |
| | | <para><ch>BayBG8</ch></para> |
| | | <para><en>BayBG8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGR10"> |
| | | <summary> |
| | | <para><ch>BayGR10</ch></para> |
| | | <para><en>BayGR10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayRG10"> |
| | | <summary> |
| | | <para><ch>BayRG10</ch></para> |
| | | <para><en>BayRG10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGB10"> |
| | | <summary> |
| | | <para><ch>BayGB10</ch></para> |
| | | <para><en>BayGB10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayBG10"> |
| | | <summary> |
| | | <para><ch>BayBG10</ch></para> |
| | | <para><en>BayBG10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGR12"> |
| | | <summary> |
| | | <para><ch>BayGR12</ch></para> |
| | | <para><en>BayGR12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayRG12"> |
| | | <summary> |
| | | <para><ch>BayRG12</ch></para> |
| | | <para><en>BayRG12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGB12"> |
| | | <summary> |
| | | <para><ch>BayGB12</ch></para> |
| | | <para><en>BayGB12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayBG12"> |
| | | <summary> |
| | | <para><ch>BayBG12</ch></para> |
| | | <para><en>BayBG12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGR10Packed"> |
| | | <summary> |
| | | <para><ch>BayGR10Packed</ch></para> |
| | | <para><en>BayGR10Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayRG10Packed"> |
| | | <summary> |
| | | <para><ch>BayRG10Packed</ch></para> |
| | | <para><en>BayRG10Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGB10Packed"> |
| | | <summary> |
| | | <para><ch>BayGB10Packed</ch></para> |
| | | <para><en>BayGB10Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayBG10Packed"> |
| | | <summary> |
| | | <para><ch>BayBG10Packed</ch></para> |
| | | <para><en>BayBG10Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGR12Packed"> |
| | | <summary> |
| | | <para><ch>BayGR12Packed</ch></para> |
| | | <para><en>BayGR12Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayRG12Packed"> |
| | | <summary> |
| | | <para><ch>BayRG12Packed</ch></para> |
| | | <para><en>BayRG12Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGB12Packed"> |
| | | <summary> |
| | | <para><ch>BayGB12Packed</ch></para> |
| | | <para><en>BayGB12Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayBG12Packed"> |
| | | <summary> |
| | | <para><ch>BayBG12Packed</ch></para> |
| | | <para><en>BayBG12Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGR16"> |
| | | <summary> |
| | | <para><ch>BayGR16</ch></para> |
| | | <para><en>BayGR16</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayRG16"> |
| | | <summary> |
| | | <para><ch>BayRG16</ch></para> |
| | | <para><en>BayRG16</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayGB16"> |
| | | <summary> |
| | | <para><ch>BayGB16</ch></para> |
| | | <para><en>BayGB16</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBayBG16"> |
| | | <summary> |
| | | <para><ch>BayBG16</ch></para> |
| | | <para><en>BayBG16</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB8"> |
| | | <summary> |
| | | <para><ch>RGB8</ch></para> |
| | | <para><en>RGB8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBGR8"> |
| | | <summary> |
| | | <para><ch>BGR8</ch></para> |
| | | <para><en>BGR8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGBA8"> |
| | | <summary> |
| | | <para><ch>RGBA8</ch></para> |
| | | <para><en>RGBA8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBGRA8"> |
| | | <summary> |
| | | <para><ch>BGRA8</ch></para> |
| | | <para><en>BGRA8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB10"> |
| | | <summary> |
| | | <para><ch>RGB10</ch></para> |
| | | <para><en>RGB10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBGR10"> |
| | | <summary> |
| | | <para><ch>BGR10</ch></para> |
| | | <para><en>BGR10</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB12"> |
| | | <summary> |
| | | <para><ch>RGB12</ch></para> |
| | | <para><en>RGB12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBGR12"> |
| | | <summary> |
| | | <para><ch>BGR12</ch></para> |
| | | <para><en>BGR12</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB16"> |
| | | <summary> |
| | | <para><ch>RGB16</ch></para> |
| | | <para><en>RGB16</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB10V1Packed"> |
| | | <summary> |
| | | <para><ch>RGB10V1Packed</ch></para> |
| | | <para><en>RGB10V1Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB10P32"> |
| | | <summary> |
| | | <para><ch>RGB10P32</ch></para> |
| | | <para><en>RGB10P32</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB12V1Packed"> |
| | | <summary> |
| | | <para><ch>RGB12V1Packed</ch></para> |
| | | <para><en>RGB12V1Packed</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB565P"> |
| | | <summary> |
| | | <para><ch>RGB565P</ch></para> |
| | | <para><en>RGB565P</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelBGR565P"> |
| | | <summary> |
| | | <para><ch>BGR565P</ch></para> |
| | | <para><en>BGR565P</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYUV411_8_UYYVYY"> |
| | | <summary> |
| | | <para><ch>YUV411_8_UYYVYY</ch></para> |
| | | <para><en>YUV411_8_UYYVYY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYUV422_8_UYVY"> |
| | | <summary> |
| | | <para><ch>YUV422_8_UYVY</ch></para> |
| | | <para><en>YUV422_8_UYVY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYUV422_8"> |
| | | <summary> |
| | | <para><ch>YUV422_8 </ch></para> |
| | | <para><en>YUV422_8 </en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYUV8_UYV"> |
| | | <summary> |
| | | <para><ch>YUV8_UYV</ch></para> |
| | | <para><en>YUV8_UYV</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr8CbYCr"> |
| | | <summary> |
| | | <para><ch>YCbCr8CbYCr</ch></para> |
| | | <para><en>YCbCr8CbYCr</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr422_8"> |
| | | <summary> |
| | | <para><ch>YCbCr422_8</ch></para> |
| | | <para><en>YCbCr422_8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr422_8_CbYCrY"> |
| | | <summary> |
| | | <para><ch>YCbCr422_8_CbYCrY</ch></para> |
| | | <para><en>YCbCr422_8_CbYCrY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr411_8_CbYYCrYY"> |
| | | <summary> |
| | | <para><ch>YCbCr411_8_CbYYCrYY</ch></para> |
| | | <para><en>YCbCr411_8_CbYYCrYY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr601_8_CbYCr"> |
| | | <summary> |
| | | <para><ch>YCbCr601_8_CbYCr</ch></para> |
| | | <para><en>YCbCr601_8_CbYCr</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr601_422_8"> |
| | | <summary> |
| | | <para><ch>YCbCr601_422_8</ch></para> |
| | | <para><en>YCbCr601_422_8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr601_422_8_CbYCrY"> |
| | | <summary> |
| | | <para><ch>YCbCr601_422_8_CbYCrY</ch></para> |
| | | <para><en>YCbCr601_422_8_CbYCrY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr601_411_8_CbYYCrYY"> |
| | | <summary> |
| | | <para><ch>YCbCr601_411_8_CbYYCrYY</ch></para> |
| | | <para><en>YCbCr601_411_8_CbYYCrYY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr709_8_CbYCr"> |
| | | <summary> |
| | | <para><ch>YCbCr709_8_CbYCr</ch></para> |
| | | <para><en>YCbCr709_8_CbYCr</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr709_422_8"> |
| | | <summary> |
| | | <para><ch>YCbCr709_422_8</ch></para> |
| | | <para><en>YCbCr709_422_8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr709_422_8_CbYCrY"> |
| | | <summary> |
| | | <para><ch>YCbCr709_422_8_CbYCrY</ch></para> |
| | | <para><en>YCbCr709_422_8_CbYCrY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelYCbCr709_411_8_CbYYCrYY"> |
| | | <summary> |
| | | <para><ch>YCbCr709_411_8_CbYYCrYY</ch></para> |
| | | <para><en>YCbCr709_411_8_CbYYCrYY</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB8Planar"> |
| | | <summary> |
| | | <para><ch>RGB8Planar</ch></para> |
| | | <para><en>RGB8Planar</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB10Planar"> |
| | | <summary> |
| | | <para><ch>RGB10Planar</ch></para> |
| | | <para><en>RGB10Planar</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB12Planar"> |
| | | <summary> |
| | | <para><ch>RGB12Planar</ch></para> |
| | | <para><en>RGB12Planar</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPixelFormat.eidPixelRGB16Planar"> |
| | | <summary> |
| | | <para><ch>RGB16Planar</ch></para> |
| | | <para><en>RGB16Planar</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidReadState"> |
| | | <summary> |
| | | <para><ch>读ç ç¶æ</ch></para> |
| | | <para><en>Code reading state</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStateUnknown"> |
| | | <summary> |
| | | <para><ch>æªç¥</ch></para> |
| | | <para><en>Unknown</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStateNA"> |
| | | <summary> |
| | | <para><ch>æ æ</ch></para> |
| | | <para><en>Not available</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStateComplete"> |
| | | <summary> |
| | | <para><ch>å
¨é¨</ch></para> |
| | | <para><en>Complete</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStateNoRead"> |
| | | <summary> |
| | | <para><ch>æ æ¡ç </ch></para> |
| | | <para><en>No code was read</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStatePartial"> |
| | | <summary> |
| | | <para><ch>é¨å</ch></para> |
| | | <para><en>Partial</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStateFail"> |
| | | <summary> |
| | | <para><ch>失败</ch></para> |
| | | <para><en>Fail</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStatePhaseNA"> |
| | | <summary> |
| | | <para><ch>æ æ(Phase模å¼)</ch></para> |
| | | <para><en>Not available(Phase mode)</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStatePhaseComplete"> |
| | | <summary> |
| | | <para><ch>å
¨é¨(Phase模å¼)</ch></para> |
| | | <para><en>Complete(Phase mode)</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStatePhaseNoRead"> |
| | | <summary> |
| | | <para><ch>æ æ¡ç (Phase模å¼)</ch></para> |
| | | <para><en>No code was read(Phase mode)</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStatePhasePartial"> |
| | | <summary> |
| | | <para><ch>é¨å(Phase模å¼)</ch></para> |
| | | <para><en>Partial(Phase mode)</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidReadState.eidReadStatePhaseFail"> |
| | | <summary> |
| | | <para><ch>失败(Phase模å¼)</ch></para> |
| | | <para><en>Fail(Phase mode)</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidBarcodeType"> |
| | | <summary> |
| | | <para><ch>ç ç±»å</ch></para> |
| | | <para><en>Barcode type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeUnknown"> |
| | | <summary> |
| | | <para><ch>æªç¥</ch></para> |
| | | <para><en>Unknown</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeEAN8"> |
| | | <summary> |
| | | <para><ch>EAN8</ch></para> |
| | | <para><en>EAN8</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeEAN13"> |
| | | <summary> |
| | | <para><ch>EAN13</ch></para> |
| | | <para><en>EAN13 type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCode39"> |
| | | <summary> |
| | | <para><ch>Code39</ch></para> |
| | | <para><en>Code39</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCode93"> |
| | | <summary> |
| | | <para><ch>Code93</ch></para> |
| | | <para><en>Code93</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCode128"> |
| | | <summary> |
| | | <para><ch>Code128</ch></para> |
| | | <para><en>Code128</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeUPCA"> |
| | | <summary> |
| | | <para><ch>UPCA</ch></para> |
| | | <para><en>UPCA</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeUPCE"> |
| | | <summary> |
| | | <para><ch>UPCE</ch></para> |
| | | <para><en>UPCE</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeITF25"> |
| | | <summary> |
| | | <para><ch>ITF25</ch></para> |
| | | <para><en>ITF25</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCODABAR"> |
| | | <summary> |
| | | <para><ch>CODABAR</ch></para> |
| | | <para><en>CODABAR</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCODE128A"> |
| | | <summary> |
| | | <para><ch>CODE128A</ch></para> |
| | | <para><en>CODE128A</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCODE128B"> |
| | | <summary> |
| | | <para><ch>CODE128B</ch></para> |
| | | <para><en>CODE128B</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeCODE128C"> |
| | | <summary> |
| | | <para><ch>CODE128C</ch></para> |
| | | <para><en>CODE128C</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeQR"> |
| | | <summary> |
| | | <para><ch>QR</ch></para> |
| | | <para><en>QR</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeDM"> |
| | | <summary> |
| | | <para><ch>DM</ch></para> |
| | | <para><en>DM</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypePDF417"> |
| | | <summary> |
| | | <para><ch>PDF417</ch></para> |
| | | <para><en>PDF417</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidBarcodeType.eidCodeTypeVERICODE"> |
| | | <summary> |
| | | <para><ch>VERICODE</ch></para> |
| | | <para><en>VERICODE</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidConnectionState"> |
| | | <summary> |
| | | <para><ch>è¿æ¥äºä»¶ç±»å</ch></para> |
| | | <para><en>Connect event type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidConnectionState.eidConnStateOffline"> |
| | | <summary> |
| | | <para><ch>离线</ch></para> |
| | | <para><en>Offline</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidConnectionState.eidConnStateOnline"> |
| | | <summary> |
| | | <para><ch>å¨çº¿</ch></para> |
| | | <para><en>Online</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo"> |
| | | <summary> |
| | | <para><ch>GigE设å¤ä¿¡æ¯</ch></para> |
| | | <para><en>GigE device info</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo.macAddress"> |
| | | <summary> |
| | | <para><ch>设å¤Macå°å</ch></para> |
| | | <para><en>Device MAC Address</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo.ipAddress"> |
| | | <summary> |
| | | <para><ch>设å¤Ipå°å</ch></para> |
| | | <para><en>Device ip Address</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo.subnetMask"> |
| | | <summary> |
| | | <para><ch>åç½æ©ç </ch></para> |
| | | <para><en>SubnetMask</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo.defaultGateWay"> |
| | | <summary> |
| | | <para><ch>é»è®¤ç½å
³</ch></para> |
| | | <para><en>Default GateWay</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo.isIpValid"> |
| | | <summary> |
| | | <para><ch>Ipæ¯å¦ææ</ch></para> |
| | | <para><en>Ip valid</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidGigeDeviceInfo.chReserved"> |
| | | <summary> |
| | | <para><ch>ä¿ç</ch></para> |
| | | <para><en>Reserved field</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidDeviceInfo"> |
| | | <summary> |
| | | <para><ch>设å¤ä¿¡æ¯</ch></para> |
| | | <para><en>Device info</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.deviceType"> |
| | | <summary> |
| | | <para><ch>设å¤ç±»å«</ch></para> |
| | | <para><en>Device type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.interfaceType"> |
| | | <summary> |
| | | <para><ch>æ¥å£ç±»å«</ch></para> |
| | | <para><en>Interface type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.deviceID"> |
| | | <summary> |
| | | <para><ch>设å¤ID</ch></para> |
| | | <para><en>Device ID</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.cameraName"> |
| | | <summary> |
| | | <para><ch>ç¨æ·èªå®ä¹å</ch></para> |
| | | <para><en>User defined name</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.serialNumber"> |
| | | <summary> |
| | | <para><ch>设å¤åºåå·</ch></para> |
| | | <para><en>Device serial number</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.vendorName"> |
| | | <summary> |
| | | <para><ch>åå</ch></para> |
| | | <para><en>Device vendor</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.modelName"> |
| | | <summary> |
| | | <para><ch>设å¤åå·</ch></para> |
| | | <para><en>Device model</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.manufactureInfo"> |
| | | <summary> |
| | | <para><ch>设å¤å¶é ä¿¡æ¯</ch></para> |
| | | <para><en>Device manufacture</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.deviceVersion"> |
| | | <summary> |
| | | <para><ch>设å¤çæ¬</ch></para> |
| | | <para><en>Device version</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.interfaceName"> |
| | | <summary> |
| | | <para><ch>æ¥å£å</ch></para> |
| | | <para><en>Interface name</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reseved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.stSpecialInfo"> |
| | | <summary> |
| | | <para><ch>å
·ä½è®¾å¤ä¿¡æ¯</ch></para> |
| | | <para><en>special device Info</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidDeviceInfo.SPECIAL_INFO"> |
| | | <summary> |
| | | <para><ch>å
·ä½è®¾å¤ä¿¡æ¯</ch></para> |
| | | <para><en>special device Info</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceInfo.SPECIAL_INFO.gigeDeviceInfo"> |
| | | <summary> |
| | | <para><ch>Gige设å¤ä¿¡æ¯</ch></para> |
| | | <para><en>Gige device info</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidDeviceList"> |
| | | <summary> |
| | | <para><ch>设å¤ä¿¡æ¯å表</ch></para> |
| | | <para><en>Device information list</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceList.num"> |
| | | <summary> |
| | | <para><ch>è®¾å¤æ°é</ch></para> |
| | | <para><en>Device Number</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceList.infos"> |
| | | <summary> |
| | | <para><ch>设å¤ä¿¡æ¯å表</ch></para> |
| | | <para><en>Device information list</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidDeviceList.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidErrorList"> |
| | | <summary> |
| | | <para><ch>é误å表</ch></para> |
| | | <para><en>Error list</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidErrorList.num"> |
| | | <summary> |
| | | <para><ch>失败ç屿§æ°é</ch></para> |
| | | <para><en>Number of failed features</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidErrorList.names"> |
| | | <summary> |
| | | <para><ch>å¤±è´¥å±æ§åå表</ch></para> |
| | | <para><en>Error feature name list</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidErrorList.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidIntFeatureInfo"> |
| | | <summary> |
| | | <para><ch>æ´å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>int feature information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidIntFeatureInfo.current"> |
| | | <summary> |
| | | <para><ch>å½åå¼</ch></para> |
| | | <para><en>Current value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidIntFeatureInfo.min"> |
| | | <summary> |
| | | <para><ch>æå°å¼</ch></para> |
| | | <para><en>Minimum value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidIntFeatureInfo.max"> |
| | | <summary> |
| | | <para><ch>æå¤§å¼</ch></para> |
| | | <para><en>Maximum value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidIntFeatureInfo.inc"> |
| | | <summary> |
| | | <para><ch>å¢é</ch></para> |
| | | <para><en>Increment</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidIntFeatureInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo"> |
| | | <summary> |
| | | <para><ch>æµ®ç¹å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>float feature information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo.current"> |
| | | <summary> |
| | | <para><ch>å½åå¼</ch></para> |
| | | <para><en>Current value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo.min"> |
| | | <summary> |
| | | <para><ch>æå°å¼</ch></para> |
| | | <para><en>Minimum value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo.max"> |
| | | <summary> |
| | | <para><ch>æå¤§å¼</ch></para> |
| | | <para><en>Maximum value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo.unit"> |
| | | <summary> |
| | | <para><ch>åä½</ch></para> |
| | | <para><en>Unit</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFloatFeatureInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidStringFeatureInfo"> |
| | | <summary> |
| | | <para><ch>å符串å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>String feature information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidStringFeatureInfo.maxLen"> |
| | | <summary> |
| | | <para><ch>æå¤§é¿åº¦</ch></para> |
| | | <para><en>The maximum length of the String</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidStringFeatureInfo.value"> |
| | | <summary> |
| | | <para><ch>å½åå¼</ch></para> |
| | | <para><en>Current value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidStringFeatureInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidEnumFeatureEntry"> |
| | | <summary> |
| | | <para><ch>æä¸¾å屿§æ¡ç®</ch></para> |
| | | <para><en>enum feature entry</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidEnumFeatureEntry.value"> |
| | | <summary> |
| | | <para><ch>å¼</ch></para> |
| | | <para><en>Value</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidEnumFeatureEntry.name"> |
| | | <summary> |
| | | <para><ch>åç§°</ch></para> |
| | | <para><en>Current Name</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidEnumFeatureEntryList"> |
| | | <summary> |
| | | <para><ch>æä¸¾å屿§ä¿¡æ¯</ch></para> |
| | | <para><en>enum feature information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidEnumFeatureEntryList.num"> |
| | | <summary> |
| | | <para><ch>æ°é</ch></para> |
| | | <para><en>count</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidEnumFeatureEntryList.entryList"> |
| | | <summary> |
| | | <para><ch>æ¡ç®å表</ch></para> |
| | | <para><en>Entry list</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidPoint"> |
| | | <summary> |
| | | <para><ch>äºç»´åæ ç¹</ch></para> |
| | | <para><en>2D coordinate point</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPoint.x"> |
| | | <summary> |
| | | <para><ch>xåæ </ch></para> |
| | | <para><en>x-coordinate</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidPoint.y"> |
| | | <summary> |
| | | <para><ch>yåæ </ch></para> |
| | | <para><en>y-coordinate</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidCodeInfo"> |
| | | <summary> |
| | | <para><ch>æ¡ç ä¿¡æ¯</ch></para> |
| | | <para><en>Barcode information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidCodeInfo.type"> |
| | | <summary> |
| | | <para><ch>ç±»å</ch></para> |
| | | <para><en>Code type</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidCodeInfo.ppm"> |
| | | <summary> |
| | | <para><ch>PPM</ch></para> |
| | | <para><en>PPM</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidCodeInfo.position"> |
| | | <summary> |
| | | <para><ch>ä½ç½®, 4个ç¹</ch></para> |
| | | <para><en>Position, 4 points</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidCodeInfo.data"> |
| | | <summary> |
| | | <para><ch>å
容</ch></para> |
| | | <para><en>Code content</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidCodeInfo.typeName"> |
| | | <summary> |
| | | <para><ch>ç±»ååç§°</ch></para> |
| | | <para><en>Code type name</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidCodeInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidFrameInfo"> |
| | | <summary> |
| | | <para><ch>帧信æ¯</ch></para> |
| | | <para><en>Frame information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.id"> |
| | | <summary> |
| | | <para><ch>帧ID</ch></para> |
| | | <para><en>Frame block ID</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.timestamp"> |
| | | <summary> |
| | | <para><ch>æ¶é´æ³</ch></para> |
| | | <para><en>Timestamp</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.width"> |
| | | <summary> |
| | | <para><ch>å¾å宽度</ch></para> |
| | | <para><en>Image width</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.height"> |
| | | <summary> |
| | | <para><ch>å¾åé«åº¦</ch></para> |
| | | <para><en>Image height</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.format"> |
| | | <summary> |
| | | <para><ch>åç´ æ ¼å¼</ch></para> |
| | | <para><en>Pixel format</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.readState"> |
| | | <summary> |
| | | <para><ch>读ç ç¶æ</ch></para> |
| | | <para><en>Code reading state</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.codeNum"> |
| | | <summary> |
| | | <para><ch>æ¡ç æ°é</ch></para> |
| | | <para><en>Number of barcodes</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.imageDataLen"> |
| | | <summary> |
| | | <para><ch>å¾åæ°æ®é¿åº¦</ch></para> |
| | | <para><en>Length of image data</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.imageData"> |
| | | <summary> |
| | | <para><ch>å¾åæ°æ®</ch></para> |
| | | <para><en>Image data</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.codeList"> |
| | | <summary> |
| | | <para><ch>æ¡ç ä¿¡æ¯å</ch></para> |
| | | <para><en>Barcode information list</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.isJpeg"> |
| | | <summary> |
| | | <para><ch>æ¯å¦jpegå¾</ch></para> |
| | | <para><en>Is jpeg image</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidFrameInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidConnectionInfo"> |
| | | <summary> |
| | | <para><ch>è¿æ¥ä¿¡æ¯</ch></para> |
| | | <para><en>Connetion information</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidConnectionInfo.state"> |
| | | <summary> |
| | | <para><ch>è¿æ¥ç¶æ</ch></para> |
| | | <para><en>Connetion state</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="F:EasyIDSDK_Net.EidCamera.EidConnectionInfo.reserved"> |
| | | <summary> |
| | | <para><ch>é¢çä½</ch></para> |
| | | <para><en>Reserved</en></para> |
| | | </summary> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidFrameCallback"> |
| | | <summary> |
| | | <para><ch>å¸§æ°æ®åè°å½æ°</ch></para> |
| | | <para><en>Frame data callback function</en></para> |
| | | </summary> |
| | | <param name="frameInfo"><para><ch>帧信æ¯</ch></para><para><en>frameInfo Frame info</en></para></param> |
| | | <param name="userData"><para><ch>ç¨æ·æ°æ®</ch></para><para><en>userData User data</en></para></param> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidConnectionCallback"> |
| | | <summary> |
| | | <para><ch>设å¤è¿æ¥ä¿¡æ¯åè°å½æ°</ch></para> |
| | | <para><en>Device connection information callback function</en></para> |
| | | </summary> |
| | | <param name="frameInfo"><para><ch>è¿æ¥ä¿¡æ¯</ch></para><para><en>info Connection infomation</en></para></param> |
| | | <param name="userData"><para><ch>ç¨æ·æ°æ®</ch></para><para><en>userData User data</en></para></param> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidFeatureUpdateCallback"> |
| | | <summary> |
| | | <para><ch>设å¤å±æ§æ´æ°åè°å½æ°</ch></para> |
| | | <para><en>Device feature update callback function</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>屿§åç§°</ch></para><para><en>name Device feature name</en></para></param> |
| | | <param name="userData"><para><ch>ç¨æ·æ°æ®</ch></para><para><en>userData User data</en></para></param> |
| | | </member> |
| | | <member name="T:EasyIDSDK_Net.EidCamera.EidEnumFeatureChildrenCallback"> |
| | | <summary> |
| | | <para><ch>æä¸¾å屿§çåè°å½æ°, å¨ eidEnumFeatureChildren 彿°ä¸ä½¿ç¨, æ¯æ¬¡æ¥æ¶ä¸ä¸ªå屿§çåç§°</ch></para> |
| | | <para><en>Callback function used with the eidEnumFeatureChildren function. It receives children feature names</en></para> |
| | | </summary> |
| | | <param name="name"><para><ch>å屿§åç§°</ch></para><para><en>name child feature name</en></para></param> |
| | | <param name="userData"><para><ch>ç¨æ·æ°æ®</ch></para><para><en>userData User data</en></para></param> |
| | | </member> |
| | | </members> |
| | | </doc> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # ======================= |
| | | # root Setting |
| | | # ======================= |
| | | log4cpp.rootCategory = INFO |
| | | |
| | | # ======================= |
| | | # SDK Log Setting |
| | | # ======================= |
| | | log4cpp.category.mvsdk = INFO, a_mvsdk |
| | | log4cpp.appender.a_mvsdk = DailyRollingFileAppender |
| | | log4cpp.appender.a_mvsdk.fileName = MVSDK.log |
| | | log4cpp.appender.a_mvsdk.layout = org.apache.log4cpp.PatternLayout |
| | | log4cpp.appender.a_mvsdk.layout.ConversionPattern = %d{%Y-%m-%d %H:%M:%S.%l} %p [tid:%t]%m%n |
| | | log4cpp.appender.a_mvsdk.maxDaysKeep = 5 |
| | | |