-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
434 additions
and
167 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
LeetDown_M/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+869 Bytes
LeetDown_M/Assets.xcassets/AppIcon.appiconset/circle-cropped-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
LeetDown_M/Assets.xcassets/homebuttonimage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "homebuttonimage.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.84 KB
LeetDown_M/Assets.xcassets/homebuttonimage.imageset/homebuttonimage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
LeetDown_M/Assets.xcassets/iphoneDFU.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "iphoneDFU.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
LeetDown_M/Assets.xcassets/lockbutton.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "lockbutton.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// DFUHelperViewController.h | ||
// LeetDown | ||
// | ||
// Created by rA9stuff on 1.08.2021. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface DFUHelperViewController : NSViewController | ||
@property (assign) IBOutlet NSTextField *getreadytext; | ||
@property (assign) IBOutlet NSTextField *getreadyCounter; | ||
@property (assign) IBOutlet NSImageView *lockbuttonimage; | ||
@property (assign) IBOutlet NSImageView *homebuttonimage; | ||
@property (assign) IBOutlet NSTextField *firstcounter; | ||
@property (assign) IBOutlet NSTextField *secondcounter; | ||
@property (assign) IBOutlet NSTextField *firsttext; | ||
@property (assign) IBOutlet NSTextField *secondtext; | ||
@property (assign) IBOutlet NSImageView *iphonepic; | ||
@property (assign) IBOutlet NSButton *startbutton; | ||
@property (assign) IBOutlet NSButton *cancelout; | ||
|
||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
// | ||
// DFUHelperViewController.m | ||
// LeetDown | ||
// | ||
// Created by rA9stuff on 1.08.2021. | ||
// | ||
|
||
#import "DFUHelperViewController.h" | ||
#import "ViewController.h" | ||
|
||
@implementation DFUHelperViewController | ||
|
||
- (IBAction)cancel:(id)sender { | ||
|
||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
[self.view.window.contentViewController dismissViewController:self]; | ||
}); | ||
|
||
} | ||
|
||
- (IBAction)startbutton:(id)sender { | ||
|
||
|
||
_startbutton.enabled = false; | ||
_startbutton.alphaValue = 0; | ||
_getreadyCounter.alphaValue = 1; | ||
_getreadytext.alphaValue = 1; | ||
_iphonepic.alphaValue = 0.5; | ||
_firsttext.alphaValue = 0.3; | ||
_secondtext.alphaValue = 0.3; | ||
_firstcounter.alphaValue = 0.3; | ||
_secondcounter.alphaValue = 0.3; | ||
_homebuttonimage.alphaValue = 0; | ||
_lockbuttonimage.alphaValue = 0; | ||
|
||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | ||
|
||
for (int i = 5; i > 0; i--) { | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_getreadyCounter.stringValue = [NSString stringWithFormat:@"%d", i]; | ||
}); | ||
sleep(1); | ||
} | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_getreadyCounter.stringValue = @"0"; | ||
_getreadyCounter.alphaValue = 0.3; | ||
_getreadytext.alphaValue = 0.3; | ||
}); | ||
|
||
for (int i = 0; i < 100; i++) { | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_lockbuttonimage.alphaValue = 0.01*i; | ||
_homebuttonimage.alphaValue = 0.01*i; | ||
}); | ||
usleep(1000); | ||
} | ||
|
||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_firsttext.alphaValue = 1; | ||
_firstcounter.alphaValue = 1; | ||
}); | ||
|
||
for (int i = 10; i > 0; i--) { | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_firstcounter.stringValue = [[NSString stringWithFormat:@"%d", i] stringByAppendingString:@" seconds"]; | ||
}); | ||
sleep(1); | ||
} | ||
|
||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_firstcounter.stringValue = @"0 seconds"; | ||
}); | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_firsttext.alphaValue = 0.3; | ||
_firstcounter.alphaValue = 0.3; | ||
_secondtext.alphaValue = 1; | ||
_secondcounter.alphaValue = 1; | ||
_lockbuttonimage.alphaValue = 0; | ||
}); | ||
|
||
for (int i = 10; i > 0; i--) { | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
_secondcounter.stringValue = [[NSString stringWithFormat:@"%d", i] stringByAppendingString:@" seconds"]; | ||
}); | ||
sleep(1); | ||
} | ||
dispatch_async(dispatch_get_main_queue(), ^(){ | ||
[self.view.window.contentViewController dismissViewController:self]; | ||
}); | ||
complete = true; | ||
}); | ||
|
||
if (complete) { | ||
|
||
} | ||
|
||
} | ||
bool complete = false; | ||
- (void) viewDidLoad { | ||
|
||
[super viewDidLoad]; | ||
|
||
|
||
_getreadyCounter.alphaValue = 0.1; | ||
_getreadytext.alphaValue = 0.1; | ||
_iphonepic.alphaValue = 0.1; | ||
_firsttext.alphaValue = 0.1; | ||
_secondtext.alphaValue = 0.1; | ||
_firstcounter.alphaValue = 0.1; | ||
_secondcounter.alphaValue = 0.1; | ||
_homebuttonimage.alphaValue = 0; | ||
_lockbuttonimage.alphaValue = 0; | ||
_homebuttonimage.image = [NSImage imageNamed:@"homebuttonimage"]; | ||
|
||
|
||
|
||
|
||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.