Repository navigation
Expand file tree
/
Copy pathWFSWindow.rbfrm
More file actions
202 lines (187 loc) · 5.12 KB
/
Copy pathWFSWindow.rbfrm
File metadata and controls
202 lines (187 loc) · 5.12 KB
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#tag Window
Begin Window WFSWindow
BackColor = 16777215
Backdrop = ""
CloseButton = True
Composite = False
Frame = 0
FullScreen = False
HasBackColor = False
Height = 3.0e+2
ImplicitInstance= True
LiveResize = True
MacProcID = 0
MaxHeight = 32000
MaximizeButton = False
MaxWidth = 32000
MenuBar = 858513407
MenuBarVisible = True
MinHeight = 64
MinimizeButton = True
MinWidth = 64
Placement = 0
Resizeable = False
Title = "WFS"
Visible = True
Width = 4.67e+2
Begin Label lblDate
AutoDeactivate = True
Bold = ""
DataField = ""
DataSource = ""
Enabled = True
Height = 30
HelpTag = ""
Index = -2147483648
InitialParent = ""
Italic = ""
Left = 238
LockBottom = ""
LockedInPosition= False
LockLeft = True
LockRight = ""
LockTop = True
Multiline = ""
Scope = 0
Selectable = False
TabIndex = 0
TabPanelIndex = 0
Text = "Untitled"
TextAlign = 0
TextColor = &h000000
TextFont = "System"
TextSize = 0
TextUnit = 0
Top = 10
Transparent = False
Underline = ""
Visible = True
Width = 176
End
Begin Label lblTime
AutoDeactivate = True
Bold = ""
DataField = ""
DataSource = ""
Enabled = True
Height = 30
HelpTag = ""
Index = -2147483648
InitialParent = ""
Italic = ""
Left = 238
LockBottom = ""
LockedInPosition= False
LockLeft = True
LockRight = ""
LockTop = True
Multiline = ""
Scope = 0
Selectable = False
TabIndex = 1
TabPanelIndex = 0
Text = "Untitled"
TextAlign = 0
TextColor = &h000000
TextFont = "System"
TextSize = 0
TextUnit = 0
Top = 50
Transparent = False
Underline = ""
Visible = True
Width = 176
End
Begin Timer tmrUpdateUI
Height = 32
Index = -2147483648
Left = 568
LockedInPosition= False
Mode = 2
Period = 500
Scope = 0
TabPanelIndex = 0
Top = 13
Width = 32
End
Begin PushButton btnSetSystemTime
AutoDeactivate = True
Bold = ""
ButtonStyle = 0
Cancel = ""
Caption = "SetSystemTime"
Default = ""
Enabled = True
Height = 25
HelpTag = ""
Index = -2147483648
InitialParent = ""
Italic = ""
Left = 20
LockBottom = ""
LockedInPosition= False
LockLeft = True
LockRight = ""
LockTop = True
Scope = 0
TabIndex = 2
TabPanelIndex = 0
TabStop = True
TextFont = "System"
TextSize = 0
TextUnit = 0
Top = 92
Underline = ""
Visible = True
Width = 176
End
End
#tag EndWindow
#tag WindowCode
#tag Event
Sub Open()
DatePicker = new DateTimePickerWFS
DatePicker.Create( self, 20, 10, 150, 30, true )
TimePicker = new DateTimePickerWFS
TimePicker.Create( self, 20, 50, 150, 30, false )
UpdateDateTimeLabels()
End Sub
#tag EndEvent
#tag Method, Flags = &h0
Sub UpdateDateTimeLabels()
dim d as date = DatePicker.GetDateTime
dim t as date = TimePicker.GetDateTime
lblDate.Text = d.SQLDateTime
lblTime.Text = t.SQLDateTime
End Sub
#tag EndMethod
#tag Property, Flags = &h0
DatePicker As DateTimePickerWFS
#tag EndProperty
#tag Property, Flags = &h0
TimePicker As DateTimePickerWFS
#tag EndProperty
#tag EndWindowCode
#tag Events tmrUpdateUI
#tag Event
Sub Action()
UpdateDateTimeLabels
End Sub
#tag EndEvent
#tag EndEvents
#tag Events btnSetSystemTime
#tag Event
Sub Action()
dim d as date = DatePicker.GetDateTime
dim t as date = TimePicker.GetDateTime
d.Hour = t.Hour
d.Minute = t.Minute
d.Second = t.Second
if SystemInformationWFS.SetSystemTime( d ) then
MsgBox "SetSystemTime succeeded."
else
MsgBox "SetSystemTime FAILED!"
end if
End Sub
#tag EndEvent
#tag EndEvents