예제 #1
0
 public TrayApplication(TrayIcon trayIcon)
 {
     TrayIcon             = trayIcon ?? throw new ArgumentNullException(nameof(trayIcon));
     TrayIcon.Application = this;
     TrayIcon.Disposed   += (sender, args) => {
         this.Exit();
     };
 }
예제 #2
0
 public static void Run(TrayIcon trayIcon)
 {
     new TrayApplication(trayIcon).Start();
 }