优化菜单
This commit is contained in:
@@ -351,10 +351,10 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
_imageBuffer = new Bitmap(BUFFER_WIDTH, BUFFER_HEIGHT);
|
_imageBuffer = new Bitmap(BUFFER_WIDTH, BUFFER_HEIGHT);
|
||||||
Console.WriteLine($"图像缓冲区已初始化: {BUFFER_WIDTH}x{BUFFER_HEIGHT}");
|
Console.WriteLine($"图像缓冲区已初始化: {BUFFER_WIDTH}x{BUFFER_HEIGHT}");
|
||||||
|
|
||||||
// 初始化缓冲区为透明背景
|
// 初始化缓冲区为黑色背景
|
||||||
using (Graphics g = Graphics.FromImage(_imageBuffer))
|
using (Graphics g = Graphics.FromImage(_imageBuffer))
|
||||||
{
|
{
|
||||||
g.Clear(Color.Transparent);
|
g.Clear(Color.Black);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化InfoImage为透明bitmap
|
// 初始化InfoImage为透明bitmap
|
||||||
@@ -710,8 +710,8 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
{
|
{
|
||||||
using (Graphics g = Graphics.FromImage(_imageBuffer))
|
using (Graphics g = Graphics.FromImage(_imageBuffer))
|
||||||
{
|
{
|
||||||
// 清除缓冲区背景为透明色
|
// 清除缓冲区背景为黑色
|
||||||
g.Clear(Color.Transparent);
|
g.Clear(Color.Black);
|
||||||
|
|
||||||
// 步骤1:先将LastImage绘制到全局缓冲
|
// 步骤1:先将LastImage绘制到全局缓冲
|
||||||
if (lastImage != null)
|
if (lastImage != null)
|
||||||
@@ -1195,7 +1195,7 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
toolStripSeparator1.Visible = true;
|
toolStripSeparator1.Visible = true;
|
||||||
|
|
||||||
// 根据当前图像模式控制色彩模式菜单的可见性
|
// 根据当前图像模式控制色彩模式菜单的可见性
|
||||||
colorModeToolStripMenuItem.Visible = _deviceManager.CurrentImageMode == ImageMode.Infrared;
|
colorModeToolStripMenuItem.Visible = true;
|
||||||
// 清除视频模式菜单项的选中状态
|
// 清除视频模式菜单项的选中状态
|
||||||
thermalModeToolStripMenuItem.Checked = false;
|
thermalModeToolStripMenuItem.Checked = false;
|
||||||
visibleModeToolStripMenuItem.Checked = false;
|
visibleModeToolStripMenuItem.Checked = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user