- 8
- 0
- 约1.82万字
- 约 16页
- 2017-10-22 发布于北京
- 举报
一个用C#编译的愚人小软件(关机程序)经典珍藏
一个用C#编译的愚人小软件(关机程序),经典珍藏!
前言:有时候被朋友问,你的工作是干嘛的?你怎么回答?你说你是程序员?软件工程师?或者说打酱油的?那么问题来了:酱油都打了这么多年了,好歹也打满了吧?还单身?呵呵,那么你的机会来了!做一个小软件来,发给自己喜欢的女生,得到娱乐同时,还能确认她是否 喜!欢!你!
游戏截图:
①启动游戏:声明的东西可以自己想得漂亮点!我这里设计了窗口关闭时(或者点击了“不,下次吧”),就会给出提示,当然了,可以点击“是”关闭它,可是娱乐效果没达到。
②如果她点击“好的,开始”按钮,哈哈,肯定就进入我们的圈套了!看截图!
说明:她必须输入“我好笨好笨啊”才能解锁,否则时间到,电脑就关机!(PS:可以让她输入:***我爱你这类的表白!让女生表白!嚓!~)
还有,她想关闭窗口,没门!
有人质问:哇嚓,启动“任务管理器”关闭不就行了吗?!想知道我的回答吗?
我的回答是:任务管理器如果你不熟悉,你根本关闭不了的!怎么说,看下面的截图。
很多人以为这样关闭了,就万事大吉了。呵呵,要是这样都被你关闭,软件工程师都只能回家搬砖了(⊙_⊙)。回头大伙可以试一试,这样看看你的电脑能否被关机。
答案是:肯定关机。为什么?因为本款软件是进入到进程中,必须从进程中关闭才行!看截图!
够高级了吧?够刺激了吧?想玩吗?呵呵~
完整代码:
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 关机程序
{
static class Program
{
/// summary
/// 应用程序的主入口点。
/// /summary
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form2());
}
}
}
Form2.Designer.cs
namespace 关机程序
{
partial class Form2
{
/// summary
/// Required designer variable.
/// /summary
private System.ComponentModel.IContainer components = null;
/// summary
/// Clean up any resources being used.
/// /summary
/// param name=disposingtrue if managed resources should be disposed; otherwise, false./param
protected override void Dispose(bool disposing)
{
if (disposing (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// summary
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// /summary
private void InitializeComponent()
{
System.ComponentModel.Co
原创力文档

文档评论(0)