在Camera组件中添加maskImageBox作为遮罩层

This commit is contained in:
zqm
2025-10-30 08:34:10 +08:00
parent a596f78dc8
commit 33e5baaaf5

View File

@@ -17,6 +17,7 @@ namespace JoyD.Windows.CS.Toprie
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.imageBox = new System.Windows.Forms.PictureBox(); this.imageBox = new System.Windows.Forms.PictureBox();
this.maskImageBox = new System.Windows.Forms.PictureBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.imageModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.imageModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.thermalModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.thermalModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -52,6 +53,18 @@ namespace JoyD.Windows.CS.Toprie
this.imageBox.TabIndex = 0; this.imageBox.TabIndex = 0;
this.imageBox.TabStop = false; this.imageBox.TabStop = false;
// //
// maskImageBox
//
this.maskImageBox.ContextMenuStrip = this.contextMenuStrip1;
this.maskImageBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.maskImageBox.Location = new System.Drawing.Point(0, 0);
this.maskImageBox.Name = "maskImageBox";
this.maskImageBox.Size = new System.Drawing.Size(512, 384);
this.maskImageBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.maskImageBox.TabIndex = 1;
this.maskImageBox.TabStop = false;
this.maskImageBox.BackColor = System.Drawing.Color.Transparent;
//
// contextMenuStrip1 // contextMenuStrip1
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -175,10 +188,12 @@ namespace JoyD.Windows.CS.Toprie
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.imageBox); this.Controls.Add(this.imageBox);
this.Controls.Add(this.maskImageBox);
this.Name = "Camera"; this.Name = "Camera";
this.Size = new System.Drawing.Size(512, 384); this.Size = new System.Drawing.Size(512, 384);
this.Load += new System.EventHandler(this.Camera_Load); this.Load += new System.EventHandler(this.Camera_Load);
((System.ComponentModel.ISupportInitialize)(this.imageBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.maskImageBox)).EndInit();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
@@ -187,6 +202,7 @@ namespace JoyD.Windows.CS.Toprie
#endregion #endregion
private System.Windows.Forms.PictureBox imageBox; private System.Windows.Forms.PictureBox imageBox;
private System.Windows.Forms.PictureBox maskImageBox;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem pauseImageUpdateToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem pauseImageUpdateToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;