This repository has been archived by the owner on Aug 29, 2022. It is now read-only.
forked from Jonathan-LeRoux/IguanaTex
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathBatchEditForm.frm
189 lines (153 loc) · 5.6 KB
/
BatchEditForm.frm
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} BatchEditForm
Caption = "Batch edit"
ClientHeight = 5955
ClientLeft = 40
ClientTop = 380
ClientWidth = 4720
OleObjectBlob = "BatchEditForm.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "BatchEditForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RegPath As String
Dim LaTexEngineDisplayList As Variant
Private Sub UserForm_Initialize()
LoadSettings
Me.Top = Application.Top + 110
Me.Left = Application.Left + 25
End Sub
Private Sub LoadSettings()
RegPath = "Software\IguanaTex"
LaTexEngineDisplayList = Array("latex (DVI)", "pdflatex", "xelatex", "lualatex", "platex")
ComboBoxLaTexEngine.List = LaTexEngineDisplayList
ComboBoxLaTexEngine.ListIndex = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "LaTeXEngineID", 0)
TextBoxTempFolder.Text = GetTempPath()
'CheckBoxEMF.Value = CBool(GetRegistryValue(HKEY_CURRENT_USER, RegPath, "EMFoutput", False))
ComboBoxBitmapVector.List = Array("Bitmap", "Vector")
ComboBoxBitmapVector.ListIndex = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "BitmapVector", 0)
TextBoxLocalDPI.Text = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "OutputDpi", "1200")
textboxSize.Text = GetRegistryValue(HKEY_CURRENT_USER, RegPath, "PointSize", "20")
checkboxTransp.Value = CBool(GetRegistryValue(HKEY_CURRENT_USER, RegPath, "Transparent", True))
CheckBoxResetFormat.Value = False
CheckBoxModifyEngine.Value = False
CheckBoxModifyTempFolder.Value = False
CheckBoxModifyBitmapVector.Value = False
CheckBoxModifyLocalDPI.Value = False
CheckBoxModifySize.Value = False
CheckBoxModifyPreserveSize.Value = False
CheckBoxModifyTransparency.Value = False
CheckBoxModifyResetFormat.Value = False
CheckBoxReplace.Value = False
Apply_CheckBoxModifyEngine
Apply_CheckBoxModifyTempFolder
Apply_CheckBoxModifyBitmapVector
Apply_CheckBoxModifyLocalDPI
Apply_CheckBoxModifySize
Apply_CheckBoxModifyPreserveSize
Apply_CheckBoxModifyTransparency
Apply_CheckBoxModifyResetFormat
Apply_CheckBoxReplace
End Sub
Sub ButtonRun_Click()
BatchEditForm.Hide
Call RegenerateSelectedDisplays
Unload BatchEditForm
End Sub
Private Sub ButtonCancel_Click()
Unload BatchEditForm
End Sub
' Enable/Disable Modifications
Private Sub CheckBoxModifyEngine_Click()
Apply_CheckBoxModifyEngine
End Sub
Private Sub CheckBoxModifyTempFolder_Click()
Apply_CheckBoxModifyTempFolder
End Sub
Private Sub CheckBoxModifyBitmapVector_Click()
Apply_CheckBoxModifyBitmapVector
End Sub
Private Sub CheckBoxModifyLocalDPI_Click()
Apply_CheckBoxModifyLocalDPI
End Sub
Private Sub CheckBoxModifySize_Click()
Apply_CheckBoxModifySize
End Sub
Private Sub CheckBoxModifyPreserveSize_Click()
Apply_CheckBoxModifyPreserveSize
End Sub
Private Sub CheckBoxModifyTransparency_Click()
Apply_CheckBoxModifyTransparency
End Sub
Private Sub CheckBoxModifyResetFormat_Click()
Apply_CheckBoxModifyResetFormat
End Sub
Private Sub CheckBoxReplace_Click()
Apply_CheckBoxReplace
End Sub
Private Sub Apply_CheckBoxModifyEngine()
LabelEngine.Enabled = CheckBoxModifyEngine.Value
ComboBoxLaTexEngine.Enabled = CheckBoxModifyEngine.Value
End Sub
Private Sub Apply_CheckBoxModifyTempFolder()
LabelTempFolder.Enabled = CheckBoxModifyTempFolder.Value
TextBoxTempFolder.Enabled = CheckBoxModifyTempFolder.Value
End Sub
Private Sub Apply_CheckBoxModifyBitmapVector()
LabelOutput.Enabled = CheckBoxModifyBitmapVector.Value
ComboBoxBitmapVector.Enabled = CheckBoxModifyBitmapVector.Value
End Sub
Private Sub Apply_CheckBoxModifyLocalDPI()
LabelLocalDPI.Enabled = CheckBoxModifyLocalDPI.Value
TextBoxLocalDPI.Enabled = CheckBoxModifyLocalDPI.Value
LabelDPI.Enabled = CheckBoxModifyLocalDPI.Value
End Sub
Private Sub Apply_CheckBoxModifySize()
LabelSize.Enabled = CheckBoxModifySize.Value
textboxSize.Enabled = CheckBoxModifySize.Value
LabelPTS.Enabled = CheckBoxModifySize.Value
End Sub
Private Sub Apply_CheckBoxModifyPreserveSize()
CheckBoxForcePreserveSize.Enabled = CheckBoxModifyPreserveSize.Value
End Sub
Private Sub Apply_CheckBoxModifyTransparency()
checkboxTransp.Enabled = CheckBoxModifyTransparency.Value
End Sub
Private Sub Apply_CheckBoxModifyResetFormat()
CheckBoxResetFormat.Enabled = CheckBoxModifyResetFormat.Value
End Sub
Private Sub Apply_CheckBoxReplace()
LabelReplace.Enabled = CheckBoxReplace.Value
TextBoxFind.Enabled = CheckBoxReplace.Value
LabelWith.Enabled = CheckBoxReplace.Value
TextBoxReplacement.Enabled = CheckBoxReplace.Value
End Sub
Private Sub ComboBoxBitmapVector_Change()
Apply_BitmapVector_Change
End Sub
Private Sub Apply_BitmapVector_Change()
If ComboBoxBitmapVector.ListIndex = 1 Then
CheckBoxModifyLocalDPI.Value = False
CheckBoxModifyTransparency.Value = False
CheckBoxModifyLocalDPI.Enabled = False
CheckBoxModifyTransparency.Enabled = False
checkboxTransp.Value = True
Else
CheckBoxModifyLocalDPI.Enabled = True
CheckBoxModifyTransparency.Enabled = False
End If
Apply_CheckBoxModifyLocalDPI
Apply_CheckBoxModifyTransparency
End Sub
Private Sub CheckBoxForcePreserveSize_Click()
If CheckBoxForcePreserveSize.Value = True Then
CheckBoxModifySize.Enabled = False
CheckBoxModifySize.Value = False
Else
CheckBoxModifySize.Enabled = True
End If
Apply_CheckBoxModifySize
End Sub