unrealircd

- supernets unrealircd source & configuration
git clone git://git.acid.vegas/unrealircd.git
Log | Files | Refs | Archive | README | LICENSE

AppDelegate.swift (1110B)

      1 //
      2 //  AppDelegate.swift
      3 //  UnrealIRCd
      4 //
      5 //  Created by Travis McArthur on 6/26/15.
      6 //  Copyright (c) 2015 UnrealIRCd Team. All rights reserved.
      7 //
      8 
      9 import Cocoa
     10 
     11 @NSApplicationMain
     12 class AppDelegate: NSObject, NSApplicationDelegate {
     13 
     14     
     15     @IBOutlet weak var mainMenu : NSMenu?
     16     var appModel : AppModel?
     17     
     18     override init() {
     19         super.init()
     20     }
     21  
     22     func applicationDidFinishLaunching(aNotification: NSNotification)
     23     {
     24         appModel = AppModel(menu: mainMenu!)
     25         appModel?.startup()
     26         
     27     }
     28 
     29     func applicationWillTerminate(aNotification: NSNotification) {
     30         appModel?.shutdown()
     31     }
     32     
     33     @IBAction func startDaemon(sender: NSMenuItem) {
     34         appModel?.startDaemon()
     35     }
     36     
     37     @IBAction func stopDaemon(sender: NSMenuItem) {
     38         appModel?.stopDaemon()
     39     }
     40     
     41     @IBAction func configureDaemon(sender: NSMenuItem) {
     42         appModel?.showPreferences()
     43     }
     44     
     45     @IBAction func help(sender: NSMenuItem) {
     46         appModel?.launchHelp()
     47     }
     48     
     49     @IBAction func quit(sender: NSMenuItem) {
     50         appModel?.shutdown()
     51     }
     52 
     53 
     54 }
     55