forked from Half1900/AlphaClicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
370 lines (316 loc) · 14.1 KB
/
MainWindow.xaml
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<Window x:Name="mainWindow" x:Class="AlphaClicker.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:AlphaClicker"
mc:Ignorable="d"
ResizeMode="CanMinimize"
WindowStyle="None"
Title="鼠标电击器"
Height="430" Width="460"
Background="{x:Null}"
AllowsTransparency="True"
MouseLeftButtonDown="Window_MouseLeftButtonDown"
Loaded="mainWindow_Loaded"
Closing="mainWindow_Closing"
Topmost="True">
<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="00:00:00.5" Storyboard.TargetProperty="Opacity" From="0" To="1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Border Margin="10"
CornerRadius="15"
Background="{DynamicResource WindowBackgroundColor}"
BorderBrush="Gray"
BorderThickness="0.3">
<Border.Effect>
<DropShadowEffect BlurRadius="15" Direction="-90"
RenderingBias="Quality" ShadowDepth="2"/>
</Border.Effect>
<Grid HorizontalAlignment="Stretch" Height="Auto" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Label Content="鼠标点击器 By Forty"
FontSize="15"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,0,0"/>
<!-- X button -->
<Ellipse x:Name="closeButton"
Fill="#e00bc4"
Cursor="Hand"
Style="{StaticResource GrowOnHover}"
Height="20" Width="20"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="395,0,0,0"
MouseLeftButtonDown="closeButton_MouseLeftButtonDown">
<Ellipse.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0" />
</Ellipse.RenderTransform>
</Ellipse>
<!-- Minimize button -->
<Ellipse x:Name="minimizeButton"
Fill="#FFBD33"
Cursor="Hand"
Style="{StaticResource GrowOnHover}"
Height="20" Width="20"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="371,0,0,0"
MouseLeftButtonDown="minimizeButton_MouseLeftButtonDown">
<Ellipse.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0" />
</Ellipse.RenderTransform>
</Ellipse>
<Grid Grid.Row="1" HorizontalAlignment="Stretch" Height="Auto" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="130"></RowDefinition>
</Grid.RowDefinitions>
<!-- 0 -->
<RadioButton x:Name="clickIntervalMode"
Content=""
Grid.Row="0"
VerticalAlignment="Top"
Cursor="Hand"
FontSize="13"
IsChecked="true"
GroupName="clickInterval"
Margin="22,17,394,0"/>
<TextBox x:Name="hoursBox" Text="0"
Width="50"
Margin="47,0,342,59" VerticalAlignment="Bottom"/>
<Label Content="时"
FontSize="13"
HorizontalAlignment="Right"
Margin="0,0,310,59" Height="29" VerticalAlignment="Bottom"/>
<TextBox x:Name="minsBox" Text="0"
Width="50"
Margin="138,0,251,59" VerticalAlignment="Bottom"/>
<Label Content="分"
FontSize="13"
HorizontalAlignment="Left"
Margin="199,11,0,0" Height="29" VerticalAlignment="Top"/>
<TextBox x:Name="secondsBox" Text="0"
Width="50"
Margin="234,0,155,59" VerticalAlignment="Bottom"/>
<Label Content="秒"
FontSize="13"
HorizontalAlignment="Right"
Margin="0,0,124,59" Height="29" VerticalAlignment="Bottom"/>
<TextBox x:Name="millisecsBox" Text="100"
Width="50"
Margin="325,0,64,59" AutomationProperties.IsRequiredForForm="True" Height="30" VerticalAlignment="Bottom"/>
<Label Content="毫秒"
FontSize="13"
HorizontalAlignment="Right"
Margin="0,0,19,59" Height="27" VerticalAlignment="Bottom"/>
<RadioButton x:Name="randomIntervalMode"
Content=" 随机点击间隔范围"
Grid.Row="0"
VerticalAlignment="Top"
Cursor="Hand"
FontSize="13"
GroupName="clickInterval"
Margin="22,59,274,0"/>
<TextBox x:Name="randomSecs1Box"
Text="0.1"
Width="50"
Margin="165,52,224,0"
MaxLength="0"
VerticalAlignment="Top"/>
<Label Content="秒"
FontSize="13"
HorizontalAlignment="Right"
Margin="0,54,178,0" Height="27" VerticalAlignment="Top"/>
<Label Content="~"
FontSize="13"
HorizontalAlignment="Right"
Margin="0,54,141,0" Height="27" VerticalAlignment="Top"/>
<TextBox x:Name="randomSecs2Box"
Text="0.2"
Width="50"
Margin="325,52,64,0"
MaxLength="0"
VerticalAlignment="Top"/>
<Label Content="秒"
FontSize="13"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Margin="0,54,19,0"/>
<!-- 1 -->
<Label Content="点击鼠标"
VerticalAlignment="Top"
Grid.Row="1"
Margin="0,4,331,0"
FontSize="15" HorizontalAlignment="Right" Width="93"/>
<ComboBox x:Name="mouseBtnCBOX"
SelectedIndex="0"
FontSize="13"
Style="{DynamicResource theComboBox}"
Padding="15,5,15,5"
HorizontalContentAlignment="Left"
VerticalAlignment="Top"
Grid.Row="1"
ItemContainerStyle="{DynamicResource theComboBoxItem}" Margin="115,2,224,0">
<ComboBoxItem>左键</ComboBoxItem>
<ComboBoxItem>右键</ComboBoxItem>
<ComboBoxItem>中键</ComboBoxItem>
</ComboBox>
<Label Content="点击类型"
VerticalAlignment="Top"
Grid.Row="1"
Margin="0,43,331,0"
FontSize="15" HorizontalAlignment="Right" Width="93"/>
<ComboBox x:Name="clickTypeCBOX"
SelectedIndex="0"
FontSize="13"
Style="{DynamicResource theComboBox}"
Padding="15,5,15,5"
HorizontalContentAlignment="Left"
VerticalAlignment="Top"
Grid.Row="1"
ItemContainerStyle="{DynamicResource theComboBoxItem}" Margin="115,41,224,0">
<ComboBoxItem>单击</ComboBoxItem>
<ComboBoxItem>双击</ComboBoxItem>
</ComboBox>
<RadioButton x:Name="repeatTimesRBtn" Content=" 重复"
Grid.Row="1"
VerticalAlignment="Top"
Margin="226,9,158,0"
FontSize="13"
Cursor="Hand"
IsChecked="true"
GroupName="Repeat"/>
<Label Content="次"
FontSize="13"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Grid.Row="1"
Margin="0,3,19,0"/>
<TextBox x:Name="repeatTimesBox" Text="30"
Margin="315,2,64,48"
Grid.Row="1"
MaxLength="0"/>
<RadioButton x:Name="repeatForeverRBtn" Content=" 永久"
Grid.Row="1"
VerticalAlignment="Top"
Margin="226,48,153,0"
FontSize="13"
Cursor="Hand"
GroupName="Repeat"/>
<CheckBox
x:Name="BGModel"
Margin="314,45,25,10" Grid.Row="1"
Cursor="Hand"
Content="后台模式"
IsChecked="True"
/>
<!-- 2 -->
<RadioButton x:Name="currentLocationCBtn" Content=" 跟随光标位置"
GroupName="Location"
Cursor="Hand"
Grid.Row="2"
VerticalAlignment="Center"
Margin="22,0,309,0"
IsChecked="True"
FontSize="13"/>
<RadioButton x:Name="coordsCBtn" Content=""
GroupName="Location"
Grid.Row="2"
Cursor="Hand"
VerticalAlignment="Center"
Margin="143,0,275,0"
FontSize="13"/>
<Button x:Name="getCoordsBtn"
Content="点我获取坐标"
HorizontalAlignment="Left"
Grid.Row="2"
Cursor="Hand"
VerticalAlignment="Center"
Height="30" Width="85"
Background="#339999"
Foreground="#fff"
FontWeight="Bold"
Click="getCoordsBtn_Click" Margin="167,0,0,0"/>
<Label Content="X :"
FontSize="15"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Grid.Row="2"
Margin="262,0,0,0"/>
<TextBox x:Name="xBox" Text="0"
Width="50"
Margin="288,0,101,0"
Grid.Row="2" VerticalAlignment="Center"/>
<Label Content="Y :"
FontSize="15"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Grid.Row="2" Margin="0,0,72,0"/>
<TextBox x:Name="yBox" Text="0"
Width="50"
Margin="365,0,24,0"
Grid.Row="2"
VerticalAlignment="Center"/>
<!-- 3 -->
<Button x:Name="startBtn"
Content="开始 (ESC)"
Foreground="White"
HorizontalAlignment="Left"
Grid.Row="3"
Cursor="Hand"
VerticalAlignment="Top"
Height="50" Width="193"
Background="#1494e3"
Margin="22,10,0,0"
Click="startBtn_Click"/>
<Button x:Name="stopBtn"
Content="停止 (ESC)"
Foreground="White"
HorizontalAlignment="Left"
Grid.Row="3"
Cursor="Hand"
VerticalAlignment="Top"
Height="50" Width="190"
Background="#c43c35"
Margin="225,10,0,0"
Click="stopBtn_Click"
IsEnabled="False"/>
<Button x:Name="changeHotkeyBtn"
Content="更改快捷键"
Foreground="{DynamicResource WindowTextColor2}"
Background="#fe9719"
Cursor="Hand"
HorizontalAlignment="Left"
Grid.Row="3"
VerticalAlignment="Top"
Height="50" Width="193"
Margin="22,70,0,0"
Click="changeHotkeyBtn_Click"/>
<Button x:Name="windowSettingsBtn"
Content="其他设置"
Foreground="{DynamicResource WindowTextColor2}"
Background="#47a247"
Cursor="Hand"
HorizontalAlignment="Left"
Grid.Row="3"
VerticalAlignment="Top"
Height="50" Width="190"
Margin="225,70,0,0"
Click="windowSettingsBtn_Click"/>
</Grid>
</Grid>
</Border>
</Window>