OSDN Git Service

Added alert message function.
[dennco/dennco.git] / dennco / AppDelegate.mm
1 //
2 //  AppDelegate.m
3 //  dennco
4 //
5 //  Created by tkawata on 12/26/11.
6 //  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
7 //
8
9 #include "TKJSContainer.h"
10 #include "DNContainerBuilder.h"
11 #include "DNDirectory.h"
12 #include "DNFileList.h"
13 #include "TKLog.h"
14 #include "DNAlert.h"
15
16 #import "AppDelegate.h"
17
18 @implementation AppDelegate
19
20 @synthesize window = _window;
21
22
23 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
24 {
25     console = new TKConsole();
26     TKLog::setDestination(console);
27
28     // Insert code here to initialize your application
29     NSURL *path = [[NSURL alloc]initWithString:NSHomeDirectory()];
30     [uiPathControl setURL:path];
31 }
32
33 -(IBAction)pathChanged:(id)sender
34 {
35     NSURL *newURL = [uiPathControl URL];
36 }
37
38 -(IBAction)doInit:(id)sender
39 {
40     engine = new DNEngine([[[uiPathControl URL]path] UTF8String]);
41 }
42
43 -(IBAction)doStart:(id)sender
44 {
45     if (engine && engine->isValid())
46     {
47         engine->setTickIntervalSec(1.0);
48         engine->startHTTPServer(9080);
49     }
50 }
51
52 -(IBAction)doStop:(id)sender
53 {
54     
55 }
56
57
58 @end