From e29238130ca2532fd1b371bca0e049f258a9af4b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 21 Nov 2014 12:13:21 -0500 Subject: [PATCH] add mac files --- MediaBrowser.Server.Mac/AppController.cs | 29 +++++++++++++++++++ .../AppController.designer.cs | 27 +++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 MediaBrowser.Server.Mac/AppController.cs create mode 100644 MediaBrowser.Server.Mac/AppController.designer.cs diff --git a/MediaBrowser.Server.Mac/AppController.cs b/MediaBrowser.Server.Mac/AppController.cs new file mode 100644 index 0000000000..7f364ed71f --- /dev/null +++ b/MediaBrowser.Server.Mac/AppController.cs @@ -0,0 +1,29 @@ +using System; +using MonoMac.Foundation; +using MonoMac.AppKit; + +namespace StatusMenu +{ + [Register("AppController")] + public partial class AppController : NSObject + { + public AppController() + { + + } + + public override void AwakeFromNib() + { + var statusItem = NSStatusBar.SystemStatusBar.CreateStatusItem(30); + statusItem.Menu = statusMenu; + statusItem.Image = NSImage.ImageNamed("f3bfd_Untitled-thumb"); + statusItem.HighlightMode = true; + } + + partial void HelloWorld(NSObject sender) + { + Console.WriteLine("hello world"); + } + } +} + diff --git a/MediaBrowser.Server.Mac/AppController.designer.cs b/MediaBrowser.Server.Mac/AppController.designer.cs new file mode 100644 index 0000000000..307d0eee32 --- /dev/null +++ b/MediaBrowser.Server.Mac/AppController.designer.cs @@ -0,0 +1,27 @@ +// WARNING +// +// This file has been generated automatically by MonoDevelop to store outlets and +// actions made in the Xcode designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using MonoMac.Foundation; + +namespace StatusMenu +{ + partial class AppController + { + [Outlet] + MonoMac.AppKit.NSMenu statusMenu { get; set; } + + [Action ("HelloWorld:")] + partial void HelloWorld (MonoMac.Foundation.NSObject sender); + + void ReleaseDesignerOutlets () + { + if (statusMenu != null) { + statusMenu.Dispose (); + statusMenu = null; + } + } + } +}