Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

Commit 3c4d638

Browse files
committed
Initial import from old svn repo at code.phiresearchlab.org/svn
1 parent 3b69104 commit 3c4d638

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+6558
-3
lines changed

112-group.png

467 Bytes
Loading

79-medical-bag.png

266 Bytes
Loading

91-beaker2.png

393 Bytes
Loading

AboutView.xib

+413
Large diffs are not rendered by default.

AboutViewController.h

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//
2+
// AboutViewController.h
3+
// mobiletox
4+
//
5+
// Copyright 2011 U.S. Centers for Disease Control and Prevention
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
//
19+
20+
21+
#import <UIKit/UIKit.h>
22+
23+
24+
@interface AboutViewController : UIViewController {
25+
26+
}
27+
28+
@end

AboutViewController.m

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
//
2+
// AboutViewController.m
3+
// mobiletox
4+
//
5+
// Copyright 2011 U.S. Centers for Disease Control and Prevention
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
//
19+
20+
21+
#import "AboutViewController.h"
22+
23+
24+
@implementation AboutViewController
25+
26+
/*
27+
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
28+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
29+
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
30+
// Custom initialization
31+
}
32+
return self;
33+
}
34+
*/
35+
36+
/*
37+
// Implement loadView to create a view hierarchy programmatically, without using a nib.
38+
- (void)loadView {
39+
}
40+
*/
41+
42+
/*
43+
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
44+
- (void)viewDidLoad {
45+
[super viewDidLoad];
46+
}
47+
*/
48+
49+
/*
50+
// Override to allow orientations other than the default portrait orientation.
51+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
52+
// Return YES for supported orientations
53+
return (interfaceOrientation == UIInterfaceOrientationPortrait);
54+
}
55+
*/
56+
57+
- (void)didReceiveMemoryWarning {
58+
// Releases the view if it doesn't have a superview.
59+
[super didReceiveMemoryWarning];
60+
61+
// Release any cached data, images, etc that aren't in use.
62+
}
63+
64+
- (void)viewDidUnload {
65+
// Release any retained subviews of the main view.
66+
// e.g. self.myOutlet = nil;
67+
}
68+
69+
70+
- (void)dealloc {
71+
[super dealloc];
72+
}
73+
74+
75+
@end

Classes/AppManager.h

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// Copyright 2011 U.S. Centers for Disease Control and Prevention
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
#import <Foundation/Foundation.h>
18+
19+
//#define DEBUG
20+
#import "Debug.h"
21+
#import "DataController.h"
22+
23+
@interface AppManager : NSObject {
24+
NSString *appName;
25+
UIFont *tableFont;
26+
BOOL agreedWithEula;
27+
}
28+
29+
@property (nonatomic, retain) NSString *appName;
30+
@property (nonatomic, retain) UIFont *tableFont;
31+
@property BOOL agreedWithEula;
32+
33+
+ (id)singletonAppManager;
34+
-(BOOL)isDebugInfoEnabled;
35+
36+
@end

Classes/AppManager.m

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
//
2+
// Copyright 2011 U.S. Centers for Disease Control and Prevention
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
#import "AppManager.h"
18+
19+
static AppManager *sharedAppManager = nil;
20+
21+
@implementation AppManager
22+
23+
24+
@synthesize appName, tableFont, agreedWithEula;
25+
26+
27+
#pragma mark Singleton Methods
28+
+ (id)singletonAppManager {
29+
@synchronized(self) {
30+
if(sharedAppManager == nil)
31+
[[self alloc] init];
32+
}
33+
return sharedAppManager;
34+
}
35+
36+
+ (id)allocWithZone:(NSZone *)zone {
37+
@synchronized(self) {
38+
if(sharedAppManager == nil) {
39+
sharedAppManager = [super allocWithZone:zone];
40+
return sharedAppManager;
41+
}
42+
}
43+
return nil;
44+
}
45+
46+
- (id)copyWithZone:(NSZone *)zone {
47+
return self;
48+
}
49+
50+
- (id)retain {
51+
return self;
52+
}
53+
54+
- (unsigned)retainCount {
55+
return UINT_MAX; //denotes an object that cannot be released
56+
}
57+
58+
- (id)autorelease {
59+
return self;
60+
}
61+
62+
- (id)init {
63+
if ((self = [super init])) {
64+
appName = @"Tox Guide";
65+
agreedWithEula = FALSE;
66+
tableFont = [UIFont boldSystemFontOfSize: 16];
67+
}
68+
return self;
69+
}
70+
71+
- (void)dealloc {
72+
73+
// Should never be called, but just here for clarity really.
74+
[sharedAppManager release];
75+
[appName release];
76+
[super dealloc];
77+
78+
}
79+
80+
81+
-(BOOL)isDebugInfoEnabled
82+
{
83+
// Get user preference
84+
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
85+
BOOL enabled = [defaults boolForKey:@"enableDebugInfo"];
86+
return enabled;
87+
88+
}
89+
@end

Classes/DataController.h

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// File: DataController.h
3+
//
4+
//
5+
//
6+
// Copyright 2011 U.S. Centers for Disease Control and Prevention
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
22+
@class ToxDoc;
23+
24+
@interface DataController : NSObject {
25+
NSMutableArray *list;
26+
}
27+
28+
- (unsigned)countOfList;
29+
- (ToxDoc *)objectInListAtIndex:(unsigned)theIndex;
30+
31+
@end

0 commit comments

Comments
 (0)