72 lines
1.9 KiB
C#
72 lines
1.9 KiB
C#
// Decompiled with JetBrains decompiler
|
|||
|
|
// Type: Raton.Windows.Credits
|
||
|
|
// 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 System;
|
||
|
|
using System.CodeDom.Compiler;
|
||
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.ComponentModel;
|
||
|
|
using System.Diagnostics;
|
||
|
|
using System.Runtime.InteropServices;
|
||
|
|
using System.Windows;
|
||
|
|
using System.Windows.Controls;
|
||
|
|
using System.Windows.Interop;
|
||
|
|
using System.Windows.Markup;
|
||
|
|
|
||
|
|
#nullable disable
|
||
|
|
namespace Raton.Windows;
|
||
|
|
|
||
|
|
public partial class Credits : Window
|
||
|
|
{
|
||
|
|
private const int DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1 = 19;
|
||
|
|
private const int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
||
|
|
|
||
|
|
[DllImport("dwmapi.dll")]
|
||
|
|
private static extern int DwmSetWindowAttribute(
|
||
|
|
IntPtr hwnd,
|
||
|
|
int attr,
|
||
|
|
ref int attrValue,
|
||
|
|
int attrSize);
|
||
|
|
|
||
|
|
public Credits()
|
||
|
|
{
|
||
|
|
this.InitializeComponent();
|
||
|
|
this.SourceInitialized += new EventHandler(this.Credits_SourceInitialized);
|
||
|
|
this.LoadCredits();
|
||
|
|
}
|
||
|
|
|
||
|
|
private void Credits_SourceInitialized(object sender, EventArgs e) => this.ApplyDarkMode();
|
||
|
|
|
||
|
|
private void ApplyDarkMode()
|
||
|
|
{
|
||
|
|
try
|
||
|
|
{
|
||
|
|
IntPtr handle = new WindowInteropHelper((Window) this).Handle;
|
||
|
|
int attrValue = 1;
|
||
|
|
if (Credits.DwmSetWindowAttribute(handle, 20, ref attrValue, 4) == 0)
|
||
|
|
return;
|
||
|
|
Credits.DwmSetWindowAttribute(handle, 19, ref attrValue, 4);
|
||
|
|
}
|
||
|
|
catch
|
||
|
|
{
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private void LoadCredits()
|
||
|
|
{
|
||
|
|
this.CreditsList.ItemsSource = (IEnumerable) new List<CreditEntry>()
|
||
|
|
{
|
||
|
|
new CreditEntry()
|
||
|
|
{
|
||
|
|
AvatarPath = "/Raton;component/Assets/Avatars/plikan.jpg",
|
||
|
|
DisplayName = "dwey",
|
||
|
|
Handle = "@dwey",
|
||
|
|
Contribution = "dwey"
|
||
|
|
}
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|