-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.axaml
124 lines (106 loc) · 4.89 KB
/
MainWindow.axaml
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
<Window xmlns="https://github.com/avaloniaui"
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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AndroidDebloater.MainWindow"
xmlns:components="clr-namespace:AndroidDebloater.Components"
Title="AndroidDebloater"
Width="800" Height="450">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!--Left Column-->
<Grid Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="See Connected Devices"/>
<Button Click="ListDevices" Grid.Row="1" Grid.Column="0" Content="List ADB Devices"/>
<RadioButton x:Name="sSelector" Click="ShowScripts" Grid.Row="2" IsChecked="True" Grid.Column="0" Content="Use Scripts"/>
<RadioButton x:Name="cSelector" Click="ShowCustomSelector" Grid.Row="2" Grid.Column="1" Content="Custom Select"/>
</Grid>
<StackPanel x:Name="ScriptPanel" Grid.Column="0" Grid.Row="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Margin="0 20 0 0" Content="Select your Debloat Package"/>
<RadioButton Click="DisableSelector" x:Name="gDebloat" IsChecked="True" Grid.Row="1" Grid.Column="0" Content="Google Bloatware"/>
<RadioButton Click="DisableSelector" x:Name="aDebloat" Grid.Row="1" Grid.Column="1" Content="Android System Bloat"/>
<RadioButton Click="DisableSelector" x:Name="tpDebloat" Grid.Row="2" Grid.Column="0" Content="Third-Party Bloat"/>
<Label Grid.Row="3" Grid.Column="0" Margin="0 20 0 0" Content="Manufacturer Debloat"/>
<RadioButton Click="EnableSelector" x:Name="mDebloat" Grid.Row="4" Grid.Column="0" Content="Manufacturer Specific"/>
<ComboBox x:Name="mSelector" Grid.Row="4" Grid.Column="1">
<ComboBoxItem Content="Google" IsSelected="True"/>
<ComboBoxItem Content="Huawei"/>
<ComboBoxItem Content="OnePlus"/>
<ComboBoxItem Content="Oppo"/>
<ComboBoxItem Content="Realme"/>
<ComboBoxItem Content="Samsung"/>
<ComboBoxItem Content="Vivo"/>
<ComboBoxItem Content="Xiaomi"/>
</ComboBox>
<Button x:Name="DebloatBtn" Click="StartDebloater" Grid.Row="5" Grid.Column="0" VerticalAlignment="Bottom" Content="Start Debloat"/>
<Button Click="ShowHelp" Grid.Row="5" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Content="Help"/>
</Grid>
</StackPanel>
<StackPanel x:Name="CustomPanel" Grid.Row="1" IsVisible="false">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Row="0" Grid.ColumnSpan="2" MaxHeight="300" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" Margin="0 10 0 10">
<ItemsControl Name="PackageList">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type components:AndroidPackage}">
<CheckBox Content="{Binding Text}"
IsChecked="{Binding IsChecked}"
Margin="0,5,0,0"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<Button x:Name="CDebloatBtn" Click="RemoveSelected" Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" Content="Start Debloat"/>
<Button Click="ShowHelp" Grid.Row="1" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Content="Help"/>
</Grid>
</StackPanel>
<!--Right Column-->
<Border Grid.Column="1" BorderThickness="1" BorderBrush="Black" Grid.RowSpan="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Commandline Output"/>
<TextBox x:Name="clOutput" Grid.Row="1" Background="Black" Foreground="White" IsReadOnly="True" Text="" TextWrapping="Wrap"/>
</Grid>
</Border>
</Grid>
</Window>