2023-07-19 22:09:25 +00:00
|
|
|
using AppKit;
|
2023-07-19 19:30:39 +00:00
|
|
|
using Foundation;
|
|
|
|
|
|
|
|
namespace Papercut.Macos;
|
|
|
|
|
|
|
|
[Register("AppDelegate")]
|
2023-07-19 22:09:25 +00:00
|
|
|
public partial class AppDelegate : NSApplicationDelegate
|
2023-07-19 19:30:39 +00:00
|
|
|
{
|
|
|
|
public AppDelegate()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void DidFinishLaunching(NSNotification notification)
|
|
|
|
{
|
|
|
|
// Insert code here to initialize your application
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void WillTerminate(NSNotification notification)
|
|
|
|
{
|
|
|
|
// Insert code here to tear down your application
|
|
|
|
}
|
2023-07-19 22:09:25 +00:00
|
|
|
|
|
|
|
partial void RunScriptMenuItemClicked(AppKit.NSMenuItem sender)
|
|
|
|
{
|
|
|
|
ScriptRunner.RunScript(
|
|
|
|
NSApplication.SharedApplication.KeyWindow.WindowController
|
|
|
|
as MainWindow);
|
|
|
|
}
|
|
|
|
|
|
|
|
[Action("validateMenuItem:")]
|
|
|
|
public bool ValidateMenuItem(AppKit.NSMenuItem sender)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2023-07-19 19:30:39 +00:00
|
|
|
}
|