| LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/Forms/Pages/UserManagementPage/UserManagementEditPage.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/Forms/Pages/UserManagementPage/UserManagementEditPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/VisionForm.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/VisionForm.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/VisionForm.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_VisionProcesses/Cameras/LBCameras/PHM6000Camera.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,381 @@ namespace LB_SmartVision.Forms.Pages.HistoricalData { partial class HistoricalDataEditPage { /// <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() { grpHisData = new ReaLTaiizor.Controls.ParrotGroupBox(); tableLayoutPanel1 = new TableLayoutPanel(); tableLayoutPanel2 = new TableLayoutPanel(); tableLayoutPanel3 = new TableLayoutPanel(); tableLayoutPanelSN = new TableLayoutPanel(); labelSN = new Label(); textBoxSN = new TextBox(); tableLayoutPanel5 = new TableLayoutPanel(); labelSearchBasis = new Label(); comboBoxSearchBasis = new ComboBox(); contentContainer = new Panel(); tableLayoutPanelTimeSearch = new TableLayoutPanel(); dateTimePickerEnd = new DateTimePicker(); dateTimePickerStart = new DateTimePicker(); labelEndTime = new Label(); labelStartTime = new Label(); dataGridViewHD = new DataGridView(); tableLayoutPanel4 = new TableLayoutPanel(); hopeButton1 = new ReaLTaiizor.Controls.HopeButton(); hopeButton2 = new ReaLTaiizor.Controls.HopeButton(); grpHisData.SuspendLayout(); tableLayoutPanel1.SuspendLayout(); tableLayoutPanel2.SuspendLayout(); tableLayoutPanel3.SuspendLayout(); tableLayoutPanelSN.SuspendLayout(); tableLayoutPanel5.SuspendLayout(); contentContainer.SuspendLayout(); tableLayoutPanelTimeSearch.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewHD).BeginInit(); tableLayoutPanel4.SuspendLayout(); SuspendLayout(); // // grpHisData // grpHisData.BorderColor = Color.DodgerBlue; grpHisData.BorderWidth = 1; grpHisData.Controls.Add(tableLayoutPanel1); grpHisData.Dock = DockStyle.Fill; grpHisData.Font = new Font("å®ä½", 12F); grpHisData.Location = new Point(0, 0); grpHisData.Name = "grpHisData"; grpHisData.ShowText = true; grpHisData.Size = new Size(866, 580); grpHisData.TabIndex = 0; grpHisData.TabStop = false; grpHisData.Text = "å岿°æ®æ¥è¯¢"; grpHisData.TextColor = Color.DodgerBlue; // // tableLayoutPanel1 // tableLayoutPanel1.ColumnCount = 1; tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F)); tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 0); tableLayoutPanel1.Controls.Add(tableLayoutPanel4, 0, 1); tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel1.Location = new Point(3, 26); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 2; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanel1.Size = new Size(860, 551); tableLayoutPanel1.TabIndex = 1; // // tableLayoutPanel2 // tableLayoutPanel2.ColumnCount = 2; tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 340F)); tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel2.Controls.Add(tableLayoutPanel3, 0, 0); tableLayoutPanel2.Controls.Add(dataGridViewHD, 1, 0); tableLayoutPanel2.Dock = DockStyle.Fill; tableLayoutPanel2.Location = new Point(3, 3); tableLayoutPanel2.Name = "tableLayoutPanel2"; tableLayoutPanel2.RowCount = 1; tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutPanel2.Size = new Size(854, 500); tableLayoutPanel2.TabIndex = 0; // // tableLayoutPanel3 // tableLayoutPanel3.ColumnCount = 1; tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 135F)); tableLayoutPanel3.Controls.Add(tableLayoutPanelSN, 0, 2); tableLayoutPanel3.Controls.Add(tableLayoutPanel5, 0, 0); tableLayoutPanel3.Controls.Add(contentContainer, 0, 1); tableLayoutPanel3.Location = new Point(3, 3); tableLayoutPanel3.Name = "tableLayoutPanel3"; tableLayoutPanel3.RowCount = 3; tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 90F)); tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanel3.Size = new Size(334, 180); tableLayoutPanel3.TabIndex = 0; // // tableLayoutPanelSN // tableLayoutPanelSN.ColumnCount = 2; tableLayoutPanelSN.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 135F)); tableLayoutPanelSN.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanelSN.Controls.Add(labelSN, 0, 0); tableLayoutPanelSN.Controls.Add(textBoxSN, 1, 0); tableLayoutPanelSN.Location = new Point(3, 138); tableLayoutPanelSN.Name = "tableLayoutPanelSN"; tableLayoutPanelSN.RowCount = 1; tableLayoutPanelSN.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanelSN.Size = new Size(328, 39); tableLayoutPanelSN.TabIndex = 7; // // labelSN // labelSN.AutoSize = true; labelSN.Dock = DockStyle.Fill; labelSN.ForeColor = SystemColors.Control; labelSN.Location = new Point(3, 0); labelSN.Name = "labelSN"; labelSN.Size = new Size(129, 39); labelSN.TabIndex = 6; labelSN.Text = "SNå·"; labelSN.TextAlign = ContentAlignment.MiddleLeft; // // textBoxSN // textBoxSN.Dock = DockStyle.Fill; textBoxSN.Location = new Point(138, 5); textBoxSN.Margin = new Padding(3, 5, 3, 3); textBoxSN.Name = "textBoxSN"; textBoxSN.Size = new Size(187, 30); textBoxSN.TabIndex = 7; // // tableLayoutPanel5 // tableLayoutPanel5.ColumnCount = 2; tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 135F)); tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel5.Controls.Add(labelSearchBasis, 0, 0); tableLayoutPanel5.Controls.Add(comboBoxSearchBasis, 1, 0); tableLayoutPanel5.Dock = DockStyle.Fill; tableLayoutPanel5.Location = new Point(3, 3); tableLayoutPanel5.Name = "tableLayoutPanel5"; tableLayoutPanel5.RowCount = 1; tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel5.Size = new Size(328, 39); tableLayoutPanel5.TabIndex = 0; // // labelSearchBasis // labelSearchBasis.AutoSize = true; labelSearchBasis.Dock = DockStyle.Fill; labelSearchBasis.ForeColor = SystemColors.Control; labelSearchBasis.Location = new Point(3, 0); labelSearchBasis.Name = "labelSearchBasis"; labelSearchBasis.Size = new Size(129, 39); labelSearchBasis.TabIndex = 0; labelSearchBasis.Text = "æ¥è¯¢ä¾æ®"; labelSearchBasis.TextAlign = ContentAlignment.MiddleLeft; // // comboBoxSearchBasis // comboBoxSearchBasis.Dock = DockStyle.Fill; comboBoxSearchBasis.FormattingEnabled = true; comboBoxSearchBasis.Location = new Point(138, 5); comboBoxSearchBasis.Margin = new Padding(3, 5, 3, 3); comboBoxSearchBasis.Name = "comboBoxSearchBasis"; comboBoxSearchBasis.Size = new Size(187, 28); comboBoxSearchBasis.TabIndex = 1; comboBoxSearchBasis.SelectedIndexChanged += comboBoxSearchBasis_SelectedIndexChanged; // // contentContainer // contentContainer.Controls.Add(tableLayoutPanelTimeSearch); contentContainer.Location = new Point(3, 48); contentContainer.Name = "contentContainer"; contentContainer.Size = new Size(328, 84); contentContainer.TabIndex = 6; // // tableLayoutPanelTimeSearch // tableLayoutPanelTimeSearch.ColumnCount = 2; tableLayoutPanelTimeSearch.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 135F)); tableLayoutPanelTimeSearch.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanelTimeSearch.Controls.Add(dateTimePickerEnd, 1, 1); tableLayoutPanelTimeSearch.Controls.Add(dateTimePickerStart, 1, 0); tableLayoutPanelTimeSearch.Controls.Add(labelEndTime, 0, 1); tableLayoutPanelTimeSearch.Controls.Add(labelStartTime, 0, 0); tableLayoutPanelTimeSearch.Dock = DockStyle.Fill; tableLayoutPanelTimeSearch.Location = new Point(0, 0); tableLayoutPanelTimeSearch.Name = "tableLayoutPanelTimeSearch"; tableLayoutPanelTimeSearch.RowCount = 2; tableLayoutPanelTimeSearch.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanelTimeSearch.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanelTimeSearch.Size = new Size(328, 84); tableLayoutPanelTimeSearch.TabIndex = 8; // // dateTimePickerEnd // dateTimePickerEnd.Dock = DockStyle.Fill; dateTimePickerEnd.Location = new Point(138, 50); dateTimePickerEnd.Margin = new Padding(3, 5, 3, 3); dateTimePickerEnd.MaxDate = new DateTime(2100, 1, 1, 0, 0, 0, 0); dateTimePickerEnd.MinDate = new DateTime(2020, 1, 1, 0, 0, 0, 0); dateTimePickerEnd.Name = "dateTimePickerEnd"; dateTimePickerEnd.Size = new Size(187, 30); dateTimePickerEnd.TabIndex = 9; // // dateTimePickerStart // dateTimePickerStart.Dock = DockStyle.Fill; dateTimePickerStart.Location = new Point(138, 5); dateTimePickerStart.Margin = new Padding(3, 5, 3, 3); dateTimePickerStart.MaxDate = new DateTime(2100, 1, 1, 0, 0, 0, 0); dateTimePickerStart.MinDate = new DateTime(2020, 1, 1, 0, 0, 0, 0); dateTimePickerStart.Name = "dateTimePickerStart"; dateTimePickerStart.Size = new Size(187, 30); dateTimePickerStart.TabIndex = 8; dateTimePickerStart.ValueChanged += dateTimePickerStart_ValueChanged; // // labelEndTime // labelEndTime.AutoSize = true; labelEndTime.Dock = DockStyle.Fill; labelEndTime.ForeColor = SystemColors.Control; labelEndTime.Location = new Point(3, 45); labelEndTime.Name = "labelEndTime"; labelEndTime.Size = new Size(129, 45); labelEndTime.TabIndex = 2; labelEndTime.Text = "æ¥è¯¢ç»ææ¥æ"; labelEndTime.TextAlign = ContentAlignment.MiddleLeft; // // labelStartTime // labelStartTime.AutoSize = true; labelStartTime.Dock = DockStyle.Fill; labelStartTime.ForeColor = SystemColors.Control; labelStartTime.Location = new Point(3, 0); labelStartTime.Name = "labelStartTime"; labelStartTime.Size = new Size(129, 45); labelStartTime.TabIndex = 0; labelStartTime.Text = "æ¥è¯¢å¼å§æ¥æ"; labelStartTime.TextAlign = ContentAlignment.MiddleLeft; // // dataGridViewHD // dataGridViewHD.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewHD.Dock = DockStyle.Fill; dataGridViewHD.Location = new Point(343, 3); dataGridViewHD.Name = "dataGridViewHD"; dataGridViewHD.RowHeadersWidth = 51; dataGridViewHD.Size = new Size(508, 494); dataGridViewHD.TabIndex = 1; // // tableLayoutPanel4 // 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.Controls.Add(hopeButton1, 0, 0); tableLayoutPanel4.Controls.Add(hopeButton2, 1, 0); tableLayoutPanel4.Location = new Point(657, 509); tableLayoutPanel4.Name = "tableLayoutPanel4"; tableLayoutPanel4.RowCount = 1; tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutPanel4.Size = new Size(200, 39); tableLayoutPanel4.TabIndex = 1; // // hopeButton1 // hopeButton1.BorderColor = Color.FromArgb(220, 223, 230); hopeButton1.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary; hopeButton1.DangerColor = Color.FromArgb(245, 108, 108); hopeButton1.DefaultColor = Color.FromArgb(255, 255, 255); hopeButton1.Font = new Font("Segoe UI", 12F); hopeButton1.HoverTextColor = Color.FromArgb(48, 49, 51); hopeButton1.InfoColor = Color.FromArgb(144, 147, 153); hopeButton1.Location = new Point(3, 3); hopeButton1.Name = "hopeButton1"; hopeButton1.PrimaryColor = Color.FromArgb(64, 158, 255); hopeButton1.Size = new Size(94, 33); hopeButton1.SuccessColor = Color.FromArgb(103, 194, 58); hopeButton1.TabIndex = 0; hopeButton1.Text = "æ¥è¯¢"; hopeButton1.TextColor = Color.White; hopeButton1.WarningColor = Color.FromArgb(230, 162, 60); // // hopeButton2 // hopeButton2.BorderColor = Color.FromArgb(220, 223, 230); hopeButton2.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary; hopeButton2.DangerColor = Color.FromArgb(245, 108, 108); hopeButton2.DefaultColor = Color.FromArgb(255, 255, 255); hopeButton2.Font = new Font("Segoe UI", 12F); hopeButton2.HoverTextColor = Color.FromArgb(48, 49, 51); hopeButton2.InfoColor = Color.FromArgb(144, 147, 153); hopeButton2.Location = new Point(103, 3); hopeButton2.Name = "hopeButton2"; hopeButton2.PrimaryColor = Color.FromArgb(64, 158, 255); hopeButton2.Size = new Size(94, 33); hopeButton2.SuccessColor = Color.FromArgb(103, 194, 58); hopeButton2.TabIndex = 1; hopeButton2.Text = "导åº"; hopeButton2.TextColor = Color.White; hopeButton2.WarningColor = Color.FromArgb(230, 162, 60); // // HistoricalDataEditPage // AutoScaleMode = AutoScaleMode.Inherit; BackColor = Color.FromArgb(32, 41, 50); Controls.Add(grpHisData); Name = "HistoricalDataEditPage"; Size = new Size(866, 580); grpHisData.ResumeLayout(false); tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel2.ResumeLayout(false); tableLayoutPanel3.ResumeLayout(false); tableLayoutPanelSN.ResumeLayout(false); tableLayoutPanelSN.PerformLayout(); tableLayoutPanel5.ResumeLayout(false); tableLayoutPanel5.PerformLayout(); contentContainer.ResumeLayout(false); tableLayoutPanelTimeSearch.ResumeLayout(false); tableLayoutPanelTimeSearch.PerformLayout(); ((System.ComponentModel.ISupportInitialize)dataGridViewHD).EndInit(); tableLayoutPanel4.ResumeLayout(false); ResumeLayout(false); } #endregion private ReaLTaiizor.Controls.ParrotGroupBox grpHisData; private TableLayoutPanel tableLayoutPanel1; private TableLayoutPanel tableLayoutPanel2; private TableLayoutPanel tableLayoutPanel3; private DataGridView dataGridViewHD; private TableLayoutPanel tableLayoutPanel4; private ReaLTaiizor.Controls.HopeButton hopeButton1; private ReaLTaiizor.Controls.HopeButton hopeButton2; private TableLayoutPanel tableLayoutPanel5; private Label labelSearchBasis; private TableLayoutPanel tableLayoutPanelSN; private Label labelSN; private TextBox textBoxSN; private ComboBox comboBoxSearchBasis; private Panel contentContainer; private TableLayoutPanel tableLayoutPanelTimeSearch; private DateTimePicker dateTimePickerEnd; private DateTimePicker dateTimePickerStart; private Label labelEndTime; private Label labelStartTime; } } LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,155 @@ using LB_SmartVisionCommon; 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_SmartVision.Forms.Pages.HistoricalData { public partial class HistoricalDataEditPage : UserControl { public Action<string, LogInfoType> LogInfo; private int row2OriginalHeight; private int row3OriginalHeight; public HistoricalDataEditPage() { Name = "HistoricalDataEditPage"; Text = "å岿°æ®æ¥è¯¢"; InitializeComponent(); // ä¿ååå§è¡é«åº¦ row2OriginalHeight = (int)tableLayoutPanel3.RowStyles[1].Height; row3OriginalHeight = (int)tableLayoutPanel3.RowStyles[2].Height; InitializeDataGridView(); InitializeComboBox(); } /// <summary> /// æ°æ®æ¾ç¤ºè¡¨æ ¼åå§å /// </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 = "缺é·å¤§å°"; dataGridViewHD.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; // ç¦æ¢ç¼è¾åå æ ¼ï¼å¯éï¼ dataGridViewHD.ReadOnly = true; // å 许å¤è¡éæ©ï¼å¯éï¼ dataGridViewHD.MultiSelect = false; // æ¾ç¤ºè¡æ é¢ï¼å¯éï¼ dataGridViewHD.RowHeadersVisible = true; } /// <summary> /// 鿩便®ä¸ææ¡åå§å /// </summary> private void InitializeComboBox() { comboBoxSearchBasis.Items.Add("æ¥æ"); comboBoxSearchBasis.Items.Add("SNå·"); // 设置é»è®¤éæ©é¡¹ comboBoxSearchBasis.SelectedIndex = 0; } /// <summary> /// ä¸ææ¡æ§å¶é项è§å¾åæ¢ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void comboBoxSearchBasis_SelectedIndexChanged(object sender, EventArgs e) { ComboBox cb = sender as ComboBox; if (cb.SelectedIndex == 0) { ShowRow2(); } else if (cb.SelectedIndex == 1) { ShowRow3(); } } private void ShowRow2() { // æ¾ç¤ºRow2ï¼æ¢å¤é«åº¦ï¼ tableLayoutPanel3.RowStyles[1].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[1].Height = row2OriginalHeight; // éèRow3ï¼é«åº¦è®¾ä¸º0ï¼ tableLayoutPanel3.RowStyles[2].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[2].Height = 0; // æ¾ç¤ºRow2ä¸çæ§ä»¶ foreach (Control ctrl in tableLayoutPanel3.Controls) { int row = tableLayoutPanel3.GetRow(ctrl); if (row == 1) ctrl.Visible = true; else if (row == 2) ctrl.Visible = false; } } private void ShowRow3() { // éèRow2ï¼é«åº¦è®¾ä¸º0ï¼ tableLayoutPanel3.RowStyles[1].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[1].Height = 0; // æ¾ç¤ºRow3ï¼æ¢å¤é«åº¦ï¼ tableLayoutPanel3.RowStyles[2].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[2].Height = row3OriginalHeight; // æ¾ç¤ºRow3ä¸çæ§ä»¶ foreach (Control ctrl in tableLayoutPanel3.Controls) { int row = tableLayoutPanel3.GetRow(ctrl); if (row == 1) ctrl.Visible = false; else if (row == 2) ctrl.Visible = true; } } private void dateTimePickerStart_ValueChanged(object sender, EventArgs e) { dateTimePickerEnd.MinDate = dateTimePickerStart.Value; } } } LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,120 @@ <?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> LB_SmartVision/Forms/Pages/UserManagementPage/UserManagementEditPage.Designer.cs
@@ -85,12 +85,12 @@ tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 0); tableLayoutPanel1.Controls.Add(tableLayoutPanel4, 0, 1); tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel1.Location = new Point(3, 22); tableLayoutPanel1.Location = new Point(3, 26); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 2; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanel1.Size = new Size(860, 555); tableLayoutPanel1.Size = new Size(860, 551); tableLayoutPanel1.TabIndex = 1; // // tableLayoutPanel2 @@ -105,7 +105,7 @@ tableLayoutPanel2.Name = "tableLayoutPanel2"; tableLayoutPanel2.RowCount = 1; tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel2.Size = new Size(854, 504); tableLayoutPanel2.Size = new Size(854, 500); tableLayoutPanel2.TabIndex = 0; // // tableLayoutPanel3 @@ -139,7 +139,7 @@ textBoxEmployeeID.Location = new Point(107, 187); textBoxEmployeeID.Margin = new Padding(7); textBoxEmployeeID.Name = "textBoxEmployeeID"; textBoxEmployeeID.Size = new Size(219, 26); textBoxEmployeeID.Size = new Size(219, 30); textBoxEmployeeID.TabIndex = 9; // // labelEmployeeID @@ -159,7 +159,7 @@ textBoxName.Location = new Point(107, 142); textBoxName.Margin = new Padding(7); textBoxName.Name = "textBoxName"; textBoxName.Size = new Size(219, 26); textBoxName.Size = new Size(219, 30); textBoxName.TabIndex = 7; // // labelName @@ -191,7 +191,7 @@ textBoxPassword.Location = new Point(107, 52); textBoxPassword.Margin = new Padding(7); textBoxPassword.Name = "textBoxPassword"; textBoxPassword.Size = new Size(219, 26); textBoxPassword.Size = new Size(219, 30); textBoxPassword.TabIndex = 3; // // labelPassword @@ -223,7 +223,7 @@ textBoxUsername.Location = new Point(107, 7); textBoxUsername.Margin = new Padding(7); textBoxUsername.Name = "textBoxUsername"; textBoxUsername.Size = new Size(219, 26); textBoxUsername.Size = new Size(219, 30); textBoxUsername.TabIndex = 1; // // comboBoxPermission @@ -233,7 +233,7 @@ comboBoxPermission.Location = new Point(107, 97); comboBoxPermission.Margin = new Padding(7); comboBoxPermission.Name = "comboBoxPermission"; comboBoxPermission.Size = new Size(219, 24); comboBoxPermission.Size = new Size(219, 28); comboBoxPermission.TabIndex = 5; // // dataGridViewUM @@ -243,7 +243,7 @@ dataGridViewUM.Location = new Point(343, 3); dataGridViewUM.Name = "dataGridViewUM"; dataGridViewUM.RowHeadersWidth = 51; dataGridViewUM.Size = new Size(508, 498); dataGridViewUM.Size = new Size(508, 494); dataGridViewUM.TabIndex = 1; // // tableLayoutPanel4 @@ -258,7 +258,7 @@ tableLayoutPanel4.Controls.Add(btnFind, 0, 0); tableLayoutPanel4.Controls.Add(btnDel, 3, 0); tableLayoutPanel4.Controls.Add(btnAdd, 2, 0); tableLayoutPanel4.Location = new Point(457, 513); tableLayoutPanel4.Location = new Point(457, 509); tableLayoutPanel4.Name = "tableLayoutPanel4"; tableLayoutPanel4.RowCount = 1; tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); LB_SmartVision/Forms/Pages/UserManagementPage/UserManagementEditPage.cs
@@ -20,12 +20,10 @@ public partial class UserManagementEditPage : UserControl { public Action<string, LogInfoType> LogInfo; RunSettingPage RunSettingPage = new RunSettingPage(); LayoutPage LayoutPage = new LayoutPage(); CsvPage CsvPage = new CsvPage(); public UserManagementEditPage() { Name = "UserManagementEditPage"; Name = "UserManagementEditPage"; Text = "ç¨æ·ç®¡ç设置"; InitializeComponent(); @@ -76,11 +74,14 @@ private void InitializeComboBox() { // æ·»å æéé项 comboBoxPermission.Items.Add("管çå"); comboBoxPermission.Items.Add("æä½å"); foreach (var item in Enum.GetValues(typeof(UserPermission))) { comboBoxPermission.Items.Add(item.ToString()); } //comboBoxPermission.Items.Add("æä½å"); // 设置é»è®¤éæ©é¡¹ comboBoxPermission.SelectedIndex = 1; comboBoxPermission.SelectedIndex = 0; } private void ClearInputFields() @@ -149,5 +150,7 @@ MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } LB_SmartVision/VisionForm.Designer.cs
@@ -61,11 +61,12 @@ 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; @@ -75,7 +76,8 @@ // 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; // @@ -86,8 +88,9 @@ // sc_VisionForm.Panel2 // sc_VisionForm.Panel2.Controls.Add(grb_Info); sc_VisionForm.Size = new Size(1132, 625); sc_VisionForm.SplitterDistance = 478; sc_VisionForm.Size = new Size(1416, 781); sc_VisionForm.SplitterDistance = 596; sc_VisionForm.SplitterWidth = 5; sc_VisionForm.TabIndex = 1; // // tlp_MainView @@ -102,23 +105,24 @@ 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, 478); tlp_MainView.Size = new Size(1416, 596); tlp_MainView.TabIndex = 1; tlp_MainView.TagString = null; // // materialTabControl // 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, 395); materialTabControl.Size = new Size(1412, 493); materialTabControl.TabIndex = 0; // // tlp_VisionMainOperator @@ -139,11 +143,12 @@ tlp_VisionMainOperator.Controls.Add(btn_GlobalVar, 7, 0); tlp_VisionMainOperator.Controls.Add(com_ProductName, 8, 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; // @@ -152,10 +157,11 @@ ckb_AllowRun.Dock = DockStyle.Fill; ckb_AllowRun.Font = new Font("å®ä½", 12F, 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 = "è¿è¡æ¨¡å¼"; // @@ -170,11 +176,12 @@ 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.Location = new Point(160, 4); btn_Login.Margin = new Padding(4); 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.Size = new Size(148, 23); btn_Login.TabIndex = 3; btn_Login.Text = "ç¨æ·ç»å½"; btn_Login.TextAlignment = StringAlignment.Center; @@ -191,11 +198,12 @@ 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.Location = new Point(1096, 4); btn_GlobalVar.Margin = new Padding(4); 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.Size = new Size(148, 23); btn_GlobalVar.TabIndex = 4; btn_GlobalVar.Text = "å ¨å±åé"; btn_GlobalVar.TextAlignment = StringAlignment.Center; @@ -209,9 +217,10 @@ com_ProductName.EnabledCalc = true; 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; // @@ -220,10 +229,11 @@ 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 @@ -234,11 +244,11 @@ 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, 143); grb_Info.Padding = new Padding(0, 40, 0, 0); grb_Info.Size = new Size(1416, 180); grb_Info.TabIndex = 1; grb_Info.Text = "æ¥å¿æ¾ç¤ºåºï¼"; grb_Info.TextAlignment = ContentAlignment.MiddleLeft; @@ -248,13 +258,13 @@ 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, 111); rich_Info.Size = new Size(1416, 140); rich_Info.TabIndex = 0; rich_Info.TextAlignment = ContentAlignment.MiddleLeft; // @@ -268,7 +278,8 @@ cb_VisionForm.EnableMaximizeButton = true; cb_VisionForm.EnableMinimizeButton = true; cb_VisionForm.ForeColor = Color.FromArgb(155, 155, 155); cb_VisionForm.Location = new Point(1052, 18); cb_VisionForm.Location = new Point(1315, 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"; @@ -278,13 +289,14 @@ // // 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; LB_SmartVision/VisionForm.cs
@@ -3,6 +3,7 @@ using LB_SmartVision.Forms.Pages; using LB_SmartVision.Forms.Pages.CameraPage; using LB_SmartVision.Forms.Pages.CommunicatorPage; using LB_SmartVision.Forms.Pages.HistoricalData; using LB_SmartVision.Forms.Pages.MESPage; using LB_SmartVision.Forms.Pages.MotionControlPage; using LB_SmartVision.Forms.Pages.ProcessPage; @@ -42,6 +43,7 @@ { AllProcessesPage AllProcessesPages = new AllProcessesPage(); CamerasEditPage CamerasEditPage = new CamerasEditPage(); HistoricalDataEditPage HistoricalDataEditPage = new HistoricalDataEditPage(); CommunicatorsEditPage CommunicatorsEditPage = new CommunicatorsEditPage(); SettingEditPage SettingEditPage = new SettingEditPage(); MESEditPage MESEditPage = new MESEditPage(); @@ -69,6 +71,8 @@ AllProcessesPages.controlsPanel.Dock = DockStyle.Fill; materialTabControl.Controls.Add(AllProcessesPages); HistoricalDataEditPage.LogInfo += LogInfo; materialTabControl.Controls.Add(new MyPage(HistoricalDataEditPage)); CamerasEditPage.LogInfo += LogInfo; materialTabControl.Controls.Add(new MyPage(CamerasEditPage)); LB_SmartVision/VisionForm.resx
@@ -121,24 +121,24 @@ <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"> LB_VisionProcesses/Cameras/LBCameras/PHM6000Camera.cs
@@ -187,24 +187,28 @@ private void OnAcquisitionCompleted(IntPtr pInstance, int nOption) { // nOption: 0=䏿¹æ°æ®ç»æ, 1=å ¨é¨å®æ, 2=ç¹äºå°±ç»ª // æ ¹æ®éæ±åæ´ï¼æä»¬åªå¤ç亮度å¾ãOption 1 æ 0 表示 2D æ°æ®å°±ç»ªã if (nOption == 1 || nOption == 0) { GenerateBitmapAndNotify(); GenerateIntensityMap(); } } private void GenerateBitmapAndNotify() private void GenerateIntensityMap() { Bitmap bmp = null; lock (_bufferLock) if (_cameraHandle == IntPtr.Zero) return; int width = 0; int height = 0; // ç´æ¥ä» SDK è·ååå¹¶åçå¼ºåº¦æ°æ®æé (unsigned char*) IntPtr pIntensity = PHM6000Profiler.GetIntensityData(_cameraHandle, ref width, ref height); if (pIntensity == IntPtr.Zero || width <= 0 || height <= 0) return; try { if (_lineDataBuffer.Count == 0) return; // é»è®¤å®½åº¦ 4096 (线æ«ä¼ æå¨å ¸åå¼) int width = 4096; int height = _lineDataBuffer.Count; bmp = new Bitmap(width, height, PixelFormat.Format8bppIndexed); Bitmap bmp = new Bitmap(width, height, PixelFormat.Format8bppIndexed); // 设置ç°åº¦è°è²æ¿ ColorPalette palette = bmp.Palette; @@ -213,31 +217,21 @@ BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); IntPtr scan0 = bmpData.Scan0; for (int i = 0; i < height; i++) { // ä» æå Alpha (强度å¾) // 注æï¼LBPointZA ç»æä¸ alpha æ¯ç¬¬ 8 个åè byte[] lineBytes = _lineDataBuffer[i]; byte[] intensityRow = new byte[width]; for (int x = 0; x < Math.Min(width, lineBytes.Length / 8); x++) { intensityRow[x] = lineBytes[x * 8 + 7]; // alpha ä½ } Marshal.Copy(intensityRow, 0, scan0 + (i * bmpData.Stride), width); } // 髿§è½å åæ·è´ int size = width * height; byte[] managedData = new byte[size]; Marshal.Copy(pIntensity, managedData, 0, size); Marshal.Copy(managedData, 0, bmpData.Scan0, size); bmp.UnlockBits(bmpData); _lineDataBuffer.Clear(); } if (bmp != null) { // 触åäºä»¶ // 触åäºä»¶éç¥ UI æ´æ°äº®åº¦å¾ ImageGrabbed?.Invoke(this, new CameraEventArgs(SN, bmp)); } catch (Exception ex) { AsyncLogHelper.Error($"PHM6000: çæäº®åº¦å¾å¼å¸¸ - {ex.Message}"); } } private void SyncConfigFromCamera()