123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import Cocoa
- var accountExceptionController: KMAccountExceptionWindowController?
- var accountExceptionMainWindow: NSWindow?
- class KMAccountExceptionWindowController: NSWindowController {
- @IBOutlet weak var accountExceptionView: KMAccountExceptionView!
- override func windowDidLoad() {
- super.windowDidLoad()
- self.setup()
-
- }
-
-
- static func show(window: NSWindow) -> KMAccountExceptionWindowController {
- let controller: KMAccountExceptionWindowController = KMAccountExceptionWindowController.init(windowNibName: "KMAccountExceptionWindowController")
- window.beginSheet(controller.window!)
- controller.window?.center()
- accountExceptionController = controller
- accountExceptionMainWindow = window
- return controller
- }
-
- func setup() {
- self.window?.contentView?.backgroundColor(NSColor.km_init(hex: "#FFFFFF"))
-
- self.accountExceptionView.cancelAction = { view in
- cancellationMainWindow?.endSheet(view.window!)
- view.window?.close()
- accountExceptionMainWindow = nil
- accountExceptionController = nil
- }
- }
- }
|