-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.xojo_code
79 lines (53 loc) · 2.14 KB
/
App.xojo_code
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#tag Class
Protected Class App
Inherits Application
#tag Event
Sub Open()
'Call RegisterControls.Register("Name", "Serial")
//Initializing database
eventdb = new SQLiteDatabase
Dim f As new FolderItem
#If DebugBuild and TargetWin32
f = f.Parent
#endif
//Pointing to database file
f = f.Child("database1.rsd")
If f.Exists then
EventDB.DatabaseFile = f
else //File doesn't exist
eventdb.DatabaseFile = f
//Creating database file
Call eventdb.CreateDatabaseFile
If eventdb.Connect then
//Creating Events table
eventdb.SQLExecute("create table Events(ID integer, Start time, End time, Title text, Color text, Location text, Description text, Recurrence text)")
'eventdb.SQLExecute("create table Repeat(ID integer, freq_type integer, freq_interval integer, freq_sub_interval integer, freq_relative_interval integer)")
eventdb.Commit
else
MsgBox("db not created")
End If
End If
'Call CalendarView.Register(
End Sub
#tag EndEvent
#tag Event
Function UnhandledException(error As RuntimeException) As Boolean
MsgBox Join(error.Stack, EndOfLine)
Return True
End Function
#tag EndEvent
#tag Constant, Name = kEditClear, Type = String, Dynamic = False, Default = \"Effacer", Scope = Public
#Tag Instance, Platform = Windows, Language = Default, Definition = \"Effacer"
#Tag Instance, Platform = Linux, Language = Default, Definition = \"Effacer"
#tag EndConstant
#tag Constant, Name = kFileQuit, Type = String, Dynamic = False, Default = \"Quitter", Scope = Public
#Tag Instance, Platform = Windows, Language = Default, Definition = \"&Quitter"
#tag EndConstant
#tag Constant, Name = kFileQuitShortcut, Type = String, Dynamic = False, Default = \"", Scope = Public
#Tag Instance, Platform = Mac OS, Language = Default, Definition = \"Cmd+Q"
#Tag Instance, Platform = Linux, Language = Default, Definition = \"Ctrl+Q"
#tag EndConstant
#tag ViewBehavior
#tag EndViewBehavior
End Class
#tag EndClass