-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
152 lines (151 loc) · 5.84 KB
/
MainWindow.xaml
File metadata and controls
152 lines (151 loc) · 5.84 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
<Window
x:Class="XboxExplorerKiller.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:local="clr-namespace:XboxExplorerKiller"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="_this"
Title="Xbox Explorer Killer"
Width="340"
Height="380"
Icon="/icon.ico"
Loaded="Window_Loaded"
ResizeMode="CanMinimize"
StateChanged="Window_StateChanged"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="24px" />
<RowDefinition Height="1.4*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Row="2" Margin="8,0,8,8">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="0.5*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="8px" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Button
Grid.Row="1"
Height="24"
VerticalAlignment="Center"
Click="Stop_Button_Click"
Content="Stop"
IsEnabled="{Binding ElementName=_this, Path=KillerStatus, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" />
<Button
Grid.Row="1"
Grid.Column="2"
Height="24"
VerticalAlignment="Center"
Click="Start_Button_Click"
Content="Start"
IsEnabled="{Binding ElementName=_this, Path=KillerStatus, UpdateSourceTrigger=PropertyChanged, Mode=OneWay, Converter={StaticResource InverseBooleanConverter}}" />
<Label
x:Name="KillerStatusLabel"
Grid.ColumnSpan="3"
Width="296"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center">
<TextBlock>
<Run Text="Killer status:" />
<Run
FontWeight="Bold"
Foreground="Red"
Text="Stopped" />
</TextBlock>
</Label>
<Label
x:Name="ExplorerStatusLabel"
Grid.Row="2"
Grid.ColumnSpan="3"
Width="296"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Content="Explorer status: Running" />
<Button
Grid.Row="3"
Height="24"
VerticalAlignment="Center"
Click="Kill_Button_Click"
Content="Kill" />
<Button
Grid.Row="3"
Grid.Column="2"
Height="24"
VerticalAlignment="Center"
Click="Restart_Button_Click"
Content="Restart" />
<Label
Grid.Row="4"
Grid.ColumnSpan="3"
Width="196"
Height="21"
Margin="54,0,54,0"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Content="made by Maro"
FontSize="8" />
</Grid>
<Grid Grid.Row="1" Margin="8,8,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<ListBox
x:Name="ProcessListBox"
d:ItemsSource="{d:SampleData ItemCount=5}"
SelectionChanged="ProcessListBox_SelectionChanged" />
<StackPanel Grid.Column="1" Margin="8,0,0,0">
<Button
x:Name="AddProcessButton"
Height="24"
Click="Add_Button_Click"
Content="Add" />
<Button
x:Name="EditProcessButton"
Height="24"
Margin="0,8,0,0"
Click="Edit_Button_Click"
Content="Edit" />
<Button
x:Name="RemoveProcessButton"
Height="24"
Margin="0,8,0,0"
Click="Remove_Button_Click"
Content="Remove" />
<Label
x:Name="DelayLabel"
Margin="-5,4,0,-2"
Content="Delay (sec.)"
ToolTip="If the process is found, explorer will be closed not immediately, but after the specified delay in seconds" />
<TextBox x:Name="ProcessDelayTextBox" Text="{Binding ElementName=ProcessListBox, Path=SelectedItem.Delay}" />
</StackPanel>
</Grid>
<Canvas Grid.Row="0" Margin="8,0,8,0">
<Label x:Name="DateTimeLabel" Content="13.11.2023 Time: 10:26" />
<CheckBox
x:Name="MinimizeToTrayCheckBox"
Canvas.Top="6"
Canvas.Right="0">
Minimize to tray
</CheckBox>
</Canvas>
</Grid>
</Window>