From 57a60f9d1289203f0a408f9009cee60a40ba91f3 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 24 Feb 2021 08:35:39 +0100 Subject: [PATCH] ThermoSetup vers 168 --- Thermo.Active/Properties/AssemblyInfo.cs | 2 +- Thermo.Cam.Setup/MainForm.Designer.cs | 132 ++++++++++++++++------- Thermo.Cam.Setup/MainForm.cs | 9 +- Thermo.Cam.Utils/TCContr.cs | 2 +- 4 files changed, 104 insertions(+), 41 deletions(-) diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index dac17096..99f75cf2 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -30,4 +30,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.167")] +[assembly: AssemblyVersion("1.1.168")] diff --git a/Thermo.Cam.Setup/MainForm.Designer.cs b/Thermo.Cam.Setup/MainForm.Designer.cs index 9703b6b8..e7ad4ba0 100644 --- a/Thermo.Cam.Setup/MainForm.Designer.cs +++ b/Thermo.Cam.Setup/MainForm.Designer.cs @@ -33,7 +33,6 @@ this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.discoveryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.disconnectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cameraToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripConnectionStatus = new System.Windows.Forms.ToolStripStatusLabel(); @@ -41,7 +40,9 @@ this.lblStats = new System.Windows.Forms.ToolStripStatusLabel(); this.pBoxA = new System.Windows.Forms.PictureBox(); this.panelCmd = new System.Windows.Forms.Panel(); + this.btnExportConfig = new System.Windows.Forms.Button(); this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.lblMs = new System.Windows.Forms.Label(); this.txtSPeriod = new System.Windows.Forms.TextBox(); this.chkSaveAll = new System.Windows.Forms.CheckBox(); this.chkLive = new System.Windows.Forms.CheckBox(); @@ -83,8 +84,11 @@ this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.timerUI = new System.Windows.Forms.Timer(this.components); - this.lblMs = new System.Windows.Forms.Label(); - this.btnExportConfig = new System.Windows.Forms.Button(); + this.lblExportInfo = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pBoxA)).BeginInit(); @@ -105,7 +109,7 @@ this.cameraToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1290, 24); + this.menuStrip1.Size = new System.Drawing.Size(1310, 24); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -113,8 +117,7 @@ // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.discoveryToolStripMenuItem, - this.disconnectToolStripMenuItem, - this.openToolStripMenuItem}); + this.disconnectToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "File"; @@ -133,11 +136,6 @@ this.disconnectToolStripMenuItem.Text = "Disconnect"; this.disconnectToolStripMenuItem.Click += new System.EventHandler(this.disconnectToolStripMenuItem_Click); // - // openToolStripMenuItem - // - this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.Size = new System.Drawing.Size(133, 22); - // // cameraToolStripMenuItem // this.cameraToolStripMenuItem.Enabled = false; @@ -152,9 +150,9 @@ this.toolStripConnectionStatus, this.progBar, this.lblStats}); - this.statusStrip1.Location = new System.Drawing.Point(0, 673); + this.statusStrip1.Location = new System.Drawing.Point(0, 661); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(1290, 22); + this.statusStrip1.Size = new System.Drawing.Size(1310, 22); this.statusStrip1.TabIndex = 2; this.statusStrip1.Text = "statusStrip1"; // @@ -190,6 +188,7 @@ this.panelCmd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.panelCmd.BackColor = System.Drawing.SystemColors.ControlDark; + this.panelCmd.Controls.Add(this.lblExportInfo); this.panelCmd.Controls.Add(this.btnExportConfig); this.panelCmd.Controls.Add(this.groupBox5); this.panelCmd.Controls.Add(this.groupBox4); @@ -199,9 +198,20 @@ this.panelCmd.Controls.Add(this.labelTitle); this.panelCmd.Location = new System.Drawing.Point(0, 23); this.panelCmd.Name = "panelCmd"; - this.panelCmd.Size = new System.Drawing.Size(192, 647); + this.panelCmd.Size = new System.Drawing.Size(192, 622); this.panelCmd.TabIndex = 6; // + // btnExportConfig + // + this.btnExportConfig.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnExportConfig.Location = new System.Drawing.Point(8, 491); + this.btnExportConfig.Name = "btnExportConfig"; + this.btnExportConfig.Size = new System.Drawing.Size(177, 64); + this.btnExportConfig.TabIndex = 20; + this.btnExportConfig.Text = "Export Config"; + this.btnExportConfig.UseVisualStyleBackColor = true; + this.btnExportConfig.Click += new System.EventHandler(this.btnExportConfig_Click); + // // groupBox5 // this.groupBox5.Controls.Add(this.lblMs); @@ -215,6 +225,15 @@ this.groupBox5.TabStop = false; this.groupBox5.Text = "Acquire"; // + // lblMs + // + this.lblMs.AutoSize = true; + this.lblMs.Location = new System.Drawing.Point(149, 21); + this.lblMs.Name = "lblMs"; + this.lblMs.Size = new System.Drawing.Size(20, 13); + this.lblMs.TabIndex = 22; + this.lblMs.Text = "ms"; + // // txtSPeriod // this.txtSPeriod.Location = new System.Drawing.Point(99, 18); @@ -549,7 +568,7 @@ // this.lblPoint.AutoSize = true; this.lblPoint.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblPoint.Location = new System.Drawing.Point(1104, 316); + this.lblPoint.Location = new System.Drawing.Point(1118, 316); this.lblPoint.MinimumSize = new System.Drawing.Size(170, 0); this.lblPoint.Name = "lblPoint"; this.lblPoint.Size = new System.Drawing.Size(170, 13); @@ -559,7 +578,7 @@ // // pBoxB // - this.pBoxB.Location = new System.Drawing.Point(954, 57); + this.pBoxB.Location = new System.Drawing.Point(968, 57); this.pBoxB.Name = "pBoxB"; this.pBoxB.Size = new System.Drawing.Size(320, 256); this.pBoxB.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; @@ -580,7 +599,7 @@ // this.lblImgB.AutoSize = true; this.lblImgB.Font = new System.Drawing.Font("Verdana", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblImgB.Location = new System.Drawing.Point(950, 31); + this.lblImgB.Location = new System.Drawing.Point(964, 31); this.lblImgB.Name = "lblImgB"; this.lblImgB.Size = new System.Drawing.Size(194, 23); this.lblImgB.TabIndex = 10; @@ -589,7 +608,7 @@ // chkShowTransfBig // this.chkShowTransfBig.AutoSize = true; - this.chkShowTransfBig.Location = new System.Drawing.Point(1165, 37); + this.chkShowTransfBig.Location = new System.Drawing.Point(1179, 37); this.chkShowTransfBig.Name = "chkShowTransfBig"; this.chkShowTransfBig.Size = new System.Drawing.Size(115, 17); this.chkShowTransfBig.TabIndex = 12; @@ -604,7 +623,7 @@ this.columnHeader2, this.columnHeader3}); this.lstView.HideSelection = false; - this.lstView.Location = new System.Drawing.Point(954, 334); + this.lstView.Location = new System.Drawing.Point(968, 334); this.lstView.Name = "lstView"; this.lstView.Size = new System.Drawing.Size(320, 323); this.lstView.TabIndex = 13; @@ -631,31 +650,66 @@ // this.timerUI.Tick += new System.EventHandler(this.timerUI_Tick); // - // lblMs + // lblExportInfo // - this.lblMs.AutoSize = true; - this.lblMs.Location = new System.Drawing.Point(149, 21); - this.lblMs.Name = "lblMs"; - this.lblMs.Size = new System.Drawing.Size(20, 13); - this.lblMs.TabIndex = 22; - this.lblMs.Text = "ms"; + this.lblExportInfo.AutoSize = true; + this.lblExportInfo.Location = new System.Drawing.Point(9, 574); + this.lblExportInfo.MaximumSize = new System.Drawing.Size(100, 0); + this.lblExportInfo.MinimumSize = new System.Drawing.Size(175, 0); + this.lblExportInfo.Name = "lblExportInfo"; + this.lblExportInfo.Size = new System.Drawing.Size(175, 13); + this.lblExportInfo.TabIndex = 21; + this.lblExportInfo.Text = "---"; // - // btnExportConfig + // label3 // - this.btnExportConfig.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnExportConfig.Location = new System.Drawing.Point(8, 491); - this.btnExportConfig.Name = "btnExportConfig"; - this.btnExportConfig.Size = new System.Drawing.Size(177, 64); - this.btnExportConfig.TabIndex = 20; - this.btnExportConfig.Text = "Export Config"; - this.btnExportConfig.UseVisualStyleBackColor = true; - this.btnExportConfig.Click += new System.EventHandler(this.btnExportConfig_Click); + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(951, 296); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(17, 15); + this.label3.TabIndex = 14; + this.label3.Text = "D"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(951, 57); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(15, 15); + this.label4.TabIndex = 15; + this.label4.Text = "A"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(1290, 57); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(16, 15); + this.label8.TabIndex = 16; + this.label8.Text = "B"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Location = new System.Drawing.Point(1290, 296); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(16, 15); + this.label9.TabIndex = 17; + this.label9.Text = "C"; // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1290, 695); + this.ClientSize = new System.Drawing.Size(1310, 683); + this.Controls.Add(this.label9); + this.Controls.Add(this.label8); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); this.Controls.Add(this.lstView); this.Controls.Add(this.chkShowTransfBig); this.Controls.Add(this.lblImgB); @@ -704,7 +758,6 @@ private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.ToolStripStatusLabel toolStripConnectionStatus; private System.Windows.Forms.ToolStripMenuItem disconnectToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; private System.Windows.Forms.PictureBox pBoxA; private System.Windows.Forms.Panel panelCmd; private System.Windows.Forms.Label labelTitle; @@ -753,6 +806,11 @@ private System.Windows.Forms.Timer timerUI; private System.Windows.Forms.Button btnExportConfig; private System.Windows.Forms.Label lblMs; + private System.Windows.Forms.Label lblExportInfo; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; } } diff --git a/Thermo.Cam.Setup/MainForm.cs b/Thermo.Cam.Setup/MainForm.cs index 5188f9af..47d2c1dc 100644 --- a/Thermo.Cam.Setup/MainForm.cs +++ b/Thermo.Cam.Setup/MainForm.cs @@ -24,7 +24,7 @@ namespace Thermo.Cam.Setup /// /// Classe gestione ThermoCam (oggetti Image, metodi processing...) x FlirCam /// - protected TCContr TCamCtrl = new TCContr($"{BASE_PATH}images\\", BASE_PATH); + protected TCContr TCamCtrl = new TCContr($"{BASE_PATH}\\images\\", BASE_PATH); #endregion Protected Fields @@ -228,6 +228,8 @@ namespace Thermo.Cam.Setup TCamCtrl.saveConf(); // salvo in folder target TCamCtrl.saveConf(ThermoConfPath); + // info export fatto + lblExportInfo.Text = $"{DateTime.Now} Configuration exported!"; } private void btnLoad_Click(object sender, EventArgs e) @@ -301,7 +303,10 @@ namespace Thermo.Cam.Setup TCamCtrl.ConnectCamera(discoveryDlg.SelectedCameraDevice); // salvo nome camera in conf attuale! TCamCtrl.currConf.CameraName = discoveryDlg.SelectedCameraDevice.Name; - TCamCtrl.currConf.CameraAddress = discoveryDlg.SelectedCameraDevice.IpSettings.IpAddress; + if (discoveryDlg.SelectedCameraDevice.IpSettings != null) + { + TCamCtrl.currConf.CameraAddress = discoveryDlg.SelectedCameraDevice.IpSettings.IpAddress; + } TCamCtrl.saveConf(); } } diff --git a/Thermo.Cam.Utils/TCContr.cs b/Thermo.Cam.Utils/TCContr.cs index 7c3c7079..34d65bb5 100644 --- a/Thermo.Cam.Utils/TCContr.cs +++ b/Thermo.Cam.Utils/TCContr.cs @@ -488,7 +488,7 @@ namespace Thermo.Cam.Utils { foreach (var item in currConf.OrigPoints.Coords) { - drawPoint(Color.Green, item); + drawPoint(Color.LightGreen, item); } } // se ho punto acquisizione temp --> disegno!