// 创建托盘图标、添加选项 void AddSystemTray() { _icon = new SystemTray(_systemTrayIcon); _topmost = _icon.AddItem("置顶显示", ToggleTopMost); _runOnStart = _icon.AddItem("开机自启", ToggleRunOnStartup); _icon.AddItem("重置位置", ResetPos); _icon.AddSeparator(); _icon.AddItem("查看文档", OpenDoc); _icon.AddItem("检查更新", CheckUpdate); _icon.AddSeparator(); _icon.AddItem("退出", Exit); _icon.AddDoubleClickEvent(ToggleTopMost); _icon.AddSingleClickEvent(ShowRole); _topmost.Image = DataModel.Instance.Data.isTopMost ? _enableImage : null; _runOnStart.Image = DataModel.Instance.Data.isRunOnStartup ? _enableImage : null; }