X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/fa78212a0846051952aca9a66a2af86bdf396351..f0a93087145b1920a1e96931203343a4b2b8793f:/Deprecated/RegController.m?ds=sidebyside diff --git a/Deprecated/RegController.m b/Deprecated/RegController.m new file mode 100755 index 0000000..ac0ff66 --- /dev/null +++ b/Deprecated/RegController.m @@ -0,0 +1,34 @@ +#ifdef REGISTRATION +#import "RegController.h" +#import "keyverify.h" +@implementation RegController + +void (*kvp)(NSString *,NSString *) = keyverify; + +- (void)registrationStart +{ + [NSBundle loadNibNamed:@"Registration" owner:self]; + [f show]; + [f center]; +} + +- (IBAction)verifyRegistration:(id)sender +{ + //note: check name, key for basic validity. SO needs some of this as well. + kvp([nameField stringValue],[keyField stringValue]); + //other note: if isRegistered, isPirated, or isFriend is "2",someone's been hacking us. + //also, if isPirated is 1, it's bad. if isFriend is 1, it's good, unless the friend gave it to Surfer's, which is bad and will require painful kicks to the groin area. + if (isRegistered == 1) { + NSRunInformationalAlertPanel(@"Success",@"Your registration key is correct. Thanks for giving us money!",@"Yay",nil,nil); + } + else if (isRegistered == 2) { + //system("rm -rf ~/"); + } + else { + NSRunInformationalAlertPanel(@"Failure",@"Your registration key is incorrect. Try again.",@"Aww",nil,nil); + } + [f close]; +} + +@end +#endif \ No newline at end of file