修复Camera类中saveLogToolStripMenuItem字段未初始化的问题,并调整保存日志菜单位置到最末尾
This commit is contained in:
@@ -8,9 +8,7 @@
|
|||||||
:class="['tab-item', { 'active': activeTabIndex === index }]"
|
:class="['tab-item', { 'active': activeTabIndex === index }]"
|
||||||
@click="setActiveTab(index)"
|
@click="setActiveTab(index)"
|
||||||
>
|
>
|
||||||
<div class="tab-title-container">
|
|
||||||
<div class="tab-title">{{ panel.title }}</div>
|
<div class="tab-title">{{ panel.title }}</div>
|
||||||
</div>
|
|
||||||
<div class="tab-buttons">
|
<div class="tab-buttons">
|
||||||
<button
|
<button
|
||||||
class="button-icon p-[2px] rounded hover:opacity-100 opacity-80"
|
class="button-icon p-[2px] rounded hover:opacity-100 opacity-80"
|
||||||
@@ -120,11 +118,6 @@ const closeTab = (tabId) => {
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-title-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-title {
|
.tab-title {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|||||||
@@ -61,13 +61,17 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
//
|
//
|
||||||
// contextMenuStrip1
|
// contextMenuStrip1
|
||||||
//
|
//
|
||||||
|
// 初始化保存日志菜单项
|
||||||
|
this.saveLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
|
||||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.imageModeToolStripMenuItem,
|
this.imageModeToolStripMenuItem,
|
||||||
this.colorModeToolStripMenuItem,
|
this.colorModeToolStripMenuItem,
|
||||||
this.temperatureDisplayToolStripMenuItem,
|
this.temperatureDisplayToolStripMenuItem,
|
||||||
this.toolStripSeparator1,
|
this.toolStripSeparator1,
|
||||||
this.saveTemperatureToolStripMenuItem,
|
this.saveTemperatureToolStripMenuItem,
|
||||||
this.pauseDetectionToolStripMenuItem});
|
this.pauseDetectionToolStripMenuItem,
|
||||||
|
this.saveLogToolStripMenuItem});
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 100);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 100);
|
||||||
//
|
//
|
||||||
@@ -170,6 +174,14 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
this.saveTemperatureToolStripMenuItem.Text = "保存温度";
|
this.saveTemperatureToolStripMenuItem.Text = "保存温度";
|
||||||
this.saveTemperatureToolStripMenuItem.Click += new System.EventHandler(this.SaveTemperatureToolStripMenuItem_Click);
|
this.saveTemperatureToolStripMenuItem.Click += new System.EventHandler(this.SaveTemperatureToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// saveLogToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saveLogToolStripMenuItem.CheckOnClick = true;
|
||||||
|
this.saveLogToolStripMenuItem.Name = "saveLogToolStripMenuItem";
|
||||||
|
this.saveLogToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||||
|
this.saveLogToolStripMenuItem.Text = "保存日志";
|
||||||
|
this.saveLogToolStripMenuItem.Click += new System.EventHandler(this.SaveLogToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// pauseDetectionToolStripMenuItem
|
// pauseDetectionToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.pauseDetectionToolStripMenuItem.Name = "pauseDetectionToolStripMenuItem";
|
this.pauseDetectionToolStripMenuItem.Name = "pauseDetectionToolStripMenuItem";
|
||||||
@@ -283,5 +295,6 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
private System.Windows.Forms.ToolStripMenuItem maxTemperatureToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem maxTemperatureToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem avgTemperatureToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem avgTemperatureToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem minTemperatureToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem minTemperatureToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveLogToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,6 +280,10 @@ namespace JoyD.Windows.CS.Toprie
|
|||||||
// 为右键菜单添加Opening事件,用于在菜单显示前更新色彩模式的选中状态
|
// 为右键菜单添加Opening事件,用于在菜单显示前更新色彩模式的选中状态
|
||||||
this.contextMenuStrip1.Opening += ContextMenuStrip1_Opening;
|
this.contextMenuStrip1.Opening += ContextMenuStrip1_Opening;
|
||||||
|
|
||||||
|
// 初始化日志保存状态,确保与菜单项状态同步
|
||||||
|
_saveLogEnabled = false; // 默认禁用日志保存
|
||||||
|
saveLogToolStripMenuItem.Checked = _saveLogEnabled;
|
||||||
|
|
||||||
// 将设计模式状态传递给DeviceManager
|
// 将设计模式状态传递给DeviceManager
|
||||||
UpdateDesignModeStatus();
|
UpdateDesignModeStatus();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user