This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.rbbas
53 lines (44 loc) · 1.82 KB
/
App.rbbas
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
#tag Class
Protected Class App
Inherits Application
#tag Event
Sub Close()
For i As Integer = SpecialFolder.Temporary.Child("A Thousand Words").Count DownTo 1
SpecialFolder.Temporary.Child("A Thousand Words").Item(i).Delete
Next
SpecialFolder.Temporary.Child("A Thousand Words").Delete
End Sub
#tag EndEvent
#tag Event
Sub Open()
UseGDIPlus = True
End Sub
#tag EndEvent
#tag Event
Function UnhandledException(error As RuntimeException) As Boolean
AutoQuit = True
errorHandler.Show
If error.Message.Trim = "" Then
error.Message = "An exception of type " + Introspection.GetType(error).FullName + " occurred." + EndOfLine + _
"Error number: " + Str(error.ErrorNumber) + EndOfLine + "Error message: " + error.Message + EndOfLine + EndOfLine + "Call stack:" '+ EndOfLine
End If
Dim theStack As String = Join(error.CleanStack, EndOfLine)
errorHandler.errorStack.Text = error.Message + EndOfLine + theStack
Return True
End Function
#tag EndEvent
#tag Constant, Name = kEditClear, Type = String, Dynamic = False, Default = \"&Delete", Scope = Public
#Tag Instance, Platform = Windows, Language = Default, Definition = \"&Delete"
#Tag Instance, Platform = Linux, Language = Default, Definition = \"&Delete"
#tag EndConstant
#tag Constant, Name = kFileQuit, Type = String, Dynamic = False, Default = \"&Quit", Scope = Public
#Tag Instance, Platform = Windows, Language = Default, Definition = \"E&xit"
#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