Beispiel #1
0
        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;
        }
Beispiel #2
0
    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();
        }
    }