diff --git a/src/PBAnaly/Module/ImageToolMannage.cs b/src/PBAnaly/Module/ImageToolMannage.cs deleted file mode 100644 index 8b08fb1..0000000 --- a/src/PBAnaly/Module/ImageToolMannage.cs +++ /dev/null @@ -1,37 +0,0 @@ - - -using OpenCvSharp.ImgHash; -using PBAnaly.UI; -using System.Collections.Generic; - -namespace PBAnaly.Module -{ - public static class ImageToolMannage - { - #region 变量 - public static bool lineDisON = false; - public static bool rectON = false; - public static bool linepolygonON = false; - public static bool linewandON = false; - public static bool circleON = false; - public static int color_min = 6000; - public static int color_max = 65534; - public static float alpha = 100; - public static ImagePanel imagePanel { get; set; } - public static ImagePanelUser imagePanelUser { get; set; } - public static ReaLTaiizor.Controls.Panel right_panel { get; set; } - public static int beta = 127; - - public static double pixeltomm = 0.0825; - - public static Dictionary imageDataPath = new Dictionary(); - - public static int RoiIndex = 0; - public static int CircleIndex = 0; - public static int Roi_w = 20; - public static int Roi_h = 20; - public static int Roi_r = 10; - - #endregion - } -} diff --git a/src/PBAnaly/PBAnaly.csproj b/src/PBAnaly/PBAnaly.csproj index 815b956..38a01eb 100644 --- a/src/PBAnaly/PBAnaly.csproj +++ b/src/PBAnaly/PBAnaly.csproj @@ -89,7 +89,6 @@ - @@ -125,30 +124,12 @@ BioanayImagePaletteForm.cs - - UserControl - - - colorbarControl.cs - - - Form - - - ImagePanel.cs - UserControl ImagePanelUser.cs - - Form - - - ImageToolPaletteForm.cs - Component @@ -210,18 +191,9 @@ BioanayImagePaletteForm.cs - - colorbarControl.cs - - - ImagePanel.cs - ImagePanelUser.cs - - ImageToolPaletteForm.cs - RowMergeView.cs diff --git a/src/PBAnaly/UI/AnalyzeDataForm.Designer.cs b/src/PBAnaly/UI/AnalyzeDataForm.Designer.cs index 5691eee..4ed4139 100644 --- a/src/PBAnaly/UI/AnalyzeDataForm.Designer.cs +++ b/src/PBAnaly/UI/AnalyzeDataForm.Designer.cs @@ -104,7 +104,7 @@ this.metroPanel1.Location = new System.Drawing.Point(0, 31); this.metroPanel1.Margin = new System.Windows.Forms.Padding(0); this.metroPanel1.Name = "metroPanel1"; - this.metroPanel1.Size = new System.Drawing.Size(1466, 36); + this.metroPanel1.Size = new System.Drawing.Size(1488, 36); this.metroPanel1.Style = ReaLTaiizor.Enum.Metro.Style.Custom; this.metroPanel1.StyleManager = null; this.metroPanel1.TabIndex = 3; @@ -137,7 +137,7 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1466, 1277); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1488, 1328); this.tableLayoutPanel1.TabIndex = 3; // // panel1 @@ -151,7 +151,7 @@ this.panel1.Margin = new System.Windows.Forms.Padding(4); this.panel1.Name = "panel1"; this.panel1.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6); - this.panel1.Size = new System.Drawing.Size(1458, 1202); + this.panel1.Size = new System.Drawing.Size(1480, 1253); this.panel1.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; this.panel1.TabIndex = 4; this.panel1.Text = "panel1"; @@ -165,14 +165,14 @@ this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowHeadersWidth = 51; this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(1444, 1190); + this.dataGridView1.Size = new System.Drawing.Size(1466, 1241); this.dataGridView1.TabIndex = 0; // // AnalyzeDataForm // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1474, 1311); + this.ClientSize = new System.Drawing.Size(1496, 1362); this.Controls.Add(this.tableLayoutPanel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.FormStyle = MaterialSkin.Controls.MaterialForm.FormStyles.ActionBar_None; diff --git a/src/PBAnaly/UI/BioanayImagePaletteForm.Designer.cs b/src/PBAnaly/UI/BioanayImagePaletteForm.Designer.cs index 884c005..ff3b47e 100644 --- a/src/PBAnaly/UI/BioanayImagePaletteForm.Designer.cs +++ b/src/PBAnaly/UI/BioanayImagePaletteForm.Designer.cs @@ -99,10 +99,11 @@ this.fb_fixSetting.EnabledCalc = true; this.fb_fixSetting.Font = new System.Drawing.Font("Segoe UI", 10F); this.fb_fixSetting.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(78)))), ((int)(((byte)(90))))); - this.fb_fixSetting.Location = new System.Drawing.Point(137, 31); + this.fb_fixSetting.Location = new System.Drawing.Point(183, 39); + this.fb_fixSetting.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.fb_fixSetting.Name = "fb_fixSetting"; this.fb_fixSetting.OverColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(242))))); - this.fb_fixSetting.Size = new System.Drawing.Size(59, 31); + this.fb_fixSetting.Size = new System.Drawing.Size(79, 39); this.fb_fixSetting.TabIndex = 6; this.fb_fixSetting.Text = "修改"; // @@ -111,9 +112,10 @@ this.foxLabel7.BackColor = System.Drawing.Color.Transparent; this.foxLabel7.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); this.foxLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel7.Location = new System.Drawing.Point(120, 5); + this.foxLabel7.Location = new System.Drawing.Point(160, 6); + this.foxLabel7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel7.Name = "foxLabel7"; - this.foxLabel7.Size = new System.Drawing.Size(26, 19); + this.foxLabel7.Size = new System.Drawing.Size(35, 24); this.foxLabel7.TabIndex = 4; this.foxLabel7.Text = "r="; // @@ -122,9 +124,10 @@ this.foxLabel5.BackColor = System.Drawing.Color.Transparent; this.foxLabel5.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); this.foxLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel5.Location = new System.Drawing.Point(3, 31); + this.foxLabel5.Location = new System.Drawing.Point(4, 39); + this.foxLabel5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel5.Name = "foxLabel5"; - this.foxLabel5.Size = new System.Drawing.Size(26, 19); + this.foxLabel5.Size = new System.Drawing.Size(35, 24); this.foxLabel5.TabIndex = 2; this.foxLabel5.Text = "h="; // @@ -135,9 +138,10 @@ this.foxLabel8.Dock = System.Windows.Forms.DockStyle.Fill; this.foxLabel8.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.foxLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel8.Location = new System.Drawing.Point(3, 177); + this.foxLabel8.Location = new System.Drawing.Point(4, 220); + this.foxLabel8.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel8.Name = "foxLabel8"; - this.foxLabel8.Size = new System.Drawing.Size(195, 18); + this.foxLabel8.Size = new System.Drawing.Size(262, 22); this.foxLabel8.TabIndex = 34; this.foxLabel8.Text = "Color Rable"; // @@ -148,9 +152,10 @@ this.flb_act_mm.Dock = System.Windows.Forms.DockStyle.Fill; this.flb_act_mm.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.flb_act_mm.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.flb_act_mm.Location = new System.Drawing.Point(93, 151); + this.flb_act_mm.Location = new System.Drawing.Point(125, 188); + this.flb_act_mm.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.flb_act_mm.Name = "flb_act_mm"; - this.flb_act_mm.Size = new System.Drawing.Size(164, 20); + this.flb_act_mm.Size = new System.Drawing.Size(220, 24); this.flb_act_mm.TabIndex = 30; this.flb_act_mm.Text = "0 mm"; // @@ -160,9 +165,10 @@ this.foxLabel9.Dock = System.Windows.Forms.DockStyle.Fill; this.foxLabel9.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.foxLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel9.Location = new System.Drawing.Point(3, 115); + this.foxLabel9.Location = new System.Drawing.Point(4, 143); + this.foxLabel9.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel9.Name = "foxLabel9"; - this.foxLabel9.Size = new System.Drawing.Size(44, 30); + this.foxLabel9.Size = new System.Drawing.Size(59, 37); this.foxLabel9.TabIndex = 18; this.foxLabel9.Text = "Max"; // @@ -172,9 +178,10 @@ this.foxLabel6.Dock = System.Windows.Forms.DockStyle.Fill; this.foxLabel6.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.foxLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel6.Location = new System.Drawing.Point(3, 79); + this.foxLabel6.Location = new System.Drawing.Point(4, 98); + this.foxLabel6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel6.Name = "foxLabel6"; - this.foxLabel6.Size = new System.Drawing.Size(44, 30); + this.foxLabel6.Size = new System.Drawing.Size(59, 37); this.foxLabel6.TabIndex = 13; this.foxLabel6.Text = "Min"; // @@ -184,9 +191,10 @@ this.foxLabel2.Dock = System.Windows.Forms.DockStyle.Fill; this.foxLabel2.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.foxLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel2.Location = new System.Drawing.Point(3, 61); + this.foxLabel2.Location = new System.Drawing.Point(4, 76); + this.foxLabel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel2.Name = "foxLabel2"; - this.foxLabel2.Size = new System.Drawing.Size(44, 12); + this.foxLabel2.Size = new System.Drawing.Size(59, 14); this.foxLabel2.TabIndex = 10; this.foxLabel2.Text = "色阶"; // @@ -196,9 +204,10 @@ this.foxLabel3.Dock = System.Windows.Forms.DockStyle.Fill; this.foxLabel3.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.foxLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel3.Location = new System.Drawing.Point(3, 32); + this.foxLabel3.Location = new System.Drawing.Point(4, 40); + this.foxLabel3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel3.Name = "foxLabel3"; - this.foxLabel3.Size = new System.Drawing.Size(44, 23); + this.foxLabel3.Size = new System.Drawing.Size(59, 28); this.foxLabel3.TabIndex = 6; this.foxLabel3.Text = "透明度::"; // @@ -208,9 +217,10 @@ this.foxLabel1.Dock = System.Windows.Forms.DockStyle.Fill; this.foxLabel1.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.foxLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel1.Location = new System.Drawing.Point(3, 3); + this.foxLabel1.Location = new System.Drawing.Point(4, 4); + this.foxLabel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel1.Name = "foxLabel1"; - this.foxLabel1.Size = new System.Drawing.Size(44, 23); + this.foxLabel1.Size = new System.Drawing.Size(59, 28); this.foxLabel1.TabIndex = 1; this.foxLabel1.Text = "亮度:"; // @@ -219,9 +229,10 @@ this.foxLabel4.BackColor = System.Drawing.Color.Transparent; this.foxLabel4.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); this.foxLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel4.Location = new System.Drawing.Point(3, 3); + this.foxLabel4.Location = new System.Drawing.Point(4, 4); + this.foxLabel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.foxLabel4.Name = "foxLabel4"; - this.foxLabel4.Size = new System.Drawing.Size(26, 19); + this.foxLabel4.Size = new System.Drawing.Size(35, 24); this.foxLabel4.TabIndex = 0; this.foxLabel4.Text = "w="; // @@ -230,10 +241,11 @@ this.hpb_line.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); this.hpb_line.Dock = System.Windows.Forms.DockStyle.Fill; this.hpb_line.Image = global::PBAnaly.Properties.Resources.线段; - this.hpb_line.Location = new System.Drawing.Point(3, 151); + this.hpb_line.Location = new System.Drawing.Point(4, 188); + this.hpb_line.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.hpb_line.Name = "hpb_line"; this.hpb_line.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_line.Size = new System.Drawing.Size(44, 20); + this.hpb_line.Size = new System.Drawing.Size(59, 24); this.hpb_line.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.hpb_line.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; this.hpb_line.TabIndex = 9; @@ -243,10 +255,10 @@ // tableLayoutPanel3 // this.tableLayoutPanel3.ColumnCount = 5; - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F)); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel3.Controls.Add(this.hpb_wand, 3, 0); this.tableLayoutPanel3.Controls.Add(this.hpb_xianduan, 2, 0); @@ -258,9 +270,9 @@ this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.RowCount = 2; - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F)); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 42F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(266, 182); + this.tableLayoutPanel3.Size = new System.Drawing.Size(357, 228); this.tableLayoutPanel3.TabIndex = 0; // // hpb_wand @@ -268,9 +280,10 @@ this.hpb_wand.Dock = System.Windows.Forms.DockStyle.Fill; this.hpb_wand.Image = global::PBAnaly.Properties.Resources.魔术棒_魔法_魔术_一键; this.hpb_wand.ImageFit = AntdUI.TFit.Contain; - this.hpb_wand.Location = new System.Drawing.Point(105, 3); + this.hpb_wand.Location = new System.Drawing.Point(139, 4); + this.hpb_wand.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.hpb_wand.Name = "hpb_wand"; - this.hpb_wand.Size = new System.Drawing.Size(28, 28); + this.hpb_wand.Size = new System.Drawing.Size(37, 34); this.hpb_wand.TabIndex = 14; this.hpb_wand.Text = "a"; // @@ -280,9 +293,10 @@ this.hpb_xianduan.Dock = System.Windows.Forms.DockStyle.Fill; this.hpb_xianduan.Image = global::PBAnaly.Properties.Resources.线段__1_; this.hpb_xianduan.ImageFit = AntdUI.TFit.Contain; - this.hpb_xianduan.Location = new System.Drawing.Point(71, 3); + this.hpb_xianduan.Location = new System.Drawing.Point(94, 4); + this.hpb_xianduan.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.hpb_xianduan.Name = "hpb_xianduan"; - this.hpb_xianduan.Size = new System.Drawing.Size(28, 28); + this.hpb_xianduan.Size = new System.Drawing.Size(37, 34); this.hpb_xianduan.TabIndex = 13; this.hpb_xianduan.Text = "a"; // @@ -292,9 +306,10 @@ this.hpb_circe.Dock = System.Windows.Forms.DockStyle.Fill; this.hpb_circe.Image = global::PBAnaly.Properties.Resources.圆形; this.hpb_circe.ImageFit = AntdUI.TFit.Contain; - this.hpb_circe.Location = new System.Drawing.Point(37, 3); + this.hpb_circe.Location = new System.Drawing.Point(49, 4); + this.hpb_circe.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.hpb_circe.Name = "hpb_circe"; - this.hpb_circe.Size = new System.Drawing.Size(28, 28); + this.hpb_circe.Size = new System.Drawing.Size(37, 34); this.hpb_circe.TabIndex = 0; this.hpb_circe.Text = "a"; // @@ -304,9 +319,10 @@ this.hpb_rect.Dock = System.Windows.Forms.DockStyle.Fill; this.hpb_rect.Image = global::PBAnaly.Properties.Resources._10矩形; this.hpb_rect.ImageFit = AntdUI.TFit.Contain; - this.hpb_rect.Location = new System.Drawing.Point(3, 3); + this.hpb_rect.Location = new System.Drawing.Point(4, 4); + this.hpb_rect.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.hpb_rect.Name = "hpb_rect"; - this.hpb_rect.Size = new System.Drawing.Size(28, 28); + this.hpb_rect.Size = new System.Drawing.Size(37, 34); this.hpb_rect.TabIndex = 0; this.hpb_rect.Text = "a"; // @@ -322,9 +338,10 @@ this.panel2.Controls.Add(this.foxLabel5); this.panel2.Controls.Add(this.foxLabel4); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(3, 37); + this.panel2.Location = new System.Drawing.Point(4, 46); + this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(260, 142); + this.panel2.Size = new System.Drawing.Size(349, 178); this.panel2.TabIndex = 14; this.panel2.Text = "panel2"; // @@ -339,9 +356,10 @@ this.dtb_r.ColorE = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.dtb_r.ColorF = System.Drawing.Color.Black; this.dtb_r.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.dtb_r.Location = new System.Drawing.Point(144, 5); + this.dtb_r.Location = new System.Drawing.Point(192, 6); + this.dtb_r.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dtb_r.Name = "dtb_r"; - this.dtb_r.Size = new System.Drawing.Size(80, 21); + this.dtb_r.Size = new System.Drawing.Size(106, 25); this.dtb_r.TabIndex = 10; this.dtb_r.Text = "10"; // @@ -356,9 +374,10 @@ this.dtb_h.ColorE = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.dtb_h.ColorF = System.Drawing.Color.Black; this.dtb_h.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.dtb_h.Location = new System.Drawing.Point(35, 34); + this.dtb_h.Location = new System.Drawing.Point(47, 42); + this.dtb_h.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dtb_h.Name = "dtb_h"; - this.dtb_h.Size = new System.Drawing.Size(80, 21); + this.dtb_h.Size = new System.Drawing.Size(106, 25); this.dtb_h.TabIndex = 9; this.dtb_h.Text = "10"; // @@ -373,9 +392,10 @@ this.dtb_w.ColorE = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.dtb_w.ColorF = System.Drawing.Color.Black; this.dtb_w.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.dtb_w.Location = new System.Drawing.Point(34, 5); + this.dtb_w.Location = new System.Drawing.Point(45, 6); + this.dtb_w.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dtb_w.Name = "dtb_w"; - this.dtb_w.Size = new System.Drawing.Size(80, 21); + this.dtb_w.Size = new System.Drawing.Size(106, 25); this.dtb_w.TabIndex = 8; this.dtb_w.Text = "10"; // @@ -384,18 +404,20 @@ this.flb_info.BackColor = System.Drawing.Color.Transparent; this.flb_info.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); this.flb_info.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.flb_info.Location = new System.Drawing.Point(1, 101); + this.flb_info.Location = new System.Drawing.Point(1, 126); + this.flb_info.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.flb_info.Name = "flb_info"; - this.flb_info.Size = new System.Drawing.Size(223, 19); + this.flb_info.Size = new System.Drawing.Size(297, 24); this.flb_info.TabIndex = 7; // // collapseItem2 // this.collapseItem2.Controls.Add(this.tableLayoutPanel3); this.collapseItem2.Expand = true; - this.collapseItem2.Location = new System.Drawing.Point(19, 433); + this.collapseItem2.Location = new System.Drawing.Point(24, 540); + this.collapseItem2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.collapseItem2.Name = "collapseItem2"; - this.collapseItem2.Size = new System.Drawing.Size(266, 182); + this.collapseItem2.Size = new System.Drawing.Size(357, 228); this.collapseItem2.TabIndex = 1; this.collapseItem2.Text = "ROI工具"; // @@ -414,19 +436,20 @@ "RGB", "Pseudo", "Gray"}); - this.cb_colortable.Location = new System.Drawing.Point(3, 201); + this.cb_colortable.Location = new System.Drawing.Point(4, 250); + this.cb_colortable.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cb_colortable.Name = "cb_colortable"; - this.cb_colortable.Size = new System.Drawing.Size(84, 20); + this.cb_colortable.Size = new System.Drawing.Size(113, 23); this.cb_colortable.TabIndex = 35; // // tableLayoutPanel2 // this.tableLayoutPanel2.ColumnCount = 5; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 67F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 27F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 59F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 79F)); this.tableLayoutPanel2.Controls.Add(this.nud_opacity, 4, 1); this.tableLayoutPanel2.Controls.Add(this.nud_brightness, 4, 0); this.tableLayoutPanel2.Controls.Add(this.dtb_colorMax, 1, 4); @@ -450,32 +473,34 @@ this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 9; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(260, 272); + this.tableLayoutPanel2.Size = new System.Drawing.Size(349, 340); this.tableLayoutPanel2.TabIndex = 0; // // nud_opacity // this.nud_opacity.Dock = System.Windows.Forms.DockStyle.Fill; - this.nud_opacity.Location = new System.Drawing.Point(204, 32); + this.nud_opacity.Location = new System.Drawing.Point(274, 40); + this.nud_opacity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.nud_opacity.Name = "nud_opacity"; - this.nud_opacity.Size = new System.Drawing.Size(53, 21); + this.nud_opacity.Size = new System.Drawing.Size(71, 25); this.nud_opacity.TabIndex = 45; // // nud_brightness // this.nud_brightness.Dock = System.Windows.Forms.DockStyle.Fill; - this.nud_brightness.Location = new System.Drawing.Point(204, 3); + this.nud_brightness.Location = new System.Drawing.Point(274, 4); + this.nud_brightness.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.nud_brightness.Name = "nud_brightness"; - this.nud_brightness.Size = new System.Drawing.Size(53, 21); + this.nud_brightness.Size = new System.Drawing.Size(71, 25); this.nud_brightness.TabIndex = 44; // // dtb_colorMax @@ -488,13 +513,13 @@ this.dtb_colorMax.EmptyBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(221)))), ((int)(((byte)(221))))); this.dtb_colorMax.FillBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(99)))), ((int)(((byte)(50))))); this.dtb_colorMax.JumpToMouse = false; - this.dtb_colorMax.Location = new System.Drawing.Point(52, 114); - this.dtb_colorMax.Margin = new System.Windows.Forms.Padding(2); + this.dtb_colorMax.Location = new System.Drawing.Point(70, 141); + this.dtb_colorMax.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dtb_colorMax.Maximum = 100; this.dtb_colorMax.Minimum = 0; - this.dtb_colorMax.MinimumSize = new System.Drawing.Size(35, 18); + this.dtb_colorMax.MinimumSize = new System.Drawing.Size(47, 22); this.dtb_colorMax.Name = "dtb_colorMax"; - this.dtb_colorMax.Size = new System.Drawing.Size(118, 22); + this.dtb_colorMax.Size = new System.Drawing.Size(197, 22); this.dtb_colorMax.TabIndex = 40; this.dtb_colorMax.Text = "dungeonTrackBar5"; this.dtb_colorMax.ThumbBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); @@ -513,13 +538,13 @@ this.dtb_colorMin.EmptyBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(221)))), ((int)(((byte)(221))))); this.dtb_colorMin.FillBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(99)))), ((int)(((byte)(50))))); this.dtb_colorMin.JumpToMouse = false; - this.dtb_colorMin.Location = new System.Drawing.Point(52, 78); - this.dtb_colorMin.Margin = new System.Windows.Forms.Padding(2); + this.dtb_colorMin.Location = new System.Drawing.Point(70, 96); + this.dtb_colorMin.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dtb_colorMin.Maximum = 100; this.dtb_colorMin.Minimum = 0; - this.dtb_colorMin.MinimumSize = new System.Drawing.Size(35, 18); + this.dtb_colorMin.MinimumSize = new System.Drawing.Size(47, 22); this.dtb_colorMin.Name = "dtb_colorMin"; - this.dtb_colorMin.Size = new System.Drawing.Size(118, 22); + this.dtb_colorMin.Size = new System.Drawing.Size(197, 22); this.dtb_colorMin.TabIndex = 39; this.dtb_colorMin.Text = "dungeonTrackBar4"; this.dtb_colorMin.ThumbBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); @@ -538,13 +563,13 @@ this.dtb_opacity.EmptyBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(221)))), ((int)(((byte)(221))))); this.dtb_opacity.FillBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(99)))), ((int)(((byte)(50))))); this.dtb_opacity.JumpToMouse = false; - this.dtb_opacity.Location = new System.Drawing.Point(52, 31); - this.dtb_opacity.Margin = new System.Windows.Forms.Padding(2); + this.dtb_opacity.Location = new System.Drawing.Point(70, 38); + this.dtb_opacity.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dtb_opacity.Maximum = 100; this.dtb_opacity.Minimum = 0; - this.dtb_opacity.MinimumSize = new System.Drawing.Size(35, 18); + this.dtb_opacity.MinimumSize = new System.Drawing.Size(47, 22); this.dtb_opacity.Name = "dtb_opacity"; - this.dtb_opacity.Size = new System.Drawing.Size(118, 22); + this.dtb_opacity.Size = new System.Drawing.Size(197, 22); this.dtb_opacity.TabIndex = 37; this.dtb_opacity.Text = "dungeonTrackBar2"; this.dtb_opacity.ThumbBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); @@ -556,10 +581,10 @@ // pb_bgimage // this.pb_bgimage.Dock = System.Windows.Forms.DockStyle.Fill; - this.pb_bgimage.Location = new System.Drawing.Point(90, 198); + this.pb_bgimage.Location = new System.Drawing.Point(121, 246); this.pb_bgimage.Margin = new System.Windows.Forms.Padding(0); this.pb_bgimage.Name = "pb_bgimage"; - this.pb_bgimage.Size = new System.Drawing.Size(111, 29); + this.pb_bgimage.Size = new System.Drawing.Size(149, 36); this.pb_bgimage.TabIndex = 36; this.pb_bgimage.TabStop = false; // @@ -573,13 +598,13 @@ this.dtb_brightness.EmptyBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(221)))), ((int)(((byte)(221))))); this.dtb_brightness.FillBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(99)))), ((int)(((byte)(50))))); this.dtb_brightness.JumpToMouse = false; - this.dtb_brightness.Location = new System.Drawing.Point(52, 2); - this.dtb_brightness.Margin = new System.Windows.Forms.Padding(2); + this.dtb_brightness.Location = new System.Drawing.Point(70, 2); + this.dtb_brightness.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.dtb_brightness.Maximum = 100; this.dtb_brightness.Minimum = 0; - this.dtb_brightness.MinimumSize = new System.Drawing.Size(35, 18); + this.dtb_brightness.MinimumSize = new System.Drawing.Size(47, 22); this.dtb_brightness.Name = "dtb_brightness"; - this.dtb_brightness.Size = new System.Drawing.Size(118, 22); + this.dtb_brightness.Size = new System.Drawing.Size(197, 22); this.dtb_brightness.TabIndex = 2; this.dtb_brightness.Text = "dungeonTrackBar1"; this.dtb_brightness.ThumbBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); @@ -594,18 +619,19 @@ this.pl_max.BackColor = System.Drawing.Color.Transparent; this.pl_max.Controls.Add(this.nud_colorMax); this.pl_max.Dock = System.Windows.Forms.DockStyle.Fill; - this.pl_max.Location = new System.Drawing.Point(201, 112); + this.pl_max.Location = new System.Drawing.Point(270, 139); this.pl_max.Margin = new System.Windows.Forms.Padding(0); this.pl_max.Name = "pl_max"; - this.pl_max.Size = new System.Drawing.Size(59, 36); + this.pl_max.Size = new System.Drawing.Size(79, 45); this.pl_max.TabIndex = 52; this.pl_max.Text = "panel3"; // // nud_colorMax // - this.nud_colorMax.Location = new System.Drawing.Point(3, 3); + this.nud_colorMax.Location = new System.Drawing.Point(4, 4); + this.nud_colorMax.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.nud_colorMax.Name = "nud_colorMax"; - this.nud_colorMax.Size = new System.Drawing.Size(44, 21); + this.nud_colorMax.Size = new System.Drawing.Size(59, 25); this.nud_colorMax.TabIndex = 51; // // pl_min @@ -614,27 +640,29 @@ this.pl_min.BackColor = System.Drawing.Color.Transparent; this.pl_min.Controls.Add(this.nud_colorMin); this.pl_min.Dock = System.Windows.Forms.DockStyle.Fill; - this.pl_min.Location = new System.Drawing.Point(201, 76); + this.pl_min.Location = new System.Drawing.Point(270, 94); this.pl_min.Margin = new System.Windows.Forms.Padding(0); this.pl_min.Name = "pl_min"; - this.pl_min.Size = new System.Drawing.Size(59, 36); + this.pl_min.Size = new System.Drawing.Size(79, 45); this.pl_min.TabIndex = 53; this.pl_min.Text = "panel3"; // // nud_colorMin // - this.nud_colorMin.Location = new System.Drawing.Point(3, 3); + this.nud_colorMin.Location = new System.Drawing.Point(4, 4); + this.nud_colorMin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.nud_colorMin.Name = "nud_colorMin"; - this.nud_colorMin.Size = new System.Drawing.Size(44, 21); + this.nud_colorMin.Size = new System.Drawing.Size(59, 25); this.nud_colorMin.TabIndex = 50; // // panel1 // this.panel1.Controls.Add(this.tableLayoutPanel2); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Location = new System.Drawing.Point(4, 4); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(260, 272); + this.panel1.Size = new System.Drawing.Size(349, 340); this.panel1.TabIndex = 0; this.panel1.Text = "panel1"; // @@ -642,26 +670,27 @@ // this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 27F)); this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 278F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 348F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 6F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(266, 302); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 8F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(357, 378); this.tableLayoutPanel1.TabIndex = 0; // // collapseItem1 // this.collapseItem1.Controls.Add(this.tableLayoutPanel1); this.collapseItem1.Expand = true; - this.collapseItem1.Location = new System.Drawing.Point(19, 59); + this.collapseItem1.Location = new System.Drawing.Point(24, 73); + this.collapseItem1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.collapseItem1.Name = "collapseItem1"; - this.collapseItem1.Size = new System.Drawing.Size(266, 302); + this.collapseItem1.Size = new System.Drawing.Size(357, 378); this.collapseItem1.TabIndex = 0; this.collapseItem1.Text = "图像调整"; // @@ -673,19 +702,20 @@ this.cll_panel.Items.Add(this.collapseItem1); this.cll_panel.Items.Add(this.collapseItem2); this.cll_panel.Location = new System.Drawing.Point(0, 0); + this.cll_panel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cll_panel.Name = "cll_panel"; - this.cll_panel.Size = new System.Drawing.Size(304, 495); + this.cll_panel.Size = new System.Drawing.Size(405, 619); this.cll_panel.TabIndex = 1; this.cll_panel.Text = "fed"; // // BioanayImagePaletteForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(304, 495); + this.ClientSize = new System.Drawing.Size(405, 619); this.Controls.Add(this.cll_panel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Margin = new System.Windows.Forms.Padding(2); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "BioanayImagePaletteForm"; this.Text = "BioanayImagePaletteForm"; ((System.ComponentModel.ISupportInitialize)(this.hpb_line)).EndInit(); diff --git a/src/PBAnaly/UI/ImagePanel.Designer.cs b/src/PBAnaly/UI/ImagePanel.Designer.cs deleted file mode 100644 index 32e5f61..0000000 --- a/src/PBAnaly/UI/ImagePanel.Designer.cs +++ /dev/null @@ -1,436 +0,0 @@ -namespace PBAnaly.UI -{ - partial class ImagePanel - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.hpb_auto = new ReaLTaiizor.Controls.HopePictureBox(); - this.hhpb_save = new ReaLTaiizor.Controls.HopePictureBox(); - this.hpb_zoom_in = new ReaLTaiizor.Controls.HopePictureBox(); - this.poisonLabel1 = new ReaLTaiizor.Controls.PoisonLabel(); - this.hpb_zoom_out = new ReaLTaiizor.Controls.HopePictureBox(); - this.mcb_mode = new ReaLTaiizor.Controls.MetroComboBox(); - this.cb_scientific = new ReaLTaiizor.Controls.CheckBox(); - this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); - this.tlpanl_image_bar = new System.Windows.Forms.TableLayoutPanel(); - this.pl_image = new ReaLTaiizor.Controls.Panel(); - this.pl_bg_image = new ReaLTaiizor.Controls.Panel(); - this.pb_image = new System.Windows.Forms.PictureBox(); - this.lb_wh = new AntdUI.Label(); - this.lb_modename = new AntdUI.Label(); - this.pb_coloarbar_image = new System.Windows.Forms.PictureBox(); - this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); - this.mlb_bottomLabel = new ReaLTaiizor.Controls.MoonLabel(); - this.tableLayoutPanel1.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_auto)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hhpb_save)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_zoom_in)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_zoom_out)).BeginInit(); - this.tableLayoutPanel3.SuspendLayout(); - this.tlpanl_image_bar.SuspendLayout(); - this.pl_image.SuspendLayout(); - this.pl_bg_image.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pb_image)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pb_coloarbar_image)).BeginInit(); - this.tableLayoutPanel4.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 1; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 15F)); - this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel4, 0, 2); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(2, 19); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 12F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(363, 311); - this.tableLayoutPanel1.TabIndex = 0; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 7; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 28F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 28F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 43F)); - this.tableLayoutPanel2.Controls.Add(this.hpb_auto, 3, 0); - this.tableLayoutPanel2.Controls.Add(this.hhpb_save, 6, 0); - this.tableLayoutPanel2.Controls.Add(this.hpb_zoom_in, 4, 0); - this.tableLayoutPanel2.Controls.Add(this.poisonLabel1, 0, 0); - this.tableLayoutPanel2.Controls.Add(this.hpb_zoom_out, 5, 0); - this.tableLayoutPanel2.Controls.Add(this.mcb_mode, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.cb_scientific, 2, 0); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel2.Location = new System.Drawing.Point(2, 2); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 1; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(359, 18); - this.tableLayoutPanel2.TabIndex = 1; - // - // hpb_auto - // - this.hpb_auto.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_auto.Dock = System.Windows.Forms.DockStyle.Fill; - this.hpb_auto.Image = global::PBAnaly.Properties.Resources.全屏; - this.hpb_auto.Location = new System.Drawing.Point(234, 0); - this.hpb_auto.Margin = new System.Windows.Forms.Padding(0); - this.hpb_auto.Name = "hpb_auto"; - this.hpb_auto.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_auto.Size = new System.Drawing.Size(28, 18); - this.hpb_auto.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_auto.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_auto.TabIndex = 4; - this.hpb_auto.TabStop = false; - this.hpb_auto.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - this.hpb_auto.Click += new System.EventHandler(this.hpb_auto_Click); - // - // hhpb_save - // - this.hhpb_save.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hhpb_save.Dock = System.Windows.Forms.DockStyle.Fill; - this.hhpb_save.Image = global::PBAnaly.Properties.Resources.保存图片; - this.hhpb_save.Location = new System.Drawing.Point(316, 0); - this.hhpb_save.Margin = new System.Windows.Forms.Padding(0); - this.hhpb_save.Name = "hhpb_save"; - this.hhpb_save.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hhpb_save.Size = new System.Drawing.Size(43, 18); - this.hhpb_save.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hhpb_save.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hhpb_save.TabIndex = 3; - this.hhpb_save.TabStop = false; - this.hhpb_save.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - this.hhpb_save.Click += new System.EventHandler(this.hhpb_save_Click); - // - // hpb_zoom_in - // - this.hpb_zoom_in.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_zoom_in.Dock = System.Windows.Forms.DockStyle.Fill; - this.hpb_zoom_in.Image = global::PBAnaly.Properties.Resources.放大; - this.hpb_zoom_in.Location = new System.Drawing.Point(262, 0); - this.hpb_zoom_in.Margin = new System.Windows.Forms.Padding(0); - this.hpb_zoom_in.Name = "hpb_zoom_in"; - this.hpb_zoom_in.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_zoom_in.Size = new System.Drawing.Size(28, 18); - this.hpb_zoom_in.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_zoom_in.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_zoom_in.TabIndex = 3; - this.hpb_zoom_in.TabStop = false; - this.hpb_zoom_in.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - this.hpb_zoom_in.Click += new System.EventHandler(this.hpb_zoom_in_Click); - // - // poisonLabel1 - // - this.poisonLabel1.AutoSize = true; - this.poisonLabel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.poisonLabel1.Location = new System.Drawing.Point(2, 0); - this.poisonLabel1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.poisonLabel1.Name = "poisonLabel1"; - this.poisonLabel1.Size = new System.Drawing.Size(46, 18); - this.poisonLabel1.TabIndex = 0; - this.poisonLabel1.Text = "模式:"; - this.poisonLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // hpb_zoom_out - // - this.hpb_zoom_out.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_zoom_out.Dock = System.Windows.Forms.DockStyle.Fill; - this.hpb_zoom_out.Image = global::PBAnaly.Properties.Resources.缩小; - this.hpb_zoom_out.Location = new System.Drawing.Point(290, 0); - this.hpb_zoom_out.Margin = new System.Windows.Forms.Padding(0); - this.hpb_zoom_out.Name = "hpb_zoom_out"; - this.hpb_zoom_out.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_zoom_out.Size = new System.Drawing.Size(26, 18); - this.hpb_zoom_out.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_zoom_out.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_zoom_out.TabIndex = 2; - this.hpb_zoom_out.TabStop = false; - this.hpb_zoom_out.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - this.hpb_zoom_out.Click += new System.EventHandler(this.hpb_zoom_out_Click); - // - // mcb_mode - // - this.mcb_mode.AllowDrop = true; - this.mcb_mode.ArrowColor = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(150)))), ((int)(((byte)(150))))); - this.mcb_mode.BackColor = System.Drawing.Color.Transparent; - this.mcb_mode.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(238))))); - this.mcb_mode.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(150)))), ((int)(((byte)(150))))); - this.mcb_mode.CausesValidation = false; - this.mcb_mode.DisabledBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.mcb_mode.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155))))); - this.mcb_mode.DisabledForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136))))); - this.mcb_mode.Dock = System.Windows.Forms.DockStyle.Fill; - this.mcb_mode.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.mcb_mode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mcb_mode.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.mcb_mode.FormattingEnabled = true; - this.mcb_mode.IsDerivedStyle = true; - this.mcb_mode.ItemHeight = 20; - this.mcb_mode.Items.AddRange(new object[] { - "merge", - "mark", - "pseudocolor"}); - this.mcb_mode.Location = new System.Drawing.Point(52, 2); - this.mcb_mode.Margin = new System.Windows.Forms.Padding(2); - this.mcb_mode.Name = "mcb_mode"; - this.mcb_mode.SelectedItemBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(177)))), ((int)(((byte)(225))))); - this.mcb_mode.SelectedItemForeColor = System.Drawing.Color.White; - this.mcb_mode.Size = new System.Drawing.Size(76, 26); - this.mcb_mode.Style = ReaLTaiizor.Enum.Metro.Style.Light; - this.mcb_mode.StyleManager = null; - this.mcb_mode.TabIndex = 1; - this.mcb_mode.ThemeAuthor = "Taiizor"; - this.mcb_mode.ThemeName = "MetroLight"; - this.mcb_mode.SelectedIndexChanged += new System.EventHandler(this.mcb_mode_SelectedIndexChanged); - // - // cb_scientific - // - this.cb_scientific.Checked = false; - this.cb_scientific.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(76)))), ((int)(((byte)(85))))); - this.cb_scientific.CheckedBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(76)))), ((int)(((byte)(85))))); - this.cb_scientific.CheckedDisabledColor = System.Drawing.Color.Gray; - this.cb_scientific.CheckedEnabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(34)))), ((int)(((byte)(37))))); - this.cb_scientific.Cursor = System.Windows.Forms.Cursors.Hand; - this.cb_scientific.Dock = System.Windows.Forms.DockStyle.Fill; - this.cb_scientific.Enable = true; - this.cb_scientific.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - this.cb_scientific.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(116)))), ((int)(((byte)(125)))), ((int)(((byte)(132))))); - this.cb_scientific.Location = new System.Drawing.Point(133, 3); - this.cb_scientific.Name = "cb_scientific"; - this.cb_scientific.Size = new System.Drawing.Size(98, 16); - this.cb_scientific.TabIndex = 5; - this.cb_scientific.Text = "光子数"; - this.cb_scientific.CheckedChanged += new ReaLTaiizor.Controls.CheckBox.CheckedChangedEventHandler(this.cb_scientific_CheckedChanged); - // - // tableLayoutPanel3 - // - this.tableLayoutPanel3.ColumnCount = 2; - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 86.27969F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.72032F)); - this.tableLayoutPanel3.Controls.Add(this.tlpanl_image_bar, 0, 0); - this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel3.Location = new System.Drawing.Point(2, 24); - this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(2); - this.tableLayoutPanel3.Name = "tableLayoutPanel3"; - this.tableLayoutPanel3.RowCount = 1; - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(359, 273); - this.tableLayoutPanel3.TabIndex = 2; - // - // tlpanl_image_bar - // - this.tlpanl_image_bar.ColumnCount = 2; - this.tableLayoutPanel3.SetColumnSpan(this.tlpanl_image_bar, 2); - this.tlpanl_image_bar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 83.56546F)); - this.tlpanl_image_bar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.43454F)); - this.tlpanl_image_bar.Controls.Add(this.pl_image, 0, 0); - this.tlpanl_image_bar.Controls.Add(this.lb_wh, 1, 2); - this.tlpanl_image_bar.Controls.Add(this.lb_modename, 1, 0); - this.tlpanl_image_bar.Controls.Add(this.pb_coloarbar_image, 1, 1); - this.tlpanl_image_bar.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlpanl_image_bar.Location = new System.Drawing.Point(0, 0); - this.tlpanl_image_bar.Margin = new System.Windows.Forms.Padding(0); - this.tlpanl_image_bar.Name = "tlpanl_image_bar"; - this.tlpanl_image_bar.RowCount = 3; - this.tlpanl_image_bar.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 54F)); - this.tlpanl_image_bar.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpanl_image_bar.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F)); - this.tlpanl_image_bar.Size = new System.Drawing.Size(359, 273); - this.tlpanl_image_bar.TabIndex = 2; - // - // pl_image - // - this.pl_image.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(39)))), ((int)(((byte)(51)))), ((int)(((byte)(63))))); - this.pl_image.Controls.Add(this.pl_bg_image); - this.pl_image.Dock = System.Windows.Forms.DockStyle.Fill; - this.pl_image.EdgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); - this.pl_image.Location = new System.Drawing.Point(2, 2); - this.pl_image.Margin = new System.Windows.Forms.Padding(2); - this.pl_image.Name = "pl_image"; - this.pl_image.Padding = new System.Windows.Forms.Padding(4); - this.tlpanl_image_bar.SetRowSpan(this.pl_image, 3); - this.pl_image.Size = new System.Drawing.Size(296, 269); - this.pl_image.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.pl_image.TabIndex = 0; - this.pl_image.Text = "panel1"; - // - // pl_bg_image - // - this.pl_bg_image.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(39)))), ((int)(((byte)(51)))), ((int)(((byte)(63))))); - this.pl_bg_image.Controls.Add(this.pb_image); - this.pl_bg_image.EdgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50))))); - this.pl_bg_image.Location = new System.Drawing.Point(4, 4); - this.pl_bg_image.Margin = new System.Windows.Forms.Padding(0); - this.pl_bg_image.Name = "pl_bg_image"; - this.pl_bg_image.Padding = new System.Windows.Forms.Padding(5); - this.pl_bg_image.Size = new System.Drawing.Size(237, 181); - this.pl_bg_image.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.pl_bg_image.TabIndex = 1; - this.pl_bg_image.Text = "panel1"; - // - // pb_image - // - this.pb_image.Location = new System.Drawing.Point(5, 5); - this.pb_image.Margin = new System.Windows.Forms.Padding(0); - this.pb_image.Name = "pb_image"; - this.pb_image.Size = new System.Drawing.Size(180, 124); - this.pb_image.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pb_image.TabIndex = 0; - this.pb_image.TabStop = false; - // - // lb_wh - // - this.lb_wh.Font = new System.Drawing.Font("隶书", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lb_wh.Location = new System.Drawing.Point(303, 212); - this.lb_wh.Name = "lb_wh"; - this.lb_wh.Size = new System.Drawing.Size(53, 27); - this.lb_wh.TabIndex = 2; - this.lb_wh.Text = "Color Scale\r\nMin = 1\r\nMax= 2"; - this.lb_wh.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // lb_modename - // - this.lb_modename.Dock = System.Windows.Forms.DockStyle.Fill; - this.lb_modename.Location = new System.Drawing.Point(303, 3); - this.lb_modename.Name = "lb_modename"; - this.lb_modename.Size = new System.Drawing.Size(53, 48); - this.lb_modename.TabIndex = 3; - this.lb_modename.Text = ""; - // - // pb_coloarbar_image - // - this.pb_coloarbar_image.Location = new System.Drawing.Point(300, 54); - this.pb_coloarbar_image.Margin = new System.Windows.Forms.Padding(0); - this.pb_coloarbar_image.Name = "pb_coloarbar_image"; - this.pb_coloarbar_image.Size = new System.Drawing.Size(59, 73); - this.pb_coloarbar_image.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pb_coloarbar_image.TabIndex = 1; - this.pb_coloarbar_image.TabStop = false; - // - // tableLayoutPanel4 - // - this.tableLayoutPanel4.ColumnCount = 2; - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80.93587F)); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 19.06413F)); - this.tableLayoutPanel4.Controls.Add(this.mlb_bottomLabel, 0, 0); - this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel4.Location = new System.Drawing.Point(0, 299); - this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); - this.tableLayoutPanel4.Name = "tableLayoutPanel4"; - this.tableLayoutPanel4.RowCount = 1; - this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(363, 12); - this.tableLayoutPanel4.TabIndex = 3; - // - // mlb_bottomLabel - // - this.mlb_bottomLabel.AutoSize = true; - this.mlb_bottomLabel.BackColor = System.Drawing.Color.Transparent; - this.mlb_bottomLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.mlb_bottomLabel.ForeColor = System.Drawing.Color.Gray; - this.mlb_bottomLabel.Location = new System.Drawing.Point(2, 0); - this.mlb_bottomLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.mlb_bottomLabel.Name = "mlb_bottomLabel"; - this.mlb_bottomLabel.Size = new System.Drawing.Size(289, 12); - this.mlb_bottomLabel.TabIndex = 0; - this.mlb_bottomLabel.Text = "1920x1080 "; - this.mlb_bottomLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // ImagePanel - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.ButtonHighlight; - this.ClientSize = new System.Drawing.Size(367, 332); - this.Controls.Add(this.tableLayoutPanel1); - this.ForeColor = System.Drawing.SystemColors.ControlText; - this.FormStyle = MaterialSkin.Controls.MaterialForm.FormStyles.ActionBar_None; - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "ImagePanel"; - this.Padding = new System.Windows.Forms.Padding(2, 19, 2, 2); - this.Text = "ImagePanel"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ImagePanel_FormClosing); - this.Enter += new System.EventHandler(this.ImagePanel_Enter); - this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ImagePanel_MouseDown); - this.Resize += new System.EventHandler(this.ImagePanel_Resize); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel2.ResumeLayout(false); - this.tableLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_auto)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hhpb_save)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_zoom_in)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_zoom_out)).EndInit(); - this.tableLayoutPanel3.ResumeLayout(false); - this.tlpanl_image_bar.ResumeLayout(false); - this.pl_image.ResumeLayout(false); - this.pl_bg_image.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pb_image)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pb_coloarbar_image)).EndInit(); - this.tableLayoutPanel4.ResumeLayout(false); - this.tableLayoutPanel4.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private ReaLTaiizor.Controls.PoisonLabel poisonLabel1; - private ReaLTaiizor.Controls.MetroComboBox mcb_mode; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; - private ReaLTaiizor.Controls.Panel pl_image; - private System.Windows.Forms.PictureBox pb_image; - private ReaLTaiizor.Controls.HopePictureBox hpb_zoom_out; - private ReaLTaiizor.Controls.HopePictureBox hpb_zoom_in; - private ReaLTaiizor.Controls.HopePictureBox hhpb_save; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; - private ReaLTaiizor.Controls.MoonLabel mlb_bottomLabel; - private ReaLTaiizor.Controls.HopePictureBox hpb_auto; - private System.Windows.Forms.TableLayoutPanel tlpanl_image_bar; - private ReaLTaiizor.Controls.Panel pl_bg_image; - private System.Windows.Forms.PictureBox pb_coloarbar_image; - private AntdUI.Label lb_wh; - private AntdUI.Label lb_modename; - private ReaLTaiizor.Controls.CheckBox cb_scientific; - } -} \ No newline at end of file diff --git a/src/PBAnaly/UI/ImagePanel.cs b/src/PBAnaly/UI/ImagePanel.cs deleted file mode 100644 index 41e3b1b..0000000 --- a/src/PBAnaly/UI/ImagePanel.cs +++ /dev/null @@ -1,1593 +0,0 @@ -using MaterialSkin; -using MaterialSkin.Controls; -using OpenCvSharp; -using OpenCvSharp.Extensions; -using PBAnaly.Module; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp; -using System; -using System.Diagnostics.Eventing.Reader; -using System.Drawing; -using System.IO; -using System.Web.UI; -using System.Windows.Forms; -using Control = System.Windows.Forms.Control; -using System.Threading.Tasks; -using SixLabors.ImageSharp.Metadata; -using Aspose.Pdf.Drawing; -using System.Data.SqlTypes; -using System.Net.PeerToPeer.Collaboration; -using ScottPlot.Panels; -using ScottPlot; -using static Aspose.Pdf.CollectionItem; -using System.Collections.Generic; -using PBBiologyVC; -using System.Threading; -using AntdUI; -using Sunny.UI; -using System.Linq; -using MiniExcelLibs; -using ScottPlot.Colormaps; -using ReaLTaiizor.Extension; -using OpenTK.Graphics.ES11; - -namespace PBAnaly.UI -{ - public partial class ImagePanel : MaterialForm - { - #region 变量 - private MaterialSkinManager Inn_materialSkinManager; // 风格 - private string path; - private string markFilePath; - private string stnFilePath; - private bool scientificON = false; - public ImageToolPaletteForm paletteForm = null; - public ReaLTaiizor.Controls.Panel main_panel = null; - - PBBiologyVC.PBImageProcessVC pbpvc = new PBBiologyVC.PBImageProcessVC(); - - private Image pseu_rgb24_image = null; - private Image pseu_and_mark__rgb24_image = null; - - private Image pseu_L16_image = null; - private Image mark_L16_image = null; - - private Image colorbar_rgb24_image = null; - private byte[] colorbarimage = null; - private byte[] pseu_16_byte = null; - private byte[] pseu_8bit_3_byte = null; - private byte[] pseu_and_mark_8bit_3_byte = null; - private byte[] mark_L16_byte = null; - - private int colorbarWW = 200, colorh_onecolor = 10; - private int colorbarW = 600, colorbarH = 2600; - private int[] mark_h = null; - public int mark_max; - public int mark_min; - - private Bitmap curBitmap = null; - - private const float ZoomFactor = 1.2f; - private float currentZoom = 1.0f; - // 鼠标拖动相关变量 - private bool isDragging = false; - private System.Drawing.Point mouseDownPosition; - private System.Drawing.Point pictureBoxStartPosition; - - private bool drawLine = false; - private bool drawRect = false; - private bool drawCircle = false; - private bool drawpolygon = false; - private System.Drawing.Point startPoint = new System.Drawing.Point(-10,0); - private System.Drawing.Point endPoint = new System.Drawing.Point(-10, 0); - private System.Drawing.Point startRectPoint = new System.Drawing.Point(-10, 0); - private System.Drawing.Point startCirclePoint = new System.Drawing.Point(-10, 0); - private struct RectAndInfo - { - public System.Drawing.Rectangle rectangles; - public Pseudo_infoVC pdinfovc; - } - private List rectAndInfoList = new List(); - private System.Drawing.Rectangle curRectangle = new System.Drawing.Rectangle(0,0,0,0); - private System.Drawing.Point curRectanglePoint; - private System.Drawing.Point originalMousePosition; - private RectAndInfo movingRectangle; - private int curRectIndex = -1; - private Pseudo_infoVC curpdinfovc = null; - private struct CirceAndInfo - { - public System.Drawing.Point center; - public System.Drawing.Point Radius { get; set; } - public Pseudo_infoVC pdinfovc; - } - private List CircleAndInfoList = new List(); - private System.Drawing.Point curCirRadioPoint = new System.Drawing.Point( 0, 0); - private System.Drawing.Point curCirCenterPoint = new System.Drawing.Point(0, 0); - private System.Drawing.Point curCirPoint = new System.Drawing.Point(0, 0); - private System.Drawing.Point cirMousePosition; - private System.Drawing.Point cirRadioMousePosition; - private int curCircleIndex = -1; - private struct PolygonAndInfo - { - public List points ; - public Pseudo_infoVC pdinfovc; - } - private List PolygonAndInfoList = new List(); - private PolygonAndInfo curPolygonAndInfoList = new PolygonAndInfo(); - private System.Drawing.Point curStartPolygonPoint = new System.Drawing.Point(0, 0); - private System.Drawing.Point curPolygonPoint = new System.Drawing.Point(0, 0); - - private bool isStartCircleDragged, isEndCircleDragged,isEndRectDragged,isCircleFragged; - private bool isLineDragged; - private System.Drawing.Point previousMousePosition; // 记录鼠标的前一个位置 - private const int CircleRadius = 5; // 圆圈半径 - private string _colorValue; - private int _colorIndex; - public string colorValue - { - set { - - _colorValue = value; - } - } - public int colorIndex - { - set - { - _colorIndex = value; - - } - } - #endregion - public ImagePanel(string filePath, ReaLTaiizor.Controls.Panel _main_panel) - { - InitializeComponent(); - path = filePath; - pl_bg_image.Dock = DockStyle.None; - main_panel = _main_panel; - RefreshUI(); - Init(); - CenterPictureBox(); - - pb_image.MouseDown += pb_image_MouseDown; - pb_image.DoubleClick += Pb_image_DoubleClick; - pb_image.MouseMove += pb_image_MouseMove; - pb_image.MouseUp += pb_image_MouseUp; - pb_image.Paint += Pb_image_Paint; - - pl_image.MouseWheel += Pl_image_MouseWheel; - pl_image.Focus(); - - // 使用反射设置双缓冲 - System.Reflection.PropertyInfo property = typeof(Control).GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); - SetDoubleBuffering(pb_image,true); - - // ImageProcess.DrawRuler(pictureBox1); - } - - - - - #region 方法 - public void RefreshUI() - { - ImageToolMannage.imagePanel = this; - main_panel.Controls.Clear(); - if(paletteForm == null) - paletteForm = new ImageToolPaletteForm(); - paletteForm.TopLevel = false; - main_panel.Controls.Add(paletteForm); - paletteForm.Dock = DockStyle.Fill; - paletteForm.Show(); - } - private void SetDoubleBuffering(Control control, bool value) - { - // 使用反射设置双缓冲 - System.Reflection.PropertyInfo property = typeof(Control).GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); - property.SetValue(control, value, null); - } - public void Init() - { - string[] tifFiles = Directory.GetFiles(path, "*.tif", SearchOption.TopDirectoryOnly); - - foreach (string tifFile in tifFiles) - { - if (tifFile.ToUpper().Contains("MARKER")) - { - markFilePath = tifFile; - mark_L16_image = util.LoadTiffAsL16(markFilePath); - mark_L16_byte = util.ConvertL16ImageToByteArray(mark_L16_image); - (mark_h, mark_min,mark_max) = ImageProcess.CalculateHistogram(mark_L16_image); - - } - else - { - stnFilePath = tifFile; - pseu_L16_image = util.LoadTiffAsL16(stnFilePath); - } - } - - if (mark_L16_image == null || pseu_L16_image == null) - { - MessageBox.Show("图片格式加载不正确"); - return; - } - mlb_bottomLabel.Text = pseu_L16_image.Width.ToString() + "x" + pseu_L16_image.Height.ToString(); - pseu_16_byte = util.ConvertL16ImageToByteArray(pseu_L16_image); - pseu_8bit_3_byte = new byte[pseu_L16_image.Width * pseu_L16_image.Height * 3]; - pseu_and_mark_8bit_3_byte = new byte[pseu_L16_image.Width * pseu_L16_image.Height * 3]; - - colorbarimage = new byte[colorbarW* colorbarH * 3]; - colorbar_rgb24_image = util.ConvertByteArrayToRgb24Image(colorbarimage, colorbarW , colorbarH , 3); - int colorIndex = paletteForm.colorbarIndex; - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - - double opactity = paletteForm.opacity; - int brightness = paletteForm.brightness; - unsafe - { - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - fixed (byte* pseu_8bit_3_byte_src = pseu_8bit_3_byte) - { - fixed (byte* pseu_and_mark_8bit_3_byte_src= pseu_and_mark_8bit_3_byte) - { - fixed (byte* mark_L16_byte_src = mark_L16_byte) - { - fixed (byte* colorbarimage_src = colorbarimage) - { - var ret = pbpvc.render_process(pseu_16_byte_src, mark_L16_byte_src, pseu_8bit_3_byte_src, - pseu_and_mark_8bit_3_byte_src, colorbarimage_src, colorIndex, (ushort)(colorbarW), (ushort)colorbarH, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, - 1,_max, _min,scientificON == true?1:0, false, (ushort)colorbarWW, (ushort)colorh_onecolor, brightness, 1.0, opactity); - if (ret != -1) - { - if (colorIndex != 7) // 不为gray表 - { - pseu_rgb24_image = util.ConvertByteArrayToRgb24Image(pseu_8bit_3_byte, pseu_L16_image.Width, (ushort)pseu_L16_image.Height, 3); - pseu_and_mark__rgb24_image = util.ConvertByteArrayToRgb24Image(pseu_and_mark_8bit_3_byte, pseu_L16_image.Width, (ushort)pseu_L16_image.Height, 3); - colorbar_rgb24_image = util.ConvertByteArrayToRgb24Image(colorbarimage, colorbarW, colorbarH, 3); - } - } - } - - - } - - } - - } - } - } - - mcb_mode.SelectedIndex = 0; - } - private void CenterPictureBox() - { - // 设置 pl_bg_image 的位置,使其在 pl_image 中居中 - pl_bg_image.Left = (pl_image.ClientSize.Width - pl_bg_image.Width) / 2; - pl_bg_image.Top = (pl_image.ClientSize.Height - pl_bg_image.Height) / 2; - - //// 确保Panel的AutoScroll属性为true以便在放大后查看整个图片 - pl_image.AutoScroll = true; - - //// 防止图片超过panel的边界 - if (pl_bg_image.Left < 0) pl_bg_image.Left = 0; - if (pl_bg_image.Top < 0) pl_bg_image.Top = 0; - } - private void ZoomPictureBox(float factor) - { - // 按照缩放倍数调整图片的宽度和高度 - //pl_bg_image.Width = (int)(pl_bg_image.Width * factor); - //pl_bg_image.Height = (int)(pl_bg_image.Height * factor); - currentZoom *= factor; - - // 按照缩放比例调整pl_bg_image的宽度和高度 - pl_bg_image.Width = (int)(pl_bg_image.Width * factor); - pl_bg_image.Height = (int)(pl_bg_image.Height * factor); - // 调用方法使PB_image在pl_image中居中 - CenterPictureBox(); - } - private bool IsImageLargerThanPanel() - { - return pl_bg_image.Width > pl_image.ClientSize.Width || pl_bg_image.Height > pl_image.ClientSize.Height; - } - private DateTime lastExecutionTime = DateTime.MinValue; - private int throttleTime = 150; // 设置节流时间间隔(毫秒) - public async void ThisRefresh() - { - if ((DateTime.Now - lastExecutionTime).TotalMilliseconds < throttleTime) - { - return; // 如果距离上次调用时间间隔小于节流时间,则不执行 - } - - lastExecutionTime = DateTime.Now; - if (mcb_mode.SelectedIndex == 0) - { - await Task.Run(() => - { - // 渲染操作在异步任务中执行 - - byte[] colorbarimage = new byte[colorbarW * colorbarH * 3]; - int colorIndex = paletteForm.colorbarIndex; - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - - double opactity = paletteForm.opacity; - int brightness = paletteForm.brightness; - unsafe - { - - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - fixed (byte* pseu_8bit_3_byte_src = pseu_8bit_3_byte) - { - fixed (byte* pseu_and_mark_8bit_3_byte_src = pseu_and_mark_8bit_3_byte) - { - fixed (byte* mark_L16_byte_src = mark_L16_byte) - { - fixed (byte* colorbarimage_src = colorbarimage) - { - var ret = pbpvc.render_process(pseu_16_byte_src, mark_L16_byte_src, pseu_8bit_3_byte_src, - pseu_and_mark_8bit_3_byte_src, colorbarimage_src, colorIndex, (ushort)(colorbarW), (ushort)colorbarH, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, - 1, _max, _min, scientificON == true ? 1 : 0, false, (ushort)colorbarWW, (ushort)colorh_onecolor, brightness, 1.0, opactity); - if (ret != -1) - { - pseu_rgb24_image = util.ConvertByteArrayToRgb24Image(pseu_8bit_3_byte, pseu_L16_image.Width, (ushort)pseu_L16_image.Height, 3); - pseu_and_mark__rgb24_image = util.ConvertByteArrayToRgb24Image(pseu_and_mark_8bit_3_byte, pseu_L16_image.Width, (ushort)pseu_L16_image.Height, 3); - colorbar_rgb24_image = util.ConvertByteArrayToRgb24Image(colorbarimage, colorbarW, colorbarH, 3); - } - } - } - - } - - } - } - - } - - // 更新 PictureBox 图像 - //Action updateImageAction = () => - //{ - // pb_image.Image = util.ConvertRgb24ImageToBitmap(pseu_and_mark__rgb24_image); - // curBitmap = (Bitmap)pb_image.Image; - // pb_coloarbar_image.Image = util.ConvertRgb24ImageToBitmap(colorbar_rgb24_image); - // pb_image.Refresh(); - // lb_wh.Text = "color scale\n min=" + _min.ToString() + "\n max=" + _max.ToString(); - //}; - - // 检查是否需要在 UI 线程上更新 - if (pb_image.InvokeRequired) - { - pb_image.Invoke((Action)(() => UpdateImages(_min, _max))); - } - else - { - UpdateImages(_min, _max); - } - }); - } - - } - private void UpdateImages(float _min, float _max) - { - pb_image.Image = util.ConvertRgb24ImageToBitmap(pseu_and_mark__rgb24_image); - curBitmap = (Bitmap)pb_image.Image; - pb_coloarbar_image.Image = util.ConvertRgb24ImageToBitmap(colorbar_rgb24_image); - pb_image.Refresh(); - if (scientificON) - { - - lb_wh.Text = "Radiance (p/sec/cm²/sr)\n color scale\n min=" + util.GetscientificNotation(_min) + "\n max=" + util.GetscientificNotation(_max); - } - else - { - lb_wh.Text = "Radiance (p/sec/cm²/sr)\n color scale\n min=" + _min.ToString() + "\n max=" + _max.ToString(); - } - - } - public void SampleOneSize() - { - var _w = paletteForm.ROI_W; - var _h = paletteForm.ROI_H; - for (int i = 0; i < rectAndInfoList.Count; i++) - { - RectAndInfo raif = new RectAndInfo(); - System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(rectAndInfoList[i].rectangles.X, rectAndInfoList[i].rectangles.Y, _w, _h); - Pseudo_infoVC pivc = rectAndInfoList[i].pdinfovc; - raif.pdinfovc = pivc; - rectAndInfoList[i] = raif; - } - var _r = paletteForm.CIRCLE_R; - - for (int i = 0; i < CircleAndInfoList.Count; i++) - { - CirceAndInfo raif = new CirceAndInfo(); - double angleInRadians = 90 * Math.PI / 180; // Convert degrees to radians - double x = CircleAndInfoList[i].center.X + paletteForm.CIRCLE_R * Math.Cos(angleInRadians); - double y = CircleAndInfoList[i].center.Y + paletteForm.CIRCLE_R * Math.Sin(angleInRadians); - - raif.Radius = new System.Drawing.Point((int)x, (int)y); - - Pseudo_infoVC pivc = rectAndInfoList[i].pdinfovc; - raif.pdinfovc = pivc; - raif.center = CircleAndInfoList[i].center; - CircleAndInfoList[i] = raif; - } - - pb_image.Invalidate(); - } - - public void updateBrightness() - { - - //Mat mat = curBitmap.ToMat(); - //int beta = ImageToolMannage.beta - 127; - //Cv2.ConvertScaleAbs(mat,mat,1,beta); - //pb_image.Image = mat.ToBitmap(); - - } - private bool IsPointInRectangleCorner(System.Drawing.Point point, System.Drawing.Rectangle rect) - { - const int cornerDistance = 10; // 角落拖动区域的距离 - - // 计算矩形四个角落的位置 - System.Drawing.Point[] corners = new System.Drawing.Point[] - { - new System.Drawing.Point(rect.Left, rect.Top), // 左上角 - new System.Drawing.Point(rect.Right, rect.Top), // 右上角 - new System.Drawing.Point(rect.Left, rect.Bottom), // 左下角 - new System.Drawing.Point(rect.Right, rect.Bottom) // 右下角 - }; - - // 判断鼠标是否在某个角落的拖动区域内 - foreach (var corner in corners) - { - if (Math.Abs(corner.X - point.X) <= cornerDistance && Math.Abs(corner.Y - point.Y) <= cornerDistance) - { - return true; - } - } - - return false; - } - // 判断点是否在矩形里 - private bool IsPointInRectangles(System.Drawing.Point point, List rectangles) - { - foreach (var rect in rectangles) - { - if (rect.rectangles.Contains(point)) - return true; - } - return false; - } - - private bool IsPointInRectangles(System.Drawing.Point point, System.Drawing.Rectangle rectangles) - { - return rectangles.Contains(point); - } - // 判断点是否在圆圈内 - private bool IsPointInCircle(System.Drawing.Point point, List circleCenter) - { - foreach (var circle in circleCenter) - { - int radius = (int)Math.Sqrt(Math.Pow(circle.center.X - circle.Radius.X, 2) + Math.Pow(circle.center.Y - circle.Radius.Y, 2)); - double distance = Math.Sqrt(Math.Pow(point.X - circle.center.X, 2) + Math.Pow(point.Y - circle.center.Y, 2)); - if (distance <= radius) return true; - } - - return false; - } - private bool IsPointInCircle(System.Drawing.Point point, System.Drawing.Point circle) - { - double distance = Math.Sqrt(Math.Pow(point.X - circle.X, 2) + Math.Pow(point.Y - circle.Y, 2)); - return distance <= CircleRadius; - } - - private bool IsPointInPolygon(System.Drawing.Point testPoint, PolygonAndInfo polygon) - { - if (polygon.points == null) return false; ; - var points = polygon.points; - bool result = false; - int j = points.Count - 1; // The last vertex is the 'previous' one to the first - - for (int i = 0; i < points.Count; i++) - { - if (points[i].Y < testPoint.Y && points[j].Y >= testPoint.Y || points[j].Y < testPoint.Y && points[i].Y >= testPoint.Y) - { - if (points[i].X + (testPoint.Y - points[i].Y) / (points[j].Y - points[i].Y) * (points[j].X - points[i].X) < testPoint.X) - { - result = !result; - } - } - j = i; // j is previous vertex to i - } - - return result; - } - // 绘制圆圈的帮助方法 - private void DrawCircle(Graphics g, System.Drawing.Point center, int radius, Pen pen, Brush brush) - { - System.Drawing.Rectangle rect = new System.Drawing.Rectangle(center.X - radius, center.Y - radius, radius * 2, radius * 2); - g.FillEllipse(brush, rect); - g.DrawEllipse(pen, rect); - } - private bool IsPointOnLine(System.Drawing.Point point) - { - System.Drawing.Point readLoction = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, point); - // 使用线段的最小距离判断点是否在线段上 - double distance = DistanceToLine(readLoction, startPoint, endPoint); - return distance <= CircleRadius; // 如果距离小于等于圆圈半径,认为在线段上 - } - private double DistanceToLine(System.Drawing.Point p, System.Drawing.Point p1, System.Drawing.Point p2) - { - double A = p.X - p1.X; - double B = p.Y - p1.Y; - double C = p2.X - p1.X; - double D = p2.Y - p1.Y; - - double dot = A * C + B * D; - double lenSq = C * C + D * D; - double param = (lenSq != 0) ? dot / lenSq : -1; - - double xx, yy; - - if (param < 0) - { - xx = p1.X; - yy = p1.Y; - } - else if (param > 1) - { - xx = p2.X; - yy = p2.Y; - } - else - { - xx = p1.X + param * C; - yy = p1.Y + param * D; - } - - double dx = p.X - xx; - double dy = p.Y - yy; - return Math.Sqrt(dx * dx + dy * dy); - } - #endregion - - #region 事件 - private void Pb_image_Paint(object sender, PaintEventArgs e) - { - Graphics g = e.Graphics; - - // 绘制直线 - if (startPoint != System.Drawing.Point.Empty && endPoint != System.Drawing.Point.Empty) - { - g.DrawLine(Pens.Red, startPoint, endPoint); - - // 绘制起点和终点的圆圈 - DrawCircle(g, startPoint, CircleRadius, Pens.Blue, Brushes.LightBlue); - DrawCircle(g, endPoint, CircleRadius, Pens.Blue, Brushes.LightBlue); - } - int labelIndex = 1; - foreach (var rect in rectAndInfoList) - { - var rectangles = ImageProcess.ConvertRealToPictureBoxRectangle(pb_image, rect.rectangles); - - g.DrawRectangle(Pens.Red, rectangles); - System.Drawing.Point[] corners = new System.Drawing.Point[] - { - new System.Drawing.Point(rectangles.Left, rectangles.Top), // 左上角 - new System.Drawing.Point(rectangles.Right, rectangles.Top), // 右上角 - new System.Drawing.Point(rectangles.Left, rectangles.Bottom), // 左下角 - new System.Drawing.Point(rectangles.Right, rectangles.Bottom) // 右下角 - }; - foreach (var item in corners) - { - - DrawCircle(g, new System.Drawing.Point(item.X, item.Y), CircleRadius, Pens.Blue, Brushes.LightBlue); - } - - // 指向线的起点在矩形的顶部中心 - System.Drawing.Point centerTopPoint = new System.Drawing.Point( - rectangles.Left + rectangles.Width / 2, - rectangles.Top - ); - - // 指向线的终点在矩形上方10像素 - System.Drawing.Point labelPoint = new System.Drawing.Point( - centerTopPoint.X, - centerTopPoint.Y - 10 - ); - // 画垂直的指向线 - g.DrawLine(Pens.Red, centerTopPoint, labelPoint); - // 画标签 - if (rect.pdinfovc != null) - { - string labelText = ""; - if (scientificON) - { - - - labelText = $"ROI:{labelIndex++},AOD:{util.GetscientificNotation(rect.pdinfovc.AOD) },IOD:{util.GetscientificNotation(rect.pdinfovc.IOD) }," + - $"\r\nmaxOD:{util.GetscientificNotation(rect.pdinfovc.maxOD)},minOD:{util.GetscientificNotation(rect.pdinfovc.minOD)},Count:{util.GetscientificNotation(rect.pdinfovc.Count)}"; - } - else - { - labelText = $"ROI:{labelIndex++},AOD:{rect.pdinfovc.AOD},IOD:{rect.pdinfovc.IOD}," + - $"\r\nmaxOD:{rect.pdinfovc.maxOD},minOD:{rect.pdinfovc.minOD},Count:{rect.pdinfovc.Count}"; // 标签编号 - } - - Font font = new Font("Arial", 8); // 字体 - Brush brush = Brushes.Red; // 字体颜色 - g.DrawString(labelText, font, brush, labelPoint.X - 10, labelPoint.Y - 15); - } - - - } - if (drawRect) - { - g.DrawRectangle(Pens.Red, curRectangle); - } - else if (isEndRectDragged) - { - var rectangles = ImageProcess.ConvertRealToPictureBoxRectangle(pb_image, movingRectangle.rectangles); - g.DrawRectangle(Pens.Red, rectangles); - } - labelIndex = 0; - foreach (var item in CircleAndInfoList) - { - var centerPoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, item.center); - var radiusPoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, item.Radius); - int radius = (int)Math.Sqrt(Math.Pow(centerPoint.X - radiusPoint.X, 2) + Math.Pow(centerPoint.Y - radiusPoint.Y, 2)); - e.Graphics.DrawEllipse(Pens.Red, centerPoint.X - radius, centerPoint.Y - radius, radius * 2, radius * 2); - DrawCircle(g, new System.Drawing.Point(radiusPoint.X, radiusPoint.Y), CircleRadius, Pens.Blue, Brushes.LightBlue); - - - // 指向线的终点在矩形上方10像素 - System.Drawing.Point labelPoint = new System.Drawing.Point( - centerPoint.X, - centerPoint.Y - radius-10 - ); - // 画垂直的指向线 - g.DrawLine(Pens.Red, centerPoint, labelPoint); - // 画标签 - if (item.pdinfovc != null) - { - - string labelText = ""; - if (scientificON) - { - - - labelText = $"ROI:{labelIndex++},AOD:{util.GetscientificNotation(item.pdinfovc.AOD)},IOD:{util.GetscientificNotation(item.pdinfovc.IOD)}," + - $"\r\nmaxOD:{util.GetscientificNotation(item.pdinfovc.maxOD)},minOD:{util.GetscientificNotation(item.pdinfovc.minOD)},Count:{util.GetscientificNotation(item.pdinfovc.Count)}"; - } - else - { - labelText = $"ROI:{labelIndex++},AOD:{item.pdinfovc.AOD},IOD:{item.pdinfovc.IOD}," + - $"\r\nmaxOD:{item.pdinfovc.maxOD},minOD:{item.pdinfovc.minOD},Count:{item.pdinfovc.Count}"; // 标签编号 - } - Font font = new Font("Arial", 8); // 字体 - Brush brush = Brushes.Red; // 字体颜色 - g.DrawString(labelText, font, brush, labelPoint.X - 10, labelPoint.Y - 15); - } - } - if (drawCircle) - { - int radius = (int)Math.Sqrt(Math.Pow(curCirCenterPoint.X - curCirRadioPoint.X, 2) + Math.Pow(curCirCenterPoint.Y - curCirRadioPoint.Y, 2)); - e.Graphics.DrawEllipse(Pens.Red, curCirCenterPoint.X - radius, curCirCenterPoint.Y - radius, radius * 2, radius * 2); - DrawCircle(g, new System.Drawing.Point(curCirRadioPoint.X, curCirRadioPoint.Y), CircleRadius, Pens.Blue, Brushes.LightBlue); - } - else if (isCircleFragged) - { - var centerPoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, cirMousePosition); - var radiusPoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, cirRadioMousePosition); - int radius = (int)Math.Sqrt(Math.Pow(centerPoint.X - radiusPoint.X, 2) + Math.Pow(centerPoint.Y - radiusPoint.Y, 2)); - e.Graphics.DrawEllipse(Pens.Red, centerPoint.X - radius, centerPoint.Y - radius, radius * 2, radius * 2); - - } - if (PolygonAndInfoList != null) - { - int isStart = 0; - System.Drawing.Point point = new System.Drawing.Point(); - foreach (var item1 in PolygonAndInfoList) - { - foreach (var item in item1.points) - { - if (isStart == 0) - { - point = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, item); - } - System.Drawing.Point curpoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, item); - DrawCircle(g, curpoint, CircleRadius, Pens.Blue, Brushes.LightBlue); - g.DrawLine(Pens.Red, curpoint, point); - point = curpoint; - isStart++; - } - - } - - if (drawpolygon) - { - - point = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, curPolygonAndInfoList.points[curPolygonAndInfoList.points.Count-1]); - g.DrawLine(Pens.Red, curPolygonPoint, point); - foreach (var item in curPolygonAndInfoList.points) - { - if (isStart == 0) - { - point = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, item); - } - System.Drawing.Point curpoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, item); - DrawCircle(g, curpoint, CircleRadius, Pens.Blue, Brushes.LightBlue); - g.DrawLine(Pens.Red, curpoint, point); - point = curpoint; - isStart++; - } - } - else - { - if (curPolygonAndInfoList.pdinfovc != null) - { - - string labelText = ""; - if (scientificON) - { - - - labelText = $"ROI:{labelIndex++},AOD:{util.GetscientificNotation(curPolygonAndInfoList.pdinfovc.AOD)},IOD:{util.GetscientificNotation(curPolygonAndInfoList.pdinfovc.IOD)}," + - $"\r\nmaxOD:{util.GetscientificNotation(curPolygonAndInfoList.pdinfovc.maxOD)},minOD:{util.GetscientificNotation(curPolygonAndInfoList.pdinfovc.minOD)},Count:{util.GetscientificNotation(curPolygonAndInfoList.pdinfovc.Count)}"; - } - else - { - labelText = $"ROI:{labelIndex++},AOD:{curPolygonAndInfoList.pdinfovc.AOD},IOD:{curPolygonAndInfoList.pdinfovc.IOD}," + - $"\r\nmaxOD:{curPolygonAndInfoList.pdinfovc.maxOD},minOD:{curPolygonAndInfoList.pdinfovc.minOD},Count:{curPolygonAndInfoList.pdinfovc.Count}"; // 标签编号 - } - Font font = new Font("Arial", 8); // 字体 - Brush brush = Brushes.Red; // 字体颜色 - System.Drawing.Point curpoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, curPolygonAndInfoList.points[0]); - g.DrawString(labelText, font, brush, curpoint.X - 10, curpoint.Y - 15); - } - } - } - - } - - private void Pl_image_MouseWheel(object sender, MouseEventArgs e) - { - if (e.Delta > 0) - { - // 滚轮向上,放大图片 - ZoomPictureBox(ZoomFactor); - } - else if (e.Delta < 0) - { - ZoomPictureBox(1 / ZoomFactor); - // 滚轮向下,缩小图片,但不能缩小到小于pl_image的尺寸 - //if (pl_bg_image.Width > pl_bg_image.Width / ZoomFactor && pl_bg_image.Height > pl_bg_image.Height / ZoomFactor) - //{ - // ZoomPictureBox(1 / ZoomFactor); - //} - } - } - - - private void pb_image_MouseDown(object sender, MouseEventArgs e) - { - System.Drawing.Point readLoction = ImageProcess.GetRealImageCoordinates(pb_image, e.Location); - if (ImageToolMannage.lineDisON && e.Button == MouseButtons.Left) - { - drawLine = true; - startPoint = e.Location; - } - else if (ImageToolMannage.rectON && e.Button == MouseButtons.Left) - { - drawRect = true; - startRectPoint = e.Location; - curRectangle = new System.Drawing.Rectangle(e.Location, new System.Drawing.Size(0, 0)); - } - else if (ImageToolMannage.circleON && e.Button == MouseButtons.Left) - { - drawCircle = true; - startCirclePoint = e.Location; - curCirCenterPoint = e.Location; - curCirRadioPoint = e.Location; - } - else if (ImageToolMannage.linepolygonON && e.Button == MouseButtons.Left) - { - drawpolygon = true; - if (curPolygonAndInfoList.points == null) - { - curPolygonAndInfoList.points = new List(); - } - System.Drawing.Point curPoint = ImageProcess.GetRealImageCoordinates(pb_image, e.Location); - curPolygonAndInfoList.points.Add(curPoint); - } - else if (IsPointInCircle(readLoction, startPoint) && e.Button == MouseButtons.Left) - { - isStartCircleDragged = true; - } - else if (IsPointInCircle(readLoction, endPoint) && e.Button == MouseButtons.Left) - { - isEndCircleDragged = true; - } - else if (IsPointInCircle(readLoction, CircleAndInfoList) && e.Button == MouseButtons.Left) - { - int index = 0; - foreach (var circle in CircleAndInfoList) - { - int radius = (int)Math.Sqrt(Math.Pow(circle.center.X - circle.Radius.X, 2) + Math.Pow(circle.center.Y - circle.Radius.Y, 2)); - double distance = Math.Sqrt(Math.Pow(readLoction.X - circle.center.X, 2) + Math.Pow(readLoction.Y - circle.center.Y, 2)); - if (distance <= radius) - { - curCirPoint = readLoction; - - curCircleIndex = index; - cirMousePosition =circle.center; - cirRadioMousePosition = circle.Radius; - isCircleFragged = true; - break; - } - index++; - } - } - else if (IsPointInRectangles(readLoction, rectAndInfoList) && e.Button == MouseButtons.Left) - { - int index = 0; - foreach (var rect in rectAndInfoList) - { - if (rect.rectangles.Contains(readLoction)) - { - isEndRectDragged = true; - movingRectangle = rect; - curRectanglePoint = readLoction; - curRectIndex = index; - break; - } - index++; - } - - } - else if (e.Button == MouseButtons.Left && IsImageLargerThanPanel()) - { - isDragging = true; - mouseDownPosition = e.Location; - pictureBoxStartPosition = pl_bg_image.Location; - pl_bg_image.Cursor = Cursors.Hand; - - } - } - private void Pb_image_DoubleClick(object sender, EventArgs e) - { - if (ImageToolMannage.linepolygonON && drawpolygon == true) - { - - if (curPolygonAndInfoList.points != null) - { - System.Drawing.Point firstPoint = curPolygonAndInfoList.points[0]; - System.Drawing.Point lastPoint = curPolygonAndInfoList.points[curPolygonAndInfoList.points.Count - 1]; - firstPoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, firstPoint); - lastPoint = ImageProcess.ConvertRealToPictureBoxCoordinates(pb_image, lastPoint); - double deltaX = lastPoint.X - firstPoint.X; - double deltaY = lastPoint.Y - firstPoint.Y; - var value = Math.Sqrt(deltaX * deltaX + deltaY * deltaY); - if (value <= 5) - { - lastPoint = firstPoint; - drawpolygon = false; - ImageToolMannage.linepolygonON = false; - pb_image.Invalidate(); - - // 计算光子量 - - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - List curVclist = new List(); - - foreach (var item in curPolygonAndInfoList.points) - { - Point_VC pvc = new Point_VC(item.X,item.Y); - curVclist.Add(pvc); - - } - unsafe - { - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - curpdinfovc = pbpvc.get_pseudo_info_polygon_vc(pseu_16_byte_src, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, _max, _min, curVclist); - - } - } - curPolygonAndInfoList.pdinfovc = curpdinfovc; - - PolygonAndInfoList.Add(curPolygonAndInfoList); - } - - - } - - - } - } - private void pb_image_MouseMove(object sender, MouseEventArgs e) - { - System.Drawing.Point readLoction = ImageProcess.GetRealImageCoordinates(pb_image, e.Location); - if (ImageToolMannage.lineDisON && drawLine) - { - endPoint = e.Location; // 更新终点位置 - pb_image.Invalidate(); // 触发重绘 - } - else if (ImageToolMannage.rectON && drawRect) - { - curRectangle.Width = Math.Abs(e.X - startRectPoint.X); - curRectangle.Height = Math.Abs(e.Y - startRectPoint.Y); - - // 处理矩形位置,以确保其起点是左上角 - curRectangle.X = Math.Min(startRectPoint.X, e.X); - curRectangle.Y = Math.Min(startRectPoint.Y, e.Y); - pb_image.Invalidate(); - } - else if (ImageToolMannage.circleON && drawCircle) - { - curCirRadioPoint = e.Location; - pb_image.Invalidate(); - } - else if (ImageToolMannage.linepolygonON && drawpolygon) - { - curPolygonPoint = e.Location; - pb_image.Invalidate(); - } - else if (IsPointInCircle(readLoction, startPoint) || IsPointInCircle(readLoction, endPoint)) - { - pb_image.Cursor = Cursors.Hand; - } - else if (IsPointInRectangles(readLoction, rectAndInfoList)) - { - pb_image.Cursor = Cursors.Hand; - - } - else if (IsPointInCircle(readLoction, CircleAndInfoList)) - { - pb_image.Cursor = Cursors.Hand; - } - else if (isStartCircleDragged) - { - - // 拖动起始点 - startPoint = e.Location; - pb_image.Invalidate(); - } - else if (isEndCircleDragged) - { - // 拖动终点 - endPoint = e.Location; - pb_image.Invalidate(); - } - - else if (isDragging) - { - int deltaX = e.X - mouseDownPosition.X; - int deltaY = e.Y - mouseDownPosition.Y; - - // 仅当鼠标移动时调整位置,减少频繁重绘 - if (Math.Abs(deltaX) > 1 || Math.Abs(deltaY) > 1) - { - pl_bg_image.Left = pictureBoxStartPosition.X + deltaX; - pl_bg_image.Top = pictureBoxStartPosition.Y + deltaY; - - // 防止 pl_bg_image 拖动超出 pl_image 的范围 - if (pl_bg_image.Left > 0) pl_bg_image.Left = 0; - if (pl_bg_image.Top > 0) pl_bg_image.Top = 0; - if (pl_bg_image.Right < pl_image.ClientSize.Width) - pl_bg_image.Left = pl_image.ClientSize.Width - pl_bg_image.Width; - if (pl_bg_image.Bottom < pl_image.ClientSize.Height) - pl_bg_image.Top = pl_image.ClientSize.Height - pl_bg_image.Height; - } - - - } - else if (isEndRectDragged) - { - if (rectAndInfoList.Count > 0) - { - int _xvalue = readLoction.X - curRectanglePoint.X; - int _yvalue = readLoction.Y - curRectanglePoint.Y; - movingRectangle.rectangles.X += _xvalue; movingRectangle.rectangles.Y += _yvalue; - curRectanglePoint = readLoction; - pb_image.Invalidate(); - - rectAndInfoList[curRectIndex] = movingRectangle; - } - - } - else if (isCircleFragged) - { - - if (CircleAndInfoList.Count > 0) - { - int _xvalue = readLoction.X - curCirPoint.X; - int _yvalue = readLoction.Y - curCirPoint.Y; - - cirMousePosition.X += _xvalue; cirMousePosition.Y += _yvalue; - cirRadioMousePosition.X += _xvalue; - cirRadioMousePosition.Y += _yvalue; - curCirPoint = readLoction; - - CirceAndInfo caif = new CirceAndInfo(); - caif.center = cirMousePosition; - caif.Radius = cirRadioMousePosition; - caif.pdinfovc = CircleAndInfoList[curCircleIndex].pdinfovc; - CircleAndInfoList[curCircleIndex] = caif; - pb_image.Invalidate(); - } - - } - else if (IsPointInRectangles(e.Location, rectAndInfoList)) - { - pb_image.Cursor = Cursors.Hand; - } - else - { - pb_image.Cursor = Cursors.Default; - } - } - private void pb_image_MouseUp(object sender, MouseEventArgs e) - { - System.Drawing.Point readLoction = ImageProcess.GetRealImageCoordinates(pb_image, e.Location); - isDragging = false; - if (e.Button == MouseButtons.Left) - { - drawLine = false; - if (drawRect) - { - RectAndInfo rai = new RectAndInfo(); - rai.rectangles = ImageProcess.GetRealImageRectangle(pb_image,curRectangle); - if (ImageToolMannage.RoiIndex == 0) - { - ImageToolMannage.Roi_w = rai.rectangles.Width; - ImageToolMannage.Roi_h = rai.rectangles.Height; - - paletteForm.ROI_W = rai.rectangles.Width; - paletteForm.ROI_H = rai.rectangles.Height; - } - else - { - rai.rectangles.Width = ImageToolMannage.Roi_w; - rai.rectangles.Height = ImageToolMannage.Roi_h; - paletteForm.ROI_W = ImageToolMannage.Roi_w; - paletteForm.ROI_H = ImageToolMannage.Roi_h; - } - ImageToolMannage.RoiIndex++; - System.Drawing.Point curPoint = ImageProcess.GetRealImageCoordinates(pb_image,new System.Drawing.Point( curRectangle.X,curRectangle.Y)); - // 计算光子数并展示出来 - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - - unsafe - { - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - curpdinfovc = pbpvc.get_pseudo_info_rect_vc(pseu_16_byte_src, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, _max, _min, curPoint.X, curPoint.Y, curRectangle.Width, curRectangle.Height); - - } - } - rai.pdinfovc = curpdinfovc; - rectAndInfoList.Add(rai); - drawRect = false; - - - - } - if (drawCircle) - { - CirceAndInfo circeAndInfo = new CirceAndInfo(); - - circeAndInfo.Radius = ImageProcess.GetRealImageCoordinates(pb_image, curCirRadioPoint); - circeAndInfo.center = ImageProcess.GetRealImageCoordinates(pb_image, curCirCenterPoint); - if (ImageToolMannage.CircleIndex == 0) - { - paletteForm.CIRCLE_R = (int)Math.Sqrt(Math.Pow(circeAndInfo.center.X - circeAndInfo.Radius.X, 2) + Math.Pow(circeAndInfo.center.Y - circeAndInfo.Radius.Y, 2)); - ImageToolMannage.Roi_r = paletteForm.CIRCLE_R; - } - else - { - paletteForm.CIRCLE_R = ImageToolMannage.Roi_r; - double angleInRadians = 90 * Math.PI / 180; // Convert degrees to radians - double x = circeAndInfo.center.X + paletteForm.CIRCLE_R * Math.Cos(angleInRadians); - double y = circeAndInfo.center.Y + paletteForm.CIRCLE_R * Math.Sin(angleInRadians); - - circeAndInfo.Radius = new System.Drawing.Point((int)x, (int)y); - } - ImageToolMannage.CircleIndex++; - - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - int radius = (int)Math.Sqrt(Math.Pow(circeAndInfo.center.X - circeAndInfo.Radius.X, 2) + Math.Pow(circeAndInfo.center.Y - circeAndInfo.Radius.Y, 2)); - unsafe - { - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - curpdinfovc = pbpvc.get_pseudo_info_circle_vc(pseu_16_byte_src, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, _max, _min, circeAndInfo.center.X, circeAndInfo.center.Y, radius); - - } - } - circeAndInfo.pdinfovc = curpdinfovc; - - CircleAndInfoList.Add(circeAndInfo); - drawCircle = false; - } - ImageToolMannage.rectON = false; - ImageToolMannage.circleON = false; - if (isEndRectDragged) - { - RectAndInfo rai = new RectAndInfo(); - rai.rectangles = movingRectangle.rectangles; - - rai.rectangles.Width = paletteForm.ROI_W; - rai.rectangles.Height = paletteForm.ROI_H; - - - // 计算光子数并展示出来 - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - - unsafe - { - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - curpdinfovc = pbpvc.get_pseudo_info_rect_vc(pseu_16_byte_src, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, _max, _min, rai.rectangles.X, rai.rectangles.Y, curRectangle.Width, curRectangle.Height); - - } - } - rai.pdinfovc = curpdinfovc; - rectAndInfoList[curRectIndex] = rai; - isEndRectDragged = false; - } - if (isCircleFragged) - { - CirceAndInfo circeAndInfo = new CirceAndInfo(); - - circeAndInfo.Radius = cirRadioMousePosition; - circeAndInfo.center = cirMousePosition; - - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - int radius = (int)Math.Sqrt(Math.Pow(circeAndInfo.center.X - circeAndInfo.Radius.X, 2) + Math.Pow(circeAndInfo.center.Y - circeAndInfo.Radius.Y, 2)); - unsafe - { - fixed (byte* pseu_16_byte_src = pseu_16_byte) - { - curpdinfovc = pbpvc.get_pseudo_info_circle_vc(pseu_16_byte_src, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, _max, _min, circeAndInfo.center.X, circeAndInfo.center.Y, radius); - - } - } - circeAndInfo.pdinfovc = curpdinfovc; - - CircleAndInfoList[curCircleIndex] = circeAndInfo; - isCircleFragged = false; - curCircleIndex = -1; - } - pb_image.Invalidate(); - if (isStartCircleDragged || isEndCircleDragged || ImageToolMannage.lineDisON) - { - System.Drawing.Point curEndPoint = ImageProcess.GetRealImageCoordinates(pb_image, endPoint); - System.Drawing.Point curStartPoint = ImageProcess.GetRealImageCoordinates(pb_image, startPoint); - // 计算距离 - double deltaX = curEndPoint.X - curStartPoint.X; - double deltaY = curEndPoint.Y - curStartPoint.Y; - var value = Math.Sqrt(deltaX * deltaX + deltaY * deltaY); - paletteForm.SetactMM(value.ToString() + " mm"); - - - } - isStartCircleDragged = false; - isEndCircleDragged = false; - ImageToolMannage.lineDisON = false; - - - } - else if (e.Button == MouseButtons.Right) - { - if (IsPointOnLine(readLoction)) - { - startPoint = new System.Drawing.Point(-10, 0); - endPoint = new System.Drawing.Point(-10, 0); - pb_image.Invalidate(); - paletteForm.SetactMM("0"); - } - else if (IsPointInRectangles(readLoction, rectAndInfoList)) - { - int _index = -1; - foreach (var rect in rectAndInfoList) - { - _index++; - if (rect.rectangles.Contains(readLoction)) - break; - } - if (_index >= 0) - { - rectAndInfoList.RemoveAt(_index); - ImageToolMannage.RoiIndex--; - pb_image.Invalidate(); - } - } - else if (IsPointInCircle(readLoction, CircleAndInfoList)) - { - int _index = -1; - foreach (var rect in CircleAndInfoList) - { - _index++; - if (rect.center.X == readLoction.X && rect.center.Y == readLoction.Y) - break; - } - if (_index >= 0) - { - CircleAndInfoList.RemoveAt(_index); - ImageToolMannage.CircleIndex--; - pb_image.Invalidate(); - } - } - else if (IsPointInPolygon(readLoction, curPolygonAndInfoList)) - { - PolygonAndInfoList.Clear(); - curPolygonAndInfoList.points.Clear(); - curPolygonAndInfoList.pdinfovc = null; - pb_image.Invalidate(); - } - else if (ImageToolMannage.linewandON) - { - //RectAndInfo rai = new RectAndInfo(); - //rai.rectangles = ImageProcess.GetRealImageRectangle(pb_image, ); - - //System.Drawing.Point curPoint = ImageProcess.GetRealImageCoordinates(pb_image, new System.Drawing.Point(curRectangle.X, curRectangle.Y)); - //// 计算光子数并展示出来 - //float _max = paletteForm.ColorMax; - //float _min = paletteForm.ColorMin; - - //unsafe - //{ - // fixed (byte* pseu_16_byte_src = pseu_16_byte) - // { - // curpdinfovc = pbpvc.get_pseudo_info_wand_vc(pseu_16_byte_src, 16, (ushort)pseu_L16_image.Width, (ushort)pseu_L16_image.Height, _max, _min, curPoint.X, curPoint.Y, curRectangle.Width, curRectangle.Height); - - // } - //} - //rai.pdinfovc = curpdinfovc; - //rectAndInfoList.Add(rai); - //drawRect = false; - //pb_image.Invalidate(); - } - } - - - - } - private void hpb_zoom_in_Click(object sender, System.EventArgs e) - { - ZoomPictureBox(ZoomFactor); - } - - private void hpb_zoom_out_Click(object sender, System.EventArgs e) - { - ZoomPictureBox(1 / ZoomFactor); - } - private void hpb_auto_Click(object sender, EventArgs e) - { - if (pb_image.Image == null) return; - - - // 设置PictureBox的宽度和高度 - pb_image.Location = new System.Drawing.Point(pl_image.Location.X,pl_image.Location.Y); - pb_image.Width = pl_image.Width; - pb_image.Height = pl_image.Height; - - - } - private void mcb_mode_SelectedIndexChanged(object sender, System.EventArgs e) - { - - lb_modename.Text = mcb_mode.Text; - float _max = paletteForm.ColorMax; - float _min = paletteForm.ColorMin; - if (scientificON) - { - lb_wh.Text = "Radiance (p/sec/cm²/sr)\n color scale\n min=" + util.GetscientificNotation(_min) + "\n max=" + util.GetscientificNotation(_max); - } - else - { - lb_wh.Text = "Radiance (p/sec/cm²/sr)\n color scale\n min=" + _min.ToString() + "\n max=" + _max.ToString(); - } - - if (colorbar_rgb24_image != null) - { - pb_coloarbar_image.Image = util.ConvertRgb24ImageToBitmap(colorbar_rgb24_image); - } - if (mcb_mode.SelectedIndex == 0) - { - - pb_image.Image = util.ConvertRgb24ImageToBitmap(pseu_and_mark__rgb24_image); - - } - else if (mcb_mode.SelectedIndex == 1) - { - - pb_image.Image =util.ConvertL16ToBitmap(mark_L16_image); - - - - } - else if (mcb_mode.SelectedIndex == 2) - { - pb_image.Image = util.ConvertRgb24ImageToBitmap(pseu_rgb24_image); - - } - - curBitmap = (Bitmap)pb_image.Image; - } - - - - - - private void ImagePanel_Enter(object sender, EventArgs e) - { - this.BringToFront(); - RefreshUI(); - - - } - private void ImagePanel_FormClosing(object sender, FormClosingEventArgs e) - { - ImageToolMannage.imageDataPath.Remove(path); - paletteForm.Invalidate(); - paletteForm.Dispose(); - paletteForm = null; - } - - private void ImagePanel_Resize(object sender, EventArgs e) - { - if (pb_image.Image == null) return; - - - // 设置PictureBox的宽度和高度 - pb_image.Location = new System.Drawing.Point(pl_image.Location.X, pl_image.Location.Y); - pb_image.Width = pl_image.Width; - pb_image.Height = pl_image.Height; - - CenterPictureBox(); - } - - private void hhpb_save_Click(object sender, EventArgs e) - { - - // 创建一个位图,其大小与panel相同 - Bitmap bitmap = new Bitmap(tlpanl_image_bar.Width, tlpanl_image_bar.Height); - - // 将panel的视图渲染到位图上 - tlpanl_image_bar.DrawToBitmap(bitmap, new System.Drawing.Rectangle(0, 0, tlpanl_image_bar.Width, tlpanl_image_bar.Height)); - - // 弹出保存文件对话框 - using (SaveFileDialog saveFileDialog = new SaveFileDialog()) - { - saveFileDialog.Title = "保存Panel图像"; - saveFileDialog.Filter = "PNG 图片|*.png|JPEG 图片|*.jpg|BMP 图片|*.bmp"; - if (saveFileDialog.ShowDialog() - == DialogResult.OK) - { - // 根据文件扩展名选择格式 - System.Drawing.Imaging.ImageFormat format = System.Drawing.Imaging.ImageFormat.Bmp; - switch (System.IO.Path.GetExtension(saveFileDialog.FileName).ToLower()) - { - case ".jpg": - format = System.Drawing.Imaging.ImageFormat.Jpeg; - break; - case ".bmp": - format = System.Drawing.Imaging.ImageFormat.Bmp; - break; - } - bitmap.Save(saveFileDialog.FileName, format); // 保存图像到文件 - -#if true //保存报告 - if (scientificON) - { - var records = new List(); - - // 目前只保存矩形下的光子数 - int index = 0; - foreach (var item in rectAndInfoList) - { - index++; - - DataRecordString dr = new DataRecordString(); - dr.index = index; - - dr.IOD =util.GetscientificNotation( item.pdinfovc.IOD); - dr.AOD = util.GetscientificNotation(item.pdinfovc.AOD); - dr.max = util.GetscientificNotation(item.pdinfovc.maxOD); - dr.min = util.GetscientificNotation(item.pdinfovc.minOD); - dr.Count = util.GetscientificNotation(item.pdinfovc.Count); - records.Add(dr); - } - foreach (var item in CircleAndInfoList) - { - index++; - - DataRecordString dr = new DataRecordString(); - dr.index = index; - - dr.IOD = util.GetscientificNotation(item.pdinfovc.IOD); - dr.AOD = util.GetscientificNotation(item.pdinfovc.AOD); - dr.max = util.GetscientificNotation(item.pdinfovc.maxOD); - dr.min = util.GetscientificNotation(item.pdinfovc.minOD); - dr.Count = util.GetscientificNotation(item.pdinfovc.Count); - records.Add(dr); - } - foreach (var item in PolygonAndInfoList) - { - index++; - - DataRecordString dr = new DataRecordString(); - dr.index = index; - - dr.IOD = util.GetscientificNotation(item.pdinfovc.IOD); - dr.AOD = util.GetscientificNotation(item.pdinfovc.AOD); - dr.max = util.GetscientificNotation(item.pdinfovc.maxOD); - dr.min = util.GetscientificNotation(item.pdinfovc.minOD); - dr.Count = util.GetscientificNotation(item.pdinfovc.Count); - records.Add(dr); - } - if (records.Count > 0) - { - string directoryPath = System.IO.Path.GetDirectoryName(saveFileDialog.FileName); - string fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(saveFileDialog.FileName); - string path = directoryPath + "\\" + fileNameWithoutExtension + ".xlsx"; - if (File.Exists(path)) - { - try - { - File.Delete(path); - } - catch (Exception) - { - - MessageBox.Show("文件被占用,无法删除!!!"); - return; - } - } - MiniExcel.SaveAs(path, records); - } - } - else - { - var records = new List(); - - // 目前只保存矩形下的光子数 - int index = 0; - foreach (var item in rectAndInfoList) - { - index++; - - DataRecord dr = new DataRecord(); - dr.index = index; - dr.IOD = item.pdinfovc.IOD; - dr.AOD = item.pdinfovc.AOD; - dr.max = item.pdinfovc.maxOD; - dr.min = item.pdinfovc.minOD; - dr.Count = item.pdinfovc.Count; - records.Add(dr); - } - foreach (var item in CircleAndInfoList) - { - index++; - - DataRecord dr = new DataRecord(); - dr.index = index; - dr.IOD = item.pdinfovc.IOD; - dr.AOD = item.pdinfovc.AOD; - dr.max = item.pdinfovc.maxOD; - dr.min = item.pdinfovc.minOD; - dr.Count = item.pdinfovc.Count; - records.Add(dr); - } - foreach (var item in PolygonAndInfoList) - { - index++; - - DataRecord dr = new DataRecord(); - dr.index = index; - dr.IOD = item.pdinfovc.IOD; - dr.AOD = item.pdinfovc.AOD; - dr.max = item.pdinfovc.maxOD; - dr.min = item.pdinfovc.minOD; - dr.Count = item.pdinfovc.Count; - records.Add(dr); - } - if (records.Count > 0) - { - string directoryPath = System.IO.Path.GetDirectoryName(saveFileDialog.FileName); - string fileNameWithoutExtension = System.IO.Path.GetFileNameWithoutExtension(saveFileDialog.FileName); - string path = directoryPath + "\\" + fileNameWithoutExtension + ".xlsx"; - if (File.Exists(path)) - { - try - { - File.Delete(path); - } - catch (Exception) - { - - MessageBox.Show("文件被占用,无法删除!!!"); - return; - } - } - MiniExcel.SaveAs(path, records); - } - } - -#endif - } - } - - // 清理资源 - bitmap.Dispose(); - - - } - private void ImagePanel_MouseDown(object sender, MouseEventArgs e) - { - this.BringToFront(); - RefreshUI(); - } -#endregion - - #region 对外接口 - public Bitmap GetPseuImage - { - get - { - return util.ConvertRgb24ImageToBitmap(pseu_rgb24_image); - } - } - - - - private void cb_scientific_CheckedChanged(object sender) - { - scientificON = cb_scientific.Checked; - ThisRefresh(); - } - - public Bitmap GetMarkImage - { - get - { - return util.ConvertL16ToBitmap(mark_L16_image); - } - } - public Bitmap GetpseuAndMark - { - get - { - return util.ConvertRgb24ImageToBitmap(pseu_and_mark__rgb24_image); - } - } - public Bitmap pictureBox - { - get { return (Bitmap)pb_image.Image; } - } - public void initPicturebox() - { - pl_bg_image.Controls.Clear(); - pl_bg_image.Controls.Add(pb_image); - } - - public Image GetImage() - { - mcb_mode.SelectedIndex = 0; - pb_image.SaveToImage("2.bmp",System.Drawing.Imaging.ImageFormat.Bmp); - return pseu_and_mark__rgb24_image; - } - #endregion - } -} diff --git a/src/PBAnaly/UI/ImagePanel.resx b/src/PBAnaly/UI/ImagePanel.resx deleted file mode 100644 index 1af7de1..0000000 --- a/src/PBAnaly/UI/ImagePanel.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/src/PBAnaly/UI/ImageToolPaletteForm.Designer.cs b/src/PBAnaly/UI/ImageToolPaletteForm.Designer.cs deleted file mode 100644 index 2d17611..0000000 --- a/src/PBAnaly/UI/ImageToolPaletteForm.Designer.cs +++ /dev/null @@ -1,781 +0,0 @@ -namespace PBAnaly.UI -{ - partial class ImageToolPaletteForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.cll_panel = new AntdUI.Collapse(); - this.collapseItem1 = new AntdUI.CollapseItem(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.panel1 = new AntdUI.Panel(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.foxLabel8 = new ReaLTaiizor.Controls.FoxLabel(); - this.flb_act_mm = new ReaLTaiizor.Controls.FoxLabel(); - this.nud_opacity = new System.Windows.Forms.NumericUpDown(); - this.nud_brightness = new System.Windows.Forms.NumericUpDown(); - this.mts_color_max = new MaterialSkin.Controls.MaterialSlider(); - this.mts_color_min = new MaterialSkin.Controls.MaterialSlider(); - this.foxLabel9 = new ReaLTaiizor.Controls.FoxLabel(); - this.foxLabel6 = new ReaLTaiizor.Controls.FoxLabel(); - this.foxLabel2 = new ReaLTaiizor.Controls.FoxLabel(); - this.mts_opacity = new MaterialSkin.Controls.MaterialSlider(); - this.foxLabel3 = new ReaLTaiizor.Controls.FoxLabel(); - this.mts_brightness = new MaterialSkin.Controls.MaterialSlider(); - this.foxLabel1 = new ReaLTaiizor.Controls.FoxLabel(); - this.hpb_line = new ReaLTaiizor.Controls.HopePictureBox(); - this.nud_color_min = new System.Windows.Forms.NumericUpDown(); - this.nud_color_max = new System.Windows.Forms.NumericUpDown(); - this.cb_colortable = new System.Windows.Forms.ComboBox(); - this.pb_bgimage = new System.Windows.Forms.PictureBox(); - this.collapseItem2 = new AntdUI.CollapseItem(); - this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); - this.hpb_wand = new ReaLTaiizor.Controls.HopePictureBox(); - this.hpb_xianduan = new ReaLTaiizor.Controls.HopePictureBox(); - this.hpb_circe = new ReaLTaiizor.Controls.HopePictureBox(); - this.hpb_rect = new ReaLTaiizor.Controls.HopePictureBox(); - this.panel2 = new AntdUI.Panel(); - this.fb_fixSetting = new ReaLTaiizor.Controls.FoxButton(); - this.ftb_r = new ReaLTaiizor.Controls.FoxTextBox(); - this.foxLabel7 = new ReaLTaiizor.Controls.FoxLabel(); - this.ftb_h = new ReaLTaiizor.Controls.FoxTextBox(); - this.foxLabel5 = new ReaLTaiizor.Controls.FoxLabel(); - this.ftb_w = new ReaLTaiizor.Controls.FoxTextBox(); - this.foxLabel4 = new ReaLTaiizor.Controls.FoxLabel(); - this.cll_panel.SuspendLayout(); - this.collapseItem1.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nud_opacity)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nud_brightness)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_line)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nud_color_min)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nud_color_max)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pb_bgimage)).BeginInit(); - this.collapseItem2.SuspendLayout(); - this.tableLayoutPanel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_wand)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_xianduan)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_circe)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_rect)).BeginInit(); - this.panel2.SuspendLayout(); - this.SuspendLayout(); - // - // cll_panel - // - this.cll_panel.Cursor = System.Windows.Forms.Cursors.Hand; - this.cll_panel.Dock = System.Windows.Forms.DockStyle.Fill; - this.cll_panel.HeaderBg = System.Drawing.Color.FromArgb(((int)(((byte)(186)))), ((int)(((byte)(179)))), ((int)(((byte)(179))))); - this.cll_panel.Items.Add(this.collapseItem1); - this.cll_panel.Items.Add(this.collapseItem2); - this.cll_panel.Location = new System.Drawing.Point(2, 19); - this.cll_panel.Name = "cll_panel"; - this.cll_panel.Size = new System.Drawing.Size(367, 606); - this.cll_panel.TabIndex = 0; - this.cll_panel.Text = "fed"; - // - // collapseItem1 - // - this.collapseItem1.Controls.Add(this.tableLayoutPanel1); - this.collapseItem1.Expand = true; - this.collapseItem1.Location = new System.Drawing.Point(19, 59); - this.collapseItem1.Name = "collapseItem1"; - this.collapseItem1.Size = new System.Drawing.Size(329, 207); - this.collapseItem1.TabIndex = 0; - this.collapseItem1.Text = "图像调整"; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 1; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 193F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 8F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(329, 207); - this.tableLayoutPanel1.TabIndex = 0; - // - // panel1 - // - this.panel1.Controls.Add(this.tableLayoutPanel2); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(3, 3); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(323, 187); - this.panel1.TabIndex = 0; - this.panel1.Text = "panel1"; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 5; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.tableLayoutPanel2.Controls.Add(this.foxLabel8, 0, 6); - this.tableLayoutPanel2.Controls.Add(this.flb_act_mm, 3, 5); - this.tableLayoutPanel2.Controls.Add(this.nud_opacity, 4, 1); - this.tableLayoutPanel2.Controls.Add(this.nud_brightness, 4, 0); - this.tableLayoutPanel2.Controls.Add(this.mts_color_max, 1, 4); - this.tableLayoutPanel2.Controls.Add(this.mts_color_min, 1, 3); - this.tableLayoutPanel2.Controls.Add(this.foxLabel9, 0, 4); - this.tableLayoutPanel2.Controls.Add(this.foxLabel6, 0, 3); - this.tableLayoutPanel2.Controls.Add(this.foxLabel2, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.mts_opacity, 1, 1); - this.tableLayoutPanel2.Controls.Add(this.foxLabel3, 0, 1); - this.tableLayoutPanel2.Controls.Add(this.mts_brightness, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.foxLabel1, 0, 0); - this.tableLayoutPanel2.Controls.Add(this.hpb_line, 0, 5); - this.tableLayoutPanel2.Controls.Add(this.nud_color_min, 4, 3); - this.tableLayoutPanel2.Controls.Add(this.nud_color_max, 4, 4); - this.tableLayoutPanel2.Controls.Add(this.cb_colortable, 0, 7); - this.tableLayoutPanel2.Controls.Add(this.pb_bgimage, 3, 7); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 9; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(323, 187); - this.tableLayoutPanel2.TabIndex = 0; - // - // foxLabel8 - // - this.foxLabel8.BackColor = System.Drawing.Color.Transparent; - this.tableLayoutPanel2.SetColumnSpan(this.foxLabel8, 4); - this.foxLabel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.foxLabel8.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.foxLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel8.Location = new System.Drawing.Point(3, 130); - this.foxLabel8.Name = "foxLabel8"; - this.foxLabel8.Size = new System.Drawing.Size(267, 13); - this.foxLabel8.TabIndex = 34; - this.foxLabel8.Text = "Color Rable"; - // - // flb_act_mm - // - this.flb_act_mm.BackColor = System.Drawing.Color.Transparent; - this.flb_act_mm.Dock = System.Windows.Forms.DockStyle.Fill; - this.flb_act_mm.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.flb_act_mm.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.flb_act_mm.Location = new System.Drawing.Point(93, 110); - this.flb_act_mm.Name = "flb_act_mm"; - this.flb_act_mm.Size = new System.Drawing.Size(177, 14); - this.flb_act_mm.TabIndex = 30; - this.flb_act_mm.Text = "0 mm"; - // - // nud_opacity - // - this.nud_opacity.Dock = System.Windows.Forms.DockStyle.Fill; - this.nud_opacity.Location = new System.Drawing.Point(276, 22); - this.nud_opacity.Name = "nud_opacity"; - this.nud_opacity.Size = new System.Drawing.Size(44, 21); - this.nud_opacity.TabIndex = 27; - this.nud_opacity.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.nud_opacity.ValueChanged += new System.EventHandler(this.nud_opacity_ValueChanged); - // - // nud_brightness - // - this.nud_brightness.Dock = System.Windows.Forms.DockStyle.Fill; - this.nud_brightness.Location = new System.Drawing.Point(276, 3); - this.nud_brightness.Maximum = new decimal(new int[] { - 254, - 0, - 0, - 0}); - this.nud_brightness.Name = "nud_brightness"; - this.nud_brightness.Size = new System.Drawing.Size(44, 21); - this.nud_brightness.TabIndex = 26; - this.nud_brightness.Value = new decimal(new int[] { - 127, - 0, - 0, - 0}); - this.nud_brightness.ValueChanged += new System.EventHandler(this.nud_brightness_ValueChanged); - // - // mts_color_max - // - this.mts_color_max.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel2.SetColumnSpan(this.mts_color_max, 3); - this.mts_color_max.Depth = 0; - this.mts_color_max.Font = new System.Drawing.Font("Roboto", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - this.mts_color_max.FontType = MaterialSkin.MaterialSkinManager.fontType.Body2; - this.mts_color_max.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.mts_color_max.Location = new System.Drawing.Point(53, 88); - this.mts_color_max.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); - this.mts_color_max.MaximumSize = new System.Drawing.Size(0, 10); - this.mts_color_max.MouseState = MaterialSkin.MouseState.HOVER; - this.mts_color_max.Name = "mts_color_max"; - this.mts_color_max.RangeMax = 65535; - this.mts_color_max.RangeMin = 5; - this.mts_color_max.ShowText = false; - this.mts_color_max.ShowValue = false; - this.mts_color_max.Size = new System.Drawing.Size(217, 10); - this.mts_color_max.TabIndex = 23; - this.mts_color_max.Text = "materialSlider5"; - this.mts_color_max.Value = 20; - this.mts_color_max.ValueMax = 65535; - this.mts_color_max.onValueChanged += new MaterialSkin.Controls.MaterialSlider.ValueChanged(this.mts_color_max_onValueChanged); - // - // mts_color_min - // - this.tableLayoutPanel2.SetColumnSpan(this.mts_color_min, 3); - this.mts_color_min.Depth = 0; - this.mts_color_min.Dock = System.Windows.Forms.DockStyle.Fill; - this.mts_color_min.Font = new System.Drawing.Font("Roboto", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - this.mts_color_min.FontType = MaterialSkin.MaterialSkinManager.fontType.Body2; - this.mts_color_min.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.mts_color_min.Location = new System.Drawing.Point(53, 63); - this.mts_color_min.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); - this.mts_color_min.MaximumSize = new System.Drawing.Size(0, 10); - this.mts_color_min.MouseState = MaterialSkin.MouseState.HOVER; - this.mts_color_min.Name = "mts_color_min"; - this.mts_color_min.RangeMax = 65535; - this.mts_color_min.RangeMin = 5; - this.mts_color_min.ShowText = false; - this.mts_color_min.ShowValue = false; - this.mts_color_min.Size = new System.Drawing.Size(217, 10); - this.mts_color_min.TabIndex = 21; - this.mts_color_min.Text = "materialSlider3"; - this.mts_color_min.Value = 5; - this.mts_color_min.ValueMax = 65535; - this.mts_color_min.onValueChanged += new MaterialSkin.Controls.MaterialSlider.ValueChanged(this.mts_color_min_onValueChanged); - // - // foxLabel9 - // - this.foxLabel9.BackColor = System.Drawing.Color.Transparent; - this.foxLabel9.Dock = System.Windows.Forms.DockStyle.Fill; - this.foxLabel9.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.foxLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel9.Location = new System.Drawing.Point(3, 86); - this.foxLabel9.Name = "foxLabel9"; - this.foxLabel9.Size = new System.Drawing.Size(44, 18); - this.foxLabel9.TabIndex = 18; - this.foxLabel9.Text = "Max"; - // - // foxLabel6 - // - this.foxLabel6.BackColor = System.Drawing.Color.Transparent; - this.foxLabel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.foxLabel6.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.foxLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel6.Location = new System.Drawing.Point(3, 61); - this.foxLabel6.Name = "foxLabel6"; - this.foxLabel6.Size = new System.Drawing.Size(44, 19); - this.foxLabel6.TabIndex = 13; - this.foxLabel6.Text = "Min"; - // - // foxLabel2 - // - this.foxLabel2.BackColor = System.Drawing.Color.Transparent; - this.foxLabel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.foxLabel2.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.foxLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel2.Location = new System.Drawing.Point(3, 41); - this.foxLabel2.Name = "foxLabel2"; - this.foxLabel2.Size = new System.Drawing.Size(44, 14); - this.foxLabel2.TabIndex = 10; - this.foxLabel2.Text = "色阶"; - // - // mts_opacity - // - this.tableLayoutPanel2.SetColumnSpan(this.mts_opacity, 3); - this.mts_opacity.Depth = 0; - this.mts_opacity.Dock = System.Windows.Forms.DockStyle.Fill; - this.mts_opacity.Font = new System.Drawing.Font("Roboto", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - this.mts_opacity.FontType = MaterialSkin.MaterialSkinManager.fontType.Body2; - this.mts_opacity.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.mts_opacity.Location = new System.Drawing.Point(53, 22); - this.mts_opacity.MaximumSize = new System.Drawing.Size(0, 10); - this.mts_opacity.MouseState = MaterialSkin.MouseState.HOVER; - this.mts_opacity.Name = "mts_opacity"; - this.mts_opacity.ShowText = false; - this.mts_opacity.ShowValue = false; - this.mts_opacity.Size = new System.Drawing.Size(217, 10); - this.mts_opacity.TabIndex = 7; - this.mts_opacity.Text = "mts_opacity"; - this.mts_opacity.onValueChanged += new MaterialSkin.Controls.MaterialSlider.ValueChanged(this.mts_opacity_onValueChanged); - // - // foxLabel3 - // - this.foxLabel3.BackColor = System.Drawing.Color.Transparent; - this.foxLabel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.foxLabel3.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.foxLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel3.Location = new System.Drawing.Point(3, 22); - this.foxLabel3.Name = "foxLabel3"; - this.foxLabel3.Size = new System.Drawing.Size(44, 13); - this.foxLabel3.TabIndex = 6; - this.foxLabel3.Text = "透明度::"; - // - // mts_brightness - // - this.tableLayoutPanel2.SetColumnSpan(this.mts_brightness, 3); - this.mts_brightness.Depth = 0; - this.mts_brightness.Dock = System.Windows.Forms.DockStyle.Fill; - this.mts_brightness.Font = new System.Drawing.Font("Roboto", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - this.mts_brightness.FontType = MaterialSkin.MaterialSkinManager.fontType.Body2; - this.mts_brightness.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.mts_brightness.Location = new System.Drawing.Point(53, 3); - this.mts_brightness.MaximumSize = new System.Drawing.Size(0, 10); - this.mts_brightness.MouseState = MaterialSkin.MouseState.HOVER; - this.mts_brightness.Name = "mts_brightness"; - this.mts_brightness.RangeMax = 254; - this.mts_brightness.ShowText = false; - this.mts_brightness.ShowValue = false; - this.mts_brightness.Size = new System.Drawing.Size(217, 10); - this.mts_brightness.TabIndex = 0; - this.mts_brightness.Text = "mts_brightness"; - this.mts_brightness.ValueMax = 254; - this.mts_brightness.onValueChanged += new MaterialSkin.Controls.MaterialSlider.ValueChanged(this.mts_brightness_onValueChanged); - // - // foxLabel1 - // - this.foxLabel1.BackColor = System.Drawing.Color.Transparent; - this.foxLabel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.foxLabel1.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.foxLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel1.Location = new System.Drawing.Point(3, 3); - this.foxLabel1.Name = "foxLabel1"; - this.foxLabel1.Size = new System.Drawing.Size(44, 13); - this.foxLabel1.TabIndex = 1; - this.foxLabel1.Text = "亮度:"; - // - // hpb_line - // - this.hpb_line.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_line.Dock = System.Windows.Forms.DockStyle.Fill; - this.hpb_line.Image = global::PBAnaly.Properties.Resources.线段; - this.hpb_line.Location = new System.Drawing.Point(3, 110); - this.hpb_line.Name = "hpb_line"; - this.hpb_line.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_line.Size = new System.Drawing.Size(44, 14); - this.hpb_line.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_line.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_line.TabIndex = 9; - this.hpb_line.TabStop = false; - this.hpb_line.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - this.hpb_line.Click += new System.EventHandler(this.hpb_line_Click); - // - // nud_color_min - // - this.nud_color_min.Dock = System.Windows.Forms.DockStyle.Fill; - this.nud_color_min.Location = new System.Drawing.Point(276, 61); - this.nud_color_min.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.nud_color_min.Minimum = new decimal(new int[] { - 5, - 0, - 0, - 0}); - this.nud_color_min.Name = "nud_color_min"; - this.nud_color_min.Size = new System.Drawing.Size(44, 21); - this.nud_color_min.TabIndex = 24; - this.nud_color_min.Value = new decimal(new int[] { - 6000, - 0, - 0, - 0}); - this.nud_color_min.ValueChanged += new System.EventHandler(this.nud_color_min_ValueChanged); - // - // nud_color_max - // - this.nud_color_max.Dock = System.Windows.Forms.DockStyle.Fill; - this.nud_color_max.Location = new System.Drawing.Point(276, 86); - this.nud_color_max.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.nud_color_max.Minimum = new decimal(new int[] { - 10, - 0, - 0, - 0}); - this.nud_color_max.Name = "nud_color_max"; - this.nud_color_max.Size = new System.Drawing.Size(44, 21); - this.nud_color_max.TabIndex = 25; - this.nud_color_max.Value = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.nud_color_max.ValueChanged += new System.EventHandler(this.nud_color_max_ValueChanged); - // - // cb_colortable - // - this.tableLayoutPanel2.SetColumnSpan(this.cb_colortable, 3); - this.cb_colortable.Dock = System.Windows.Forms.DockStyle.Fill; - this.cb_colortable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cb_colortable.FormattingEnabled = true; - this.cb_colortable.Items.AddRange(new object[] { - "YellowHot", - "Black_Red", - "Black_Green", - "Black_Blue", - "Black_Yley", - "RGB", - "Pseudo", - "Gray"}); - this.cb_colortable.Location = new System.Drawing.Point(3, 149); - this.cb_colortable.Name = "cb_colortable"; - this.cb_colortable.Size = new System.Drawing.Size(84, 20); - this.cb_colortable.TabIndex = 35; - this.cb_colortable.SelectedIndexChanged += new System.EventHandler(this.cb_colortable_SelectedIndexChanged); - // - // pb_bgimage - // - this.pb_bgimage.Dock = System.Windows.Forms.DockStyle.Fill; - this.pb_bgimage.Location = new System.Drawing.Point(90, 146); - this.pb_bgimage.Margin = new System.Windows.Forms.Padding(0); - this.pb_bgimage.Name = "pb_bgimage"; - this.pb_bgimage.Size = new System.Drawing.Size(183, 25); - this.pb_bgimage.TabIndex = 36; - this.pb_bgimage.TabStop = false; - // - // collapseItem2 - // - this.collapseItem2.Controls.Add(this.tableLayoutPanel3); - this.collapseItem2.Expand = true; - this.collapseItem2.Location = new System.Drawing.Point(19, 338); - this.collapseItem2.Name = "collapseItem2"; - this.collapseItem2.Size = new System.Drawing.Size(329, 113); - this.collapseItem2.TabIndex = 1; - this.collapseItem2.Text = "ROI工具"; - // - // tableLayoutPanel3 - // - this.tableLayoutPanel3.ColumnCount = 5; - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel3.Controls.Add(this.hpb_wand, 3, 0); - this.tableLayoutPanel3.Controls.Add(this.hpb_xianduan, 2, 0); - this.tableLayoutPanel3.Controls.Add(this.hpb_circe, 1, 0); - this.tableLayoutPanel3.Controls.Add(this.hpb_rect, 0, 0); - this.tableLayoutPanel3.Controls.Add(this.panel2, 0, 1); - this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); - this.tableLayoutPanel3.Name = "tableLayoutPanel3"; - this.tableLayoutPanel3.RowCount = 2; - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(329, 113); - this.tableLayoutPanel3.TabIndex = 0; - // - // hpb_wand - // - this.hpb_wand.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_wand.Image = global::PBAnaly.Properties.Resources.魔术棒_魔法_魔术_一键; - this.hpb_wand.Location = new System.Drawing.Point(105, 3); - this.hpb_wand.Name = "hpb_wand"; - this.hpb_wand.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_wand.Size = new System.Drawing.Size(28, 27); - this.hpb_wand.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_wand.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_wand.TabIndex = 13; - this.hpb_wand.TabStop = false; - this.hpb_wand.TextRenderingType = System.Drawing.Text.TextRenderingHint.SystemDefault; - this.hpb_wand.Click += new System.EventHandler(this.hpb_wand_Click); - // - // hpb_xianduan - // - this.hpb_xianduan.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_xianduan.Image = global::PBAnaly.Properties.Resources.线段__1_; - this.hpb_xianduan.Location = new System.Drawing.Point(71, 3); - this.hpb_xianduan.Name = "hpb_xianduan"; - this.hpb_xianduan.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_xianduan.Size = new System.Drawing.Size(28, 27); - this.hpb_xianduan.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_xianduan.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_xianduan.TabIndex = 12; - this.hpb_xianduan.TabStop = false; - this.hpb_xianduan.TextRenderingType = System.Drawing.Text.TextRenderingHint.SystemDefault; - this.hpb_xianduan.Click += new System.EventHandler(this.hpb_xianduan_Click); - // - // hpb_circe - // - this.hpb_circe.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_circe.Image = global::PBAnaly.Properties.Resources.圆形1; - this.hpb_circe.Location = new System.Drawing.Point(37, 3); - this.hpb_circe.Name = "hpb_circe"; - this.hpb_circe.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_circe.Size = new System.Drawing.Size(28, 27); - this.hpb_circe.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_circe.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_circe.TabIndex = 11; - this.hpb_circe.TabStop = false; - this.hpb_circe.TextRenderingType = System.Drawing.Text.TextRenderingHint.SystemDefault; - this.hpb_circe.Click += new System.EventHandler(this.hpb_circe_Click); - // - // hpb_rect - // - this.hpb_rect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(196)))), ((int)(((byte)(204))))); - this.hpb_rect.Dock = System.Windows.Forms.DockStyle.Fill; - this.hpb_rect.Image = global::PBAnaly.Properties.Resources._10矩形; - this.hpb_rect.Location = new System.Drawing.Point(2, 2); - this.hpb_rect.Margin = new System.Windows.Forms.Padding(2); - this.hpb_rect.Name = "hpb_rect"; - this.hpb_rect.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - this.hpb_rect.Size = new System.Drawing.Size(30, 30); - this.hpb_rect.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.hpb_rect.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.hpb_rect.TabIndex = 10; - this.hpb_rect.TabStop = false; - this.hpb_rect.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - this.hpb_rect.Click += new System.EventHandler(this.hpb_rect_Click); - // - // panel2 - // - this.tableLayoutPanel3.SetColumnSpan(this.panel2, 5); - this.panel2.Controls.Add(this.fb_fixSetting); - this.panel2.Controls.Add(this.ftb_r); - this.panel2.Controls.Add(this.foxLabel7); - this.panel2.Controls.Add(this.ftb_h); - this.panel2.Controls.Add(this.foxLabel5); - this.panel2.Controls.Add(this.ftb_w); - this.panel2.Controls.Add(this.foxLabel4); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(3, 37); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(323, 73); - this.panel2.TabIndex = 14; - this.panel2.Text = "panel2"; - // - // fb_fixSetting - // - this.fb_fixSetting.BackColor = System.Drawing.Color.Transparent; - this.fb_fixSetting.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.fb_fixSetting.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(193)))), ((int)(((byte)(193)))), ((int)(((byte)(193))))); - this.fb_fixSetting.Cursor = System.Windows.Forms.Cursors.Hand; - this.fb_fixSetting.DisabledBaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.fb_fixSetting.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(209)))), ((int)(((byte)(209)))), ((int)(((byte)(209))))); - this.fb_fixSetting.DisabledTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(166)))), ((int)(((byte)(178)))), ((int)(((byte)(190))))); - this.fb_fixSetting.DownColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232))))); - this.fb_fixSetting.EnabledCalc = true; - this.fb_fixSetting.Font = new System.Drawing.Font("Segoe UI", 10F); - this.fb_fixSetting.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(78)))), ((int)(((byte)(90))))); - this.fb_fixSetting.Location = new System.Drawing.Point(120, 30); - this.fb_fixSetting.Name = "fb_fixSetting"; - this.fb_fixSetting.OverColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(242))))); - this.fb_fixSetting.Size = new System.Drawing.Size(59, 31); - this.fb_fixSetting.TabIndex = 6; - this.fb_fixSetting.Text = "修改"; - this.fb_fixSetting.Visible = false; - this.fb_fixSetting.Click += new ReaLTaiizor.Util.FoxBase.ButtonFoxBase.ClickEventHandler(this.fb_fixSetting_Click); - // - // ftb_r - // - this.ftb_r.BackColor = System.Drawing.Color.Transparent; - this.ftb_r.Cursor = System.Windows.Forms.Cursors.Hand; - this.ftb_r.EnabledCalc = true; - this.ftb_r.Font = new System.Drawing.Font("Segoe UI", 10F); - this.ftb_r.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(78)))), ((int)(((byte)(90))))); - this.ftb_r.Location = new System.Drawing.Point(151, 2); - this.ftb_r.MaxLength = 32767; - this.ftb_r.MultiLine = false; - this.ftb_r.Name = "ftb_r"; - this.ftb_r.ReadOnly = false; - this.ftb_r.Size = new System.Drawing.Size(75, 22); - this.ftb_r.TabIndex = 5; - this.ftb_r.Text = "10"; - this.ftb_r.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; - this.ftb_r.UseSystemPasswordChar = false; - // - // foxLabel7 - // - this.foxLabel7.BackColor = System.Drawing.Color.Transparent; - this.foxLabel7.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); - this.foxLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel7.Location = new System.Drawing.Point(120, 5); - this.foxLabel7.Name = "foxLabel7"; - this.foxLabel7.Size = new System.Drawing.Size(26, 19); - this.foxLabel7.TabIndex = 4; - this.foxLabel7.Text = "r="; - // - // ftb_h - // - this.ftb_h.BackColor = System.Drawing.Color.Transparent; - this.ftb_h.Cursor = System.Windows.Forms.Cursors.Hand; - this.ftb_h.EnabledCalc = true; - this.ftb_h.Font = new System.Drawing.Font("Segoe UI", 10F); - this.ftb_h.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(78)))), ((int)(((byte)(90))))); - this.ftb_h.Location = new System.Drawing.Point(34, 28); - this.ftb_h.MaxLength = 32767; - this.ftb_h.MultiLine = false; - this.ftb_h.Name = "ftb_h"; - this.ftb_h.ReadOnly = false; - this.ftb_h.Size = new System.Drawing.Size(75, 22); - this.ftb_h.TabIndex = 3; - this.ftb_h.Text = "20"; - this.ftb_h.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; - this.ftb_h.UseSystemPasswordChar = false; - // - // foxLabel5 - // - this.foxLabel5.BackColor = System.Drawing.Color.Transparent; - this.foxLabel5.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); - this.foxLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel5.Location = new System.Drawing.Point(3, 31); - this.foxLabel5.Name = "foxLabel5"; - this.foxLabel5.Size = new System.Drawing.Size(26, 19); - this.foxLabel5.TabIndex = 2; - this.foxLabel5.Text = "h="; - // - // ftb_w - // - this.ftb_w.BackColor = System.Drawing.Color.Transparent; - this.ftb_w.Cursor = System.Windows.Forms.Cursors.Hand; - this.ftb_w.EnabledCalc = true; - this.ftb_w.Font = new System.Drawing.Font("Segoe UI", 10F); - this.ftb_w.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(78)))), ((int)(((byte)(90))))); - this.ftb_w.Location = new System.Drawing.Point(34, 0); - this.ftb_w.MaxLength = 32767; - this.ftb_w.MultiLine = false; - this.ftb_w.Name = "ftb_w"; - this.ftb_w.ReadOnly = false; - this.ftb_w.Size = new System.Drawing.Size(75, 22); - this.ftb_w.TabIndex = 1; - this.ftb_w.Text = "20"; - this.ftb_w.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; - this.ftb_w.UseSystemPasswordChar = false; - // - // foxLabel4 - // - this.foxLabel4.BackColor = System.Drawing.Color.Transparent; - this.foxLabel4.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold); - this.foxLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(88)))), ((int)(((byte)(100))))); - this.foxLabel4.Location = new System.Drawing.Point(3, 3); - this.foxLabel4.Name = "foxLabel4"; - this.foxLabel4.Size = new System.Drawing.Size(26, 19); - this.foxLabel4.TabIndex = 0; - this.foxLabel4.Text = "w="; - // - // ImageToolPaletteForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(371, 627); - this.ControlBox = false; - this.Controls.Add(this.cll_panel); - this.FormStyle = MaterialSkin.Controls.MaterialForm.FormStyles.ActionBar_None; - this.Margin = new System.Windows.Forms.Padding(2); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ImageToolPaletteForm"; - this.Padding = new System.Windows.Forms.Padding(2, 19, 2, 2); - this.Text = "ImageToolPaletteForm"; - this.cll_panel.ResumeLayout(false); - this.collapseItem1.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.tableLayoutPanel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.nud_opacity)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nud_brightness)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_line)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nud_color_min)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nud_color_max)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pb_bgimage)).EndInit(); - this.collapseItem2.ResumeLayout(false); - this.tableLayoutPanel3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.hpb_wand)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_xianduan)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_circe)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.hpb_rect)).EndInit(); - this.panel2.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private AntdUI.Collapse cll_panel; - private AntdUI.CollapseItem collapseItem1; - private AntdUI.CollapseItem collapseItem2; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private AntdUI.Panel panel1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private MaterialSkin.Controls.MaterialSlider mts_brightness; - private ReaLTaiizor.Controls.FoxLabel foxLabel1; - private MaterialSkin.Controls.MaterialSlider mts_opacity; - private ReaLTaiizor.Controls.FoxLabel foxLabel3; - private ReaLTaiizor.Controls.HopePictureBox hpb_line; - private MaterialSkin.Controls.MaterialSlider mts_color_max; - private MaterialSkin.Controls.MaterialSlider mts_color_min; - private ReaLTaiizor.Controls.FoxLabel foxLabel9; - private ReaLTaiizor.Controls.FoxLabel foxLabel6; - private ReaLTaiizor.Controls.FoxLabel foxLabel2; - private System.Windows.Forms.NumericUpDown nud_color_min; - private System.Windows.Forms.NumericUpDown nud_color_max; - private System.Windows.Forms.NumericUpDown nud_brightness; - private System.Windows.Forms.NumericUpDown nud_opacity; - private ReaLTaiizor.Controls.FoxLabel foxLabel8; - private System.Windows.Forms.ComboBox cb_colortable; - private System.Windows.Forms.PictureBox pb_bgimage; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; - private ReaLTaiizor.Controls.HopePictureBox hpb_rect; - private ReaLTaiizor.Controls.HopePictureBox hpb_circe; - private ReaLTaiizor.Controls.HopePictureBox hpb_wand; - private ReaLTaiizor.Controls.HopePictureBox hpb_xianduan; - private AntdUI.Panel panel2; - private ReaLTaiizor.Controls.FoxLabel foxLabel4; - private ReaLTaiizor.Controls.FoxTextBox ftb_r; - private ReaLTaiizor.Controls.FoxLabel foxLabel7; - private ReaLTaiizor.Controls.FoxTextBox ftb_h; - private ReaLTaiizor.Controls.FoxLabel foxLabel5; - private ReaLTaiizor.Controls.FoxTextBox ftb_w; - private ReaLTaiizor.Controls.FoxButton fb_fixSetting; - public ReaLTaiizor.Controls.FoxLabel flb_act_mm; - } -} \ No newline at end of file diff --git a/src/PBAnaly/UI/ImageToolPaletteForm.cs b/src/PBAnaly/UI/ImageToolPaletteForm.cs deleted file mode 100644 index a9c4c93..0000000 --- a/src/PBAnaly/UI/ImageToolPaletteForm.cs +++ /dev/null @@ -1,354 +0,0 @@ -using System; -using System.Drawing; -using MaterialSkin; -using MaterialSkin.Controls; -using PBAnaly.Module; -using PBAnaly.Properties; - -namespace PBAnaly.UI -{ - public partial class ImageToolPaletteForm : MaterialForm - { - private int roi_w = 20; - private int roi_h = 20; - private int circle_r = 10; - public ImageToolPaletteForm() - { - InitializeComponent(); - mts_brightness.Value = ImageToolMannage.beta; - nud_brightness.Value = mts_brightness.Value; - nud_opacity.Value = mts_opacity.Value = (int)ImageToolMannage.alpha; - mts_color_max.Value = ImageToolMannage.color_max; - nud_color_max.Value = ImageToolMannage.color_max; - mts_color_min.RangeMax = ImageToolMannage.color_max; - mts_color_min.RangeMin = 5; - nud_color_min.Maximum = ImageToolMannage.color_max; - nud_color_min.Value = ImageToolMannage.color_min; - mts_color_min.Value = ImageToolMannage.color_min; - - cb_colortable.SelectedIndex = 0; - } - - private void mts_brightness_onValueChanged(object sender, int newValue) - { - //if (newValue > 254) newValue = 254; - //if (newValue < 0) newValue = 0; - //mts_brightness.Value = newValue; - nud_brightness.Value = mts_brightness.Value; - ImageToolMannage.beta = mts_brightness.Value; - - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - } - private void nud_brightness_ValueChanged(object sender, EventArgs e) - { - mts_brightness.Value = (int)nud_brightness.Value; - ImageToolMannage.beta = mts_brightness.Value; - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - - - } - private void mts_opacity_onValueChanged(object sender, int newValue) - { - nud_opacity.Value = mts_opacity.Value; - ImageToolMannage.alpha = mts_opacity.Value; - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - } - - private void mts_color_max_onValueChanged(object sender, int newValue) - { - if (newValue < 10) - return; - //mts_color_min.RangeMax = newValue; - //mts_color_min.ValueMax = newValue; - nud_color_min.Maximum = newValue; - //mts_color_max.Value = newValue; - nud_color_max.Value = newValue; - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - - - } - - private void mts_color_min_onValueChanged(object sender, int newValue) - { - if (newValue < 5) - return; - //mts_color_min.Value = newValue; - nud_color_min.Value = newValue; - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - - - } - - private void nud_color_min_ValueChanged(object sender, EventArgs e) - { - - if (nud_color_min.Value < 5) return; - mts_color_min.Value = (int)nud_color_min.Value; - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - } - - private void nud_color_max_ValueChanged(object sender, EventArgs e) - { - - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - - mts_color_max.Value = (int)nud_color_max.Value; - mts_color_min.RangeMax = (int)nud_color_max.Value; - mts_color_min.ValueMax = (int)nud_color_max.Value; - - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - } - - private void nud_opacity_ValueChanged(object sender, EventArgs e) - { - mts_opacity.Value = (int)nud_opacity.Value; - ImageToolMannage.alpha = mts_opacity.Value; - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - } - - public void SetactMM(string value) - { - flb_act_mm.Text = value; - flb_act_mm.Refresh(); - } - - private void hpb_line_Click(object sender, EventArgs e) - { - ImageToolMannage.lineDisON = true; - } - private void hpb_xianduan_Click(object sender, EventArgs e) - { - ImageToolMannage.linepolygonON = true; - } - - private void hpb_wand_Click(object sender, EventArgs e) - { - ImageToolMannage.linewandON = true; - } - public void SetMaxMin(int min, int max) - { - mts_color_min.Value = min; - mts_color_max.Value = max; - cb_colortable.SelectedIndex = 0; - } - - private void cb_colortable_SelectedIndexChanged(object sender, EventArgs e) - { - Bitmap rotatedImage = null; - switch (cb_colortable.Text) - { - case "YellowHot": - rotatedImage = Resources.YellowHot_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "Black_Red": - rotatedImage = Resources.Black_Red_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "Black_Green": - rotatedImage = Resources.Black_Green_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "Black_Blue": - rotatedImage = Resources.Black_Blue_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "Black_Yley": - rotatedImage = Resources.Black_Yley_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "RGB": - rotatedImage = Resources.EtBr_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "Pseudo": - rotatedImage = Resources.Pseudo_1; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - case "Gray": - rotatedImage = Resources.Gray; - rotatedImage.RotateFlip(RotateFlipType.Rotate90FlipX); - - break; - - - } - if (ImageToolMannage.imagePanel != null) - { - ImageToolMannage.imagePanel.colorValue = cb_colortable.Text; - ImageToolMannage.imagePanel.colorIndex = cb_colortable.SelectedIndex; - } - if (ImageToolMannage.imagePanel != null) - ImageToolMannage.imagePanel.ThisRefresh(); - if (rotatedImage != null) - { - pb_bgimage.Image = rotatedImage; - pb_bgimage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - } - - - } - - - private void hpb_rect_Click(object sender, EventArgs e) - { - ImageToolMannage.rectON = true; - } - private void hpb_circe_Click(object sender, EventArgs e) - { - ImageToolMannage.circleON = true; - } - private void fb_fixSetting_Click(object sender, EventArgs e) - { - roi_w = int.Parse(ftb_w.Text.ToString()); - roi_h = int.Parse(ftb_h.Text.ToString()); - circle_r = int.Parse(ftb_r.Text.ToString()); - // ImageToolMannage.imagePanel.SampleOneSize(); - - } - #region 对外接口 - int lastColor = -1; - bool isMark = false; - public void SetMark(bool ret = true) - { - if (ret) - { - isMark = true; - lastColor = cb_colortable.SelectedIndex; - cb_colortable.SelectedIndex = 7; - cb_colortable.Enabled = false; - } - else - { - cb_colortable.Enabled = true; - if (isMark == true) - { - if (lastColor > 0) - { - cb_colortable.SelectedIndex = lastColor; - lastColor = -1; - isMark = false; - } - - } - } - } - - public float ColorMax - { - get - { - if (nud_color_max.InvokeRequired) - { - - return (float)nud_color_max.Invoke(new Func(() => (float)nud_color_max.Value)); - } - else - { - - return (float)nud_color_max.Value; - } - } - } - - public float ColorMin - { - get - { - if (nud_color_min.InvokeRequired) - { - - return (float)nud_color_min.Invoke(new Func(() => (float)nud_color_min.Value)); - } - else - { - - return (float)nud_color_min.Value; - } - } - } - - public int brightness - { - get - { - if (mts_brightness.InvokeRequired) - { - - return (int)mts_brightness.Invoke(new Func(() => ( mts_brightness.Value -127))); - } - else - { - - return (mts_brightness.Value - 127); - } - } - } - public double opacity - { - get - { - if (mts_opacity.InvokeRequired) - { - - return (double)mts_opacity.Invoke(new Func(() => (mts_opacity.Value / 100.0))); - } - else - { - - return (mts_opacity.Value / 100.0); - } - - } - } - public int colorbarIndex - { - get { - if (cb_colortable.InvokeRequired) - { - - return (int)cb_colortable.Invoke(new Func(() => cb_colortable.SelectedIndex)); - } - else - { - - return cb_colortable.SelectedIndex; - } - } - } - public int ROI_W - { - get { return roi_w; } - set { roi_w = value; ftb_w.Text = roi_w.ToString(); } - } - public int ROI_H - { - get { return roi_h; } - set { roi_h = value; ftb_h.Text = roi_h.ToString(); } - } - public int CIRCLE_R - { - get { return circle_r; } - set { circle_r = value; ftb_r.Text = circle_r.ToString(); } - } - #endregion - - - } -} diff --git a/src/PBAnaly/UI/ImageToolPaletteForm.resx b/src/PBAnaly/UI/ImageToolPaletteForm.resx deleted file mode 100644 index 1af7de1..0000000 --- a/src/PBAnaly/UI/ImageToolPaletteForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/src/PBAnaly/UI/colorbarControl.Designer.cs b/src/PBAnaly/UI/colorbarControl.Designer.cs deleted file mode 100644 index 1687be4..0000000 --- a/src/PBAnaly/UI/colorbarControl.Designer.cs +++ /dev/null @@ -1,103 +0,0 @@ -namespace PBAnaly.UI -{ - partial class colorbarControl - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.slb_name = new ReaLTaiizor.Controls.SkyLabel(); - this.pb_colorbar = new System.Windows.Forms.PictureBox(); - this.tableLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pb_colorbar)).BeginInit(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.37313F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 74.62687F)); - this.tableLayoutPanel1.Controls.Add(this.slb_name, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.pb_colorbar, 0, 1); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 52F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(67, 300); - this.tableLayoutPanel1.TabIndex = 0; - // - // slb_name - // - this.slb_name.AutoSize = true; - this.tableLayoutPanel1.SetColumnSpan(this.slb_name, 2); - this.slb_name.Dock = System.Windows.Forms.DockStyle.Fill; - this.slb_name.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold); - this.slb_name.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(94)))), ((int)(((byte)(137))))); - this.slb_name.Location = new System.Drawing.Point(3, 0); - this.slb_name.Name = "slb_name"; - this.slb_name.Size = new System.Drawing.Size(61, 19); - this.slb_name.TabIndex = 0; - this.slb_name.Text = "mark"; - this.slb_name.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pb_colorbar - // - this.pb_colorbar.Dock = System.Windows.Forms.DockStyle.Fill; - this.pb_colorbar.Image = global::PBAnaly.Properties.Resources.Gray; - this.pb_colorbar.Location = new System.Drawing.Point(0, 19); - this.pb_colorbar.Margin = new System.Windows.Forms.Padding(0); - this.pb_colorbar.Name = "pb_colorbar"; - this.pb_colorbar.Size = new System.Drawing.Size(16, 229); - this.pb_colorbar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pb_colorbar.TabIndex = 1; - this.pb_colorbar.TabStop = false; - // - // colorbarControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel1); - this.MaximumSize = new System.Drawing.Size(70, 200); - this.MinimumSize = new System.Drawing.Size(0, 300); - this.Name = "colorbarControl"; - this.Size = new System.Drawing.Size(67, 300); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pb_colorbar)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private ReaLTaiizor.Controls.SkyLabel slb_name; - private System.Windows.Forms.PictureBox pb_colorbar; - } -} diff --git a/src/PBAnaly/UI/colorbarControl.cs b/src/PBAnaly/UI/colorbarControl.cs deleted file mode 100644 index a98a963..0000000 --- a/src/PBAnaly/UI/colorbarControl.cs +++ /dev/null @@ -1,122 +0,0 @@ -using PBAnaly.Properties; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace PBAnaly.UI -{ - public partial class colorbarControl : UserControl - { - public colorbarControl() - { - InitializeComponent(); - - } - - public string SetSytingName - { - set { slb_name.Text = value; } - } - public void SetDrawBar(string type) - { - Bitmap rotatedImage = null; - switch (type) - { - case "YellowHot": - rotatedImage = Resources.YellowHot_1; - - - break; - case "Black_Red": - rotatedImage = Resources.Black_Blue_1; - - break; - case "Black_Green": - rotatedImage = Resources.Black_Green_1; - - break; - case "Black_Blue": - rotatedImage = Resources.Black_Blue_1; - - break; - case "Black_Yley": - rotatedImage = Resources.Black_Yley_1; - - break; - case "Black_SDS": - rotatedImage = Resources.Black_SDS_1; - - break; - case "EtBr": - rotatedImage = Resources.EtBr_1; - - break; - case "Pseudo": - rotatedImage = Resources.Pseudo_1; - - break; - case "Gray": - rotatedImage = Resources.Gray; - - break; - - - } - if (rotatedImage != null) - { - pb_colorbar.Image = rotatedImage; - pb_colorbar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - } - } - - //public void SetHistogramGradient(int[] histom,int min,int max) - //{ - // using (Graphics g = panel1.CreateGraphics()) - // { - // panel1.Refresh(); // 清除之前的绘制 - // Rectangle rect = new Rectangle(0, 0, 30, panel1.Height); - // byte StartgrayScaleValue = (byte)((min / 65535.0) * 255); - // byte EndgrayScaleValue = (byte)((max / 65535.0) * 255); - // Color startColor = Color.FromArgb(StartgrayScaleValue, StartgrayScaleValue, StartgrayScaleValue); - // Color endColor = Color.FromArgb(EndgrayScaleValue, EndgrayScaleValue, EndgrayScaleValue); - - // using (LinearGradientBrush brush = new LinearGradientBrush(rect, endColor, startColor, LinearGradientMode.Vertical)) - // { - // g.FillRectangle(brush, rect); - // } - - // Pen pen = new Pen(Color.Black, 1); - // Font font = new Font("Arial", 8); - // int diff = max - min; - // int numberOfTicks = CalculateNumberOfTicks(diff); // 计算刻度数量 - - // // 循环现在从1开始并在numberOfTicks-1结束,避免绘制首尾标签 - // for (int i = 1; i < numberOfTicks; i++) - // { - // int labelValue = max - (diff / numberOfTicks * i); - // int y = rect.Top + (i * (rect.Height / numberOfTicks)); - // g.DrawLine(pen, rect.Right, y, rect.Right + 5, y); // 绘制刻度 - // string labelText = labelValue.ToString(); - // g.DrawString(labelText, font, Brushes.Black, rect.Right + 10, y - font.Height / 2); - // } - // } - - //} - //private int CalculateNumberOfTicks(int diff) - //{ - // if (diff > 10000) return 10; - // if (diff > 5000) return 8; - // if (diff > 1000) return 5; - // return 3; // 最小的刻度数量 - //} - - - } -} diff --git a/src/PBAnaly/UI/colorbarControl.resx b/src/PBAnaly/UI/colorbarControl.resx deleted file mode 100644 index 1af7de1..0000000 --- a/src/PBAnaly/UI/colorbarControl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file