コード例 #1
0
ファイル: FormSysTray.cs プロジェクト: linnoss/MediaServer
        public FormSysTray(Controller aController)
        {
            InitializeComponent();

            iController = aController;
            iNotifyIcon.Icon = Linn.MediaServer.Properties.Resources.SysTrayIcon;
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: linnoss/MediaServer
        private void ApplicationStartup(object sender, StartupEventArgs e)
        {
            // create the configuration window
            iWindow = new ConfigurationWindow();
            iWindow.Closing += EventWindowClosing;

            // create the controller for the app
            iController = new Controller(this);

            // create and show the sys tray icon
            iFormSysTray = new FormSysTray(iController);
        }
コード例 #3
0
ファイル: AppDelegate.cs プロジェクト: linnoss/MediaServer
        public override void FinishedLaunching(NSObject notification)
        {
            // load image for the status item
            string imageFile = NSBundle.MainBundle.PathForImageResource("SysTrayIcon.png");
            NSImage image = new NSImage(imageFile);

            // creating the status item with a length of -2 is equivalent to the call
            // [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength]
            iStatusItem = NSStatusBar.SystemStatusBar.CreateStatusItem(-2);
            iStatusItem.HighlightMode = true;
            iStatusItem.Menu = StatusMenu;
            iStatusItem.Image = image;

            // create the main configuration window
            iWindow = new ConfigurationWindowController();
            iWindow.LoadWindow();

            // create the controller for the application
            iController = new Controller(this);
        }