2023-01-25 01:40:45 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Drawing.Drawing2D;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using DarkControls;
|
2024-02-22 07:51:22 +01:00
|
|
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
|
2023-01-25 01:40:45 +01:00
|
|
|
|
|
|
|
|
|
namespace KsDumper11
|
|
|
|
|
{
|
|
|
|
|
public partial class TriggerForm : Form
|
|
|
|
|
{
|
|
|
|
|
protected override CreateParams CreateParams
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
// Activate double buffering at the form level. All child controls will be double buffered as well.
|
|
|
|
|
CreateParams cp = base.CreateParams;
|
|
|
|
|
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
|
|
|
|
|
return cp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-22 07:51:22 +01:00
|
|
|
|
JsonSettingsManager settingsManager;
|
|
|
|
|
LabelDrawer labelDrawer;
|
|
|
|
|
|
2023-01-25 01:40:45 +01:00
|
|
|
|
public TriggerForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2024-02-22 07:51:22 +01:00
|
|
|
|
|
|
|
|
|
settingsManager = new JsonSettingsManager();
|
|
|
|
|
|
2023-01-25 01:40:45 +01:00
|
|
|
|
this.appIcon1.DragForm = this;
|
|
|
|
|
this.FormBorderStyle = FormBorderStyle.None;
|
|
|
|
|
this.Region = Region.FromHrgn(Utils.CreateRoundRectRgn(0, 0, Width, Height, 10, 10));
|
|
|
|
|
this.closeBtn.Region = Region.FromHrgn(Utils.CreateRoundRectRgn(0, 0, closeBtn.Width, closeBtn.Height, 10, 10));
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-22 07:51:22 +01:00
|
|
|
|
protected override void WndProc(ref Message m)
|
2023-01-25 01:40:45 +01:00
|
|
|
|
{
|
2024-02-22 07:51:22 +01:00
|
|
|
|
base.WndProc(ref m);
|
|
|
|
|
if (m.Msg == Utils.WM_NCHITTEST)
|
|
|
|
|
m.Result = (IntPtr)(Utils.HT_CAPTION);
|
2023-01-25 01:40:45 +01:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-22 07:51:22 +01:00
|
|
|
|
private void closeBtn_Click(object sender, EventArgs e)
|
2023-01-25 01:40:45 +01:00
|
|
|
|
{
|
|
|
|
|
this.DialogResult = DialogResult.OK;
|
2024-02-22 07:51:22 +01:00
|
|
|
|
this.Close();
|
2023-01-25 01:40:45 +01:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-22 07:51:22 +01:00
|
|
|
|
private void TriggerForm_Load(object sender, EventArgs e)
|
2023-01-25 01:40:45 +01:00
|
|
|
|
{
|
2024-02-22 07:51:22 +01:00
|
|
|
|
if (settingsManager.JsonSettings.enableAntiAntiDebuggerTools)
|
|
|
|
|
{
|
|
|
|
|
labelDrawer = new LabelDrawer(this);
|
|
|
|
|
|
|
|
|
|
SnifferBypass.SelfTitle(this.Handle);
|
|
|
|
|
|
|
|
|
|
foreach (Control ctrl in this.Controls)
|
|
|
|
|
{
|
|
|
|
|
if (ctrl is System.Windows.Forms.TextBox) continue;
|
|
|
|
|
SnifferBypass.SelfTitle(ctrl.Handle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.Text = SnifferBypass.GenerateRandomString(this.Text.Length);
|
|
|
|
|
}
|
2023-01-25 01:40:45 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|