无聊写了一个上位机(C#)的的表白软件,so easy但让女生没办法拒接的软件。
下面先看软件
这个软件当对方打开以后,只能选择 是的 这个选项,窗口也关闭不了!
下面上传下代码瞧瞧吧:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Xml;
using System.IO.Ports;
using System.IO;
using static OTA.usr_common;
namespace OTA
{
public partial class login : Form
{
public login()
{
InitializeComponent();
}
public static int move_count = 0;
private void Form1_Load(object sender, EventArgs e)
{
move_count = 0;
FormBorderStyle = FormBorderStyle.None;
button1.Location = new System.Drawing.Point(10, 110);
button1.Text = "是的";
button2.Location = new System.Drawing.Point(120, 110);
button2.Text = "不是";
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.TopMost = true;
this.TopMost = false;
}
private void button2_MouseMove(object sender, MouseEventArgs e)
{
if (move_count == 0)
{
move_count = 1;
button2.Location = new System.Drawing.Point(120, 60);
}
else if (move_count == 1)
{
move_count = 2;
button2.Location = new System.Drawing.Point(120, 110);
}
else
{
button1.Text = "不是";
button2.Text = "是的";
}
}
private void button1_MouseMove(object sender, MouseEventArgs e)
{
button1.Text = "是的";
button2.Text = "不是";
}
private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show("关闭窗口也改变不了你喜欢我的事实!");
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("就知道你喜欢我!");
Environment.Exit(0);
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("就知道你喜欢我!");
Environment.Exit(0);
}
}
}
顺便把这个注册秘钥记录下,给有需要的朋友使用!
现在贴出visual studio2019的秘钥,有需要的请自取:
Visual Studio 2019 Enterprise(企业版)
BF8Y8-GN2QH-T84XB-QVY3B-RC4DF
Visual Studio 2019 Professional(专业版)
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y