@@ -25,10 +25,10 @@ public TrayAppContext()
2525 {
2626 var menu = new ContextMenuStrip ( ) ;
2727 statusItem = new ToolStripMenuItem ( "Status: Stopped" ) { Enabled = false } ;
28- startItem = new ToolStripMenuItem ( "Start OneCode " , null , async ( _ , __ ) => await StartAppAsync ( ) ) ;
29- stopItem = new ToolStripMenuItem ( "Stop OneCode " , null , async ( _ , __ ) => await StopAppAsync ( ) ) ;
30- openItem = new ToolStripMenuItem ( "Open OneCode " , null , ( _ , __ ) => OpenUrl ( ) ) ;
31- exitItem = new ToolStripMenuItem ( "Exit " , null , ( _ , __ ) => _ = ShutdownAsync ( ) ) ;
28+ startItem = new ToolStripMenuItem ( "启动OneCode " , null , async ( _ , __ ) => await StartAppAsync ( ) ) ;
29+ stopItem = new ToolStripMenuItem ( "关闭OneCode " , null , async ( _ , __ ) => await StopAppAsync ( ) ) ;
30+ openItem = new ToolStripMenuItem ( "打开OneCode " , null , ( _ , __ ) => OpenUrl ( ) ) ;
31+ exitItem = new ToolStripMenuItem ( "退出 " , null , ( _ , __ ) => _ = ShutdownAsync ( ) ) ;
3232
3333 menu . Items . Add ( statusItem ) ;
3434 menu . Items . Add ( new ToolStripSeparator ( ) ) ;
@@ -40,10 +40,11 @@ public TrayAppContext()
4040 menu . Items . Add ( exitItem ) ;
4141 menu . Opening += ( _ , __ ) => RefreshMenu ( ) ;
4242
43+ var iconStream = typeof ( TrayAppContext ) . Assembly . GetManifestResourceStream ( "OneCode.Win.favicon.ico" ) ;
4344 trayIcon = new NotifyIcon
4445 {
4546 Text = "OneCode" ,
46- Icon = SystemIcons . Application ,
47+ Icon = iconStream != null ? new Icon ( iconStream ) : SystemIcons . Application ,
4748 ContextMenuStrip = menu ,
4849 Visible = true
4950 } ;
0 commit comments