-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsAbout.xaml.cs
More file actions
279 lines (264 loc) · 7.61 KB
/
SettingsAbout.xaml.cs
File metadata and controls
279 lines (264 loc) · 7.61 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
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
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using MakuTweakerNew.Properties;
using MicaWPF.Controls;
using MicaWPF.Core.Enums;
using MicaWPF.Core.Services;
using Microsoft.Win32;
using ModernWpf;
namespace MakuTweakerNew
{
// Token: 0x02000012 RID: 18
public partial class SettingsAbout : Page
{
// Token: 0x060000D5 RID: 213 RVA: 0x0000DB3C File Offset: 0x0000BD3C
public SettingsAbout()
{
this.InitializeComponent();
this.credN.Text = "Mark Adderly\nNikitori\nNikitori, Massgrave";
this.lang.SelectedIndex = Settings.Default.langSI;
this.relang();
bool flag = this.checkWinVer() < 22000;
if (flag)
{
this.style.Visibility = Visibility.Collapsed;
this.styleL.Visibility = Visibility.Collapsed;
}
WindowsTheme currentTheme = MicaWPFServiceUtility.ThemeService.CurrentTheme;
this.theme.SelectedIndex = ((currentTheme == WindowsTheme.Dark) ? 1 : 0);
string text = Settings.Default.style;
string a = text;
if (!(a == "Mica"))
{
if (!(a == "Tabbed"))
{
if (!(a == "Acrylic"))
{
if (a == "None")
{
this.style.SelectedIndex = 3;
}
}
else
{
this.style.SelectedIndex = 2;
}
}
else
{
this.style.SelectedIndex = 1;
}
}
else
{
this.style.SelectedIndex = 0;
}
this.isLoaded = true;
}
// Token: 0x060000D6 RID: 214 RVA: 0x0000DC7C File Offset: 0x0000BE7C
private int checkWinVer()
{
string name = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
string name2 = "CurrentBuild";
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(name))
{
bool flag = registryKey != null;
if (flag)
{
object value = registryKey.GetValue(name2);
int result;
bool flag2 = value != null && int.TryParse(value.ToString(), out result);
if (flag2)
{
return result;
}
}
}
return 19045;
}
// Token: 0x060000D7 RID: 215 RVA: 0x0000DD04 File Offset: 0x0000BF04
[NullableContext(1)]
private void Button_Click(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo("https://adderly.top")
{
UseShellExecute = true
});
}
// Token: 0x060000D8 RID: 216 RVA: 0x0000DD1F File Offset: 0x0000BF1F
[NullableContext(1)]
private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
Process.Start(new ProcessStartInfo("https://boosty.to/adderly")
{
UseShellExecute = true
});
}
// Token: 0x060000D9 RID: 217 RVA: 0x0000DD3A File Offset: 0x0000BF3A
[NullableContext(1)]
private void Image_MouseLeftButtonUp_2(object sender, MouseButtonEventArgs e)
{
Process.Start(new ProcessStartInfo("https://t.me/adderly324")
{
UseShellExecute = true
});
}
// Token: 0x060000DA RID: 218 RVA: 0x0000DD55 File Offset: 0x0000BF55
[NullableContext(1)]
private void Image_MouseLeftButtonUp_3(object sender, MouseButtonEventArgs e)
{
Process.Start(new ProcessStartInfo("https://youtube.com/@MakuAdarii")
{
UseShellExecute = true
});
}
// Token: 0x060000DB RID: 219 RVA: 0x0000DD70 File Offset: 0x0000BF70
[NullableContext(1)]
private void theme_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
bool flag = this.isLoaded;
if (flag)
{
int selectedIndex = this.theme.SelectedIndex;
int num = selectedIndex;
if (num != 0)
{
if (num == 1)
{
Settings.Default.theme = "Dark";
MicaWPFServiceUtility.ThemeService.ChangeTheme(WindowsTheme.Dark);
ThemeManager.Current.ApplicationTheme = new ApplicationTheme?(ApplicationTheme.Dark);
this.mw.Foreground = Brushes.White;
this.mw.Separator.Stroke = Brushes.White;
}
}
else
{
Settings.Default.theme = "Light";
MicaWPFServiceUtility.ThemeService.ChangeTheme(WindowsTheme.Light);
ThemeManager.Current.ApplicationTheme = new ApplicationTheme?(ApplicationTheme.Light);
this.mw.Foreground = Brushes.Black;
this.mw.Separator.Stroke = Brushes.Black;
}
Settings.Default.Save();
}
}
// Token: 0x060000DC RID: 220 RVA: 0x0000DE60 File Offset: 0x0000C060
[NullableContext(1)]
private void lang_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
bool flag = this.isLoaded;
if (flag)
{
switch (this.lang.SelectedIndex)
{
case 0:
Settings.Default.lang = "en";
break;
case 1:
Settings.Default.lang = "ru";
break;
case 2:
Settings.Default.lang = "ua";
break;
case 3:
Settings.Default.lang = "es";
break;
case 4:
Settings.Default.lang = "pt";
break;
case 5:
Settings.Default.lang = "de";
break;
case 6:
Settings.Default.lang = "kz";
break;
case 7:
Settings.Default.lang = "jp";
break;
case 8:
Settings.Default.lang = "cn";
break;
case 9:
Settings.Default.lang = "hi";
break;
}
Settings.Default.langSI = this.lang.SelectedIndex;
this.mw.LoadLang(Settings.Default.lang);
this.relang();
}
}
// Token: 0x060000DD RID: 221 RVA: 0x0000DFAC File Offset: 0x0000C1AC
private void relang()
{
string language = Settings.Default.lang ?? "en";
Dictionary<string, Dictionary<string, string>> dictionary = MainWindow.Localization.LoadLocalization(language, "ab");
Dictionary<string, Dictionary<string, string>> dictionary2 = MainWindow.Localization.LoadLocalization(language, "base");
this.credL.Text = dictionary["main"]["credL"];
this.label.Text = dictionary["main"]["label"];
this.web.Content = dictionary["main"]["atop"];
this.langL.Text = dictionary["main"]["lang"];
this.styleL.Text = dictionary["main"]["st"];
this.l.Content = " " + dictionary["main"]["l"];
this.d.Content = " " + dictionary["main"]["d"];
this.themeL.Text = dictionary["main"]["th"];
this.off.Content = " " + dictionary2["def"]["off"];
Assembly executingAssembly = Assembly.GetExecutingAssembly();
}
// Token: 0x060000DE RID: 222 RVA: 0x0000E134 File Offset: 0x0000C334
[NullableContext(1)]
private void Image_MouseLeftButtonUp_1(object sender, MouseButtonEventArgs e)
{
}
// Token: 0x060000DF RID: 223 RVA: 0x0000E137 File Offset: 0x0000C337
[NullableContext(1)]
private void Image_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
{
}
// Token: 0x060000E0 RID: 224 RVA: 0x0000E13C File Offset: 0x0000C33C
[NullableContext(1)]
private void style_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
bool flag = this.isLoaded;
if (flag)
{
switch (this.style.SelectedIndex)
{
case 0:
MicaWPFServiceUtility.ThemeService.EnableBackdrop(this.mw, BackdropType.Mica);
Settings.Default.style = "Mica";
break;
case 1:
MicaWPFServiceUtility.ThemeService.EnableBackdrop(this.mw, BackdropType.Tabbed);
Settings.Default.style = "Tabbed";
break;
case 2:
MicaWPFServiceUtility.ThemeService.EnableBackdrop(this.mw, BackdropType.Acrylic);
Settings.Default.style = "Acrylic";
break;
case 3:
MicaWPFServiceUtility.ThemeService.EnableBackdrop(this.mw, BackdropType.None);
Settings.Default.style = "None";
break;
}
}
}
// Token: 0x0400010F RID: 271
[Nullable(1)]
private MainWindow mw = (MainWindow)Application.Current.MainWindow;
// Token: 0x04000110 RID: 272
private bool isLoaded = false;
// Token: 0x04000111 RID: 273
private bool isDevBuild = true;
}
}