🎉惊!你的打工仔好友给你送来了“神秘大礼”!🎁
(注:此弹窗免费,仅为恶搞,禁止随意传播。)
嘿,老铁!👀
今天是不是觉得日子有点平淡无奇,想找点乐子?哈哈,那你可来对地方了!🎉
我特意为你准备了一份“神秘大礼”,保证让你笑得前仰后合,肚子都疼!😂
快来接收你的“神秘大礼”吧!——无法关闭的程序👇
(注:任务管理器、Dos、powershell均无法启动!)
随机移动的坤坤👇
窗体代码如下:
private int _closeAttempts;
private Point _originalLocation;
private Random _random = new Random();
private readonly Image[] _images =
{
Properties.Resources.Image1,
Properties.Resources.Image2,
Properties.Resources.Image3,
Properties.Resources.Image4
};
public Form1()
{
InitializeComponent();
InitializeCustomFormSettings();
}
private void InitializeCustomFormSettings()
{
// 窗体基本设置
FormBorderStyle = FormBorderStyle.FixedDialog;
MinimizeBox = MaximizeBox = false;
ControlBox = true;
StartPosition = FormStartPosition.CenterScreen;
Size = new Size(1000, 800);
// 事件绑定
FormClosing += Form1_FormClosing;
_originalLocation = Location;
}
事件方法代码如下:
private void HandleSpecialClosing()
{
if (_closeAttempts >= 999)
{
MessageBox.Show("你真是个小天才 ( ̄▽ ̄)~*", "来自坤坤的祝福!");
Close();
}
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
var configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.txt");
if (!File.Exists(configPath))
{
HandleMissingConfigFile(e);
return;
}
var content = File.ReadAllText(configPath).Trim();
e.Cancel = content != AdminCode;
if (e.Cancel)
MessageBox.Show("都说了没卵用你还点、真蠢!!!", "来自贝利亚的警告!");
else
button1.Visible = true;
}
private void HandleMissingConfigFile(FormClosingEventArgs e)
{
if (_closeAttempts <= 3)
{
MessageBox.Show("这样是关不掉滴、ㄟ( ▔, ▔ )ㄏ", "来自坤坤的警告!");
_closeAttempts++;
e.Cancel = true;
}
else
{
MessageBox.Show("都说了没卵用你还点、真蠢!!!", "来自贝利亚的警告!");
e.Cancel = _closeAttempts < 999;
}
}
private void Button1_MouseEnter(object sender, EventArgs e)
{
// 随机更改按钮的图标
int index = _random.Next(_images.Length);
pictureBox1.Image = _images[index];
// 随机更改按钮的位置
int x = _random.Next(this.ClientSize.Width - pictureBox1.Width);
int y = _random.Next(this.ClientSize.Height - pictureBox1.Height);
pictureBox1.Location = new Point(x, y);
}
private void pictureBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("这都被你点到了");
MessageBox.Show("但是~~ ");
MessageBox.Show("加班是不可能加班滴,这辈子都不可能 ( ̄ε(# ̄)☆");
MessageBox.Show("食屎啊你~~~");
}
private void pictureBox2_Click(object sender, EventArgs e)
{
MessageBox.Show("耶耶耶~~~");
MessageBox.Show("老板万岁 (~ ̄▽ ̄)~");
MessageBox.Show("下班万岁 (~ ̄▽ ̄)~");
MessageBox.Show("上班只是手段,享受生活才是目的");
MessageBox.Show("爷要去享受悠闲的下班时光了");
MessageBox.Show("下班时间别找劳资,耶稣来了也不好使");
MessageBox.Show("本程序仅限恶搞,禁止违法操作。私信创作者,获取程序退出指令");
this.Text = "来自一名打工仔的愤怒:本程序无法退出哟~ 不信你试 (づ ̄ 3 ̄)づ";
}
private void timer1_Tick(object sender, EventArgs e)
{
base.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - base.Width) / 2, (Screen.PrimaryScreen.WorkingArea.Height - base.Height) / 2);
Process[] processes = Process.GetProcesses();
base.TopMost = true;
foreach (Process process in processes)
{
try
{
if (process.ProcessName.ToLower().Trim() == "taskmgr")
{
process.Kill();
base.TopMost = false;
MessageBox.Show("想用任务管理器关闭? (⊙﹏⊙)");
MessageBox.Show("不好意思,没用哦 ╮(╯-╰)╭");
base.TopMost = true;
break;
}
if (process.ProcessName.ToLower().Trim() == "cmd")
{
process.Kill();
base.TopMost = false;
MessageBox.Show("不好意思,dos窗口也被我干掉了 ╮(╯-╰)╭");
base.TopMost = true;
break;
}
if (process.ProcessName.ToLower().Trim() == "powershell")
{
process.Kill();
base.TopMost = false;
MessageBox.Show("不好意思,PowerShell窗口也被我干掉了 ╮(╯-╰)╭");
MessageBox.Show("别想用PowerShell命令哦");
base.TopMost = true;
break;
}
}
catch
{
break;
}
}
}
private const string AdminCode = "./administrators/123456";
解决方法:
当前程序路径——>创建Config.txt文件(文本内容必须为:./administrators/123456)——>即可正常点击X关闭。
关机重启电脑也可以。😂😂😂