forked from koush/sqlite-net
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain.cs
46 lines (36 loc) · 1005 Bytes
/
Main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Path = System.IO.Path;
using SQLite;
namespace Stocks.Touch
{
public class Application
{
static void Main (string[] args)
{
UIApplication.Main (args);
}
}
public partial class AppDelegate : UIApplicationDelegate
{
Database _db;
UINavigationController _navigationController;
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
_db = new Database (Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments), "stocks.db"));
_db.Trace = true;
var stocksView = new StocksView (_db);
_navigationController = new UINavigationController (stocksView);
window.AddSubview (_navigationController.View);
window.MakeKeyAndVisible ();
return true;
}
// This method is required in iPhoneOS 3.0
public override void OnActivated (UIApplication application)
{
}
}
}