-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUtils.vb
30 lines (30 loc) · 1.43 KB
/
Utils.vb
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
Imports System.IO
Imports System.Reflection
Imports TaleWorlds.Core
Namespace Global.VBWebsocketServer
Module Utils
Public Sub MessageBox(title As String, input As String,
Optional callbackOk As Action = Nothing, Optional buttonOk As String = "")
If (buttonOk = "") Then buttonOk = "Accept"
If (callbackOk Is Nothing) Then callbackOk = Sub()
End Sub
InformationManager.ShowInquiry(New InquiryData(title, input, True, False, buttonOk, "",
callbackOk,
Sub()
End Sub))
End Sub
Public Sub MessageBox(title As String, input As String, callbackOk As Action, callbackCancel As Action,
Optional buttonOk As String = "", Optional buttonCancel As String = "")
If (buttonOk = "") Then buttonOk = "Accept"
If (buttonCancel = "") Then buttonOk = "Cancel"
InformationManager.ShowInquiry(New InquiryData(title, input, True, False, buttonOk, buttonCancel,
callbackOk, callbackCancel))
End Sub
Public Function GetMyLocation() As String
Return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
End Function
Public Sub Print(title As String)
InformationManager.DisplayMessage(New InformationMessage(title))
End Sub
End Module
End Namespace