public TrayIcon(MicController micController) { icon = new NotifyIcon(); mutedIcon = Resources.GreyMicrophone; openMicIcon = Resources.GreenMicrophone; SetMutedIcon(micController.IsMuted); micController.MuteToggled += SetMutedIcon; icon.Text = Resources.ProgramTitle; icon.Visible = true; icon.ContextMenuStrip = new ContextMenu(micController).Create(); this.micController = micController; }
static void Main() { Program.MicController = new MicController(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ApplicationExit += Application_ApplicationExit; using (TrayIcon tray = new TrayIcon()) { tray.Display(); Application.Run(); } }