Files
2026-08-27 11:23:13 -06:00

132 lines
3.7 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Raton.Windows.About
// Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7
// Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe
using DarkModeForms;
using Microsoft.Win32;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Interop;
using System.Windows.Markup;
#nullable disable
namespace Raton.Windows;
public partial class About : Window
{
private const int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
[DllImport("dwmapi.dll", CharSet = CharSet.Auto)]
private static extern int DwmSetWindowAttribute(
IntPtr hwnd,
int attr,
ref int attrValue,
int attrSize);
public About()
{
this.InitializeComponent();
this.Loaded += new RoutedEventHandler(this.About_Loaded);
}
private void About_Loaded(object sender, RoutedEventArgs e)
{
this.LoadChangelog();
this.ApplyDarkMode();
this.TxtChangelog.ScrollToHome();
}
private void ApplyDarkMode()
{
bool flag = this.IsWindowsDarkMode();
IntPtr handle = new WindowInteropHelper((Window) this).Handle;
int attrValue = flag ? 1 : 0;
About.DwmSetWindowAttribute(handle, 20, ref attrValue, Marshal.SizeOf(typeof (int)));
}
private bool IsWindowsDarkMode()
{
using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"))
{
if (registryKey != null)
{
if (registryKey.GetValue("AppsUseLightTheme") is int num)
return num == 0;
}
}
return false;
}
private void LoadChangelog()
{
try
{
this.TxtChangelog.Text = Raton.Properties.Resources.changelog;
}
catch (Exception ex)
{
this.TxtChangelog.Text = "[Error loading changelog]\n" + ex.Message;
}
}
private void BtnCommunity_Click(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo("https://t.me/ratonaccesstool")
{
UseShellExecute = true
});
}
private void BtnGithub_Click(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo("https://github.com/sillycs")
{
UseShellExecute = true
});
}
private async void BtnBitcoin_Click(object sender, RoutedEventArgs e)
{
System.Windows.Controls.Button btn = sender as System.Windows.Controls.Button;
try
{
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.UserAgent.ParseAdd("Raton");
string[] strArray = (await client.GetStringAsync("https://raw.githubusercontent.com/FuckingSilly/RatonUpdateChecker/refs/heads/main/version")).Trim().Split(new char[4]
{
' ',
'\n',
'\r',
'\t'
}, StringSplitOptions.RemoveEmptyEntries);
if (strArray.Length >= 3)
{
System.Windows.Clipboard.SetText(strArray[2]);
if (btn != null)
btn.Content = (object) "Copied!";
}
else if (btn != null)
btn.Content = (object) "Invalid file";
}
btn = (System.Windows.Controls.Button) null;
}
catch (Exception ex)
{
if (btn != null)
btn.Content = (object) "Error";
int num = (int) Messenger.MessageBox(ex.ToString(), "Error", icon: MessageBoxIcon.Hand);
btn = (System.Windows.Controls.Button) null;
}
}
}