More work on Password creation

This commit is contained in:
michael starke
2013-04-18 22:49:07 +02:00
parent b6504b3dc4
commit de43936e30
9 changed files with 1575 additions and 426 deletions

View File

@@ -8,19 +8,45 @@
#import "MPPasswordCreatorViewController.h"
#define MIN_PASSWORD_LENGTH 1
#define MAX_PASSWORD_LENGTH 64
@interface MPPasswordCreatorViewController ()
@property (assign) IBOutlet NSTextField *passwordTextField;
@property (assign) IBOutlet NSTextField *passwordLengthTextField;
@property (assign) IBOutlet NSTextField *customCharactersTextField;
@property (assign) IBOutlet NSSlider *passwordLengthSlider;
@property (assign) NSUInteger passwordLength;
- (IBAction)_create:(id)sender;
- (IBAction)_toggleCharacters:(id)sender;
@end
@implementation MPPasswordCreatorViewController
- (id)init
{
- (id)init {
self = [super initWithNibName:@"PasswordCreatorView" bundle:nil];
if (self) {
// setup
_passwordLength = 12;
}
return self;
}
- (void)didLoadView {
[self.passwordLengthSlider setMinValue:MIN_PASSWORD_LENGTH];
[self.passwordLengthSlider setMaxValue:MAX_PASSWORD_LENGTH];
[self.passwordLengthSlider setContinuous:YES];
/* Value Transformer */
[self.passwordLengthSlider bind:NSValueBinding toObject:self withKeyPath:@"passwordLength" options:nil];
[self.passwordLengthTextField bind:NSValueBinding toObject:self withKeyPath:@"passwordLength" options:nil];
}
- (IBAction)_create:(id)sender {
}
- (IBAction)_toggleCharacters:(id)sender {
}
@end