// // PasswordWindowController.h // PDF Reader // // Created by wangshuai on 13-12-3. // Copyright (c) 2013年 zhangjie. All rights reserved. // #import @class PasswordWindowController; @protocol PasswordWindowDelegate @optional - (void)didFinshedUnlockFile:(PasswordWindowController*)passwordWindowCtr withPassword:(NSString*)password; - (void)didCancelUnlockFile:(PasswordWindowController*)passwordWindowCtr; @end @interface PasswordWindowController : NSWindowController{ NSURL *_fileURL; // id _passwordDelegate; NSInteger _tag; IBOutlet NSTextField *_passwordTextField; IBOutlet NSTextField *_titleTextField; IBOutlet NSTextField *_textField; IBOutlet NSButton *_openButton; IBOutlet NSButton *_cancelButton; } @property (nonatomic,retain) NSURL *fileURL; @property (nonatomic,weak) id passwordDelegate; @property (nonatomic,assign) NSInteger tag; - (IBAction)cancelAction:(id)sender; - (IBAction)OKAction:(id)sender; - (void)beginSheetModalForWindow:(NSWindow *)window completionHandler:(void (^)(NSString *password))handler; @end