-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.pbf
54 lines (44 loc) · 1.92 KB
/
MainWindow.pbf
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
;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;
Global Window_Main
Global String_Input, String_Output, String_Passphrase, Text_Passphrase, Text_Rounds, Combo_Rounds, Button_Encrypt, Button_Decrypt
Enumeration FormMenu
#PB_Menu_About
1
EndEnumeration
Enumeration FormFont
#Font_Window_Main_0
EndEnumeration
LoadFont(#Font_Window_Main_0,"Menlo", 12)
Procedure OpenWindow_Main(x = 0, y = 0, width = 554, height = 610)
Window_Main = OpenWindow(#PB_Any, x, y, width, height, "Ciphersaber", #PB_Window_SystemMenu)
AddKeyboardShortcut(Window_Main, #PB_Shortcut_Command | #PB_Shortcut_W, 1)
CreateMenu(0, WindowID(Window_Main))
MenuTitle("About Ciphersaber")
MenuTitle("File")
MenuItem(1, "Close Window" + Chr(9) + "Cmd+W")
MenuTitle("Edit")
String_Input = EditorGadget(#PB_Any, 20, 20, 514, 250)
String_Output = EditorGadget(#PB_Any, 20, 340, 514, 250, #PB_Editor_ReadOnly)
SetGadgetFont(String_Output, FontID(#Font_Window_Main_0))
String_Passphrase = StringGadget(#PB_Any, 109, 276, 425, 22, "")
Text_Passphrase = TextGadget(#PB_Any, 23, 278, 77, 17, "Passphrase:", #PB_Text_Right)
Text_Rounds = TextGadget(#PB_Any, 40, 311, 56, 17, "Rounds:", #PB_Text_Right)
Combo_Rounds = ComboBoxGadget(#PB_Any, 109, 306, 58, 26, #PB_ComboBox_Editable)
AddGadgetItem(Combo_Rounds, -1, "1000")
AddGadgetItem(Combo_Rounds, -1, "100")
AddGadgetItem(Combo_Rounds, -1, "20")
AddGadgetItem(Combo_Rounds, -1, "10")
AddGadgetItem(Combo_Rounds, -1, "1")
Button_Encrypt = ButtonGadget(#PB_Any, 372, 305, 81, 32, "Encrypt")
Button_Decrypt = ButtonGadget(#PB_Any, 457, 305, 81, 32, "Decrypt")
EndProcedure
; IDE Options = PureBasic 5.42 LTS (MacOS X - x64)
; CursorPosition = 47
; FirstLine = 1
; Folding = -
; EnableUnicode
; EnableXP