基本信息
源码名称:C# 挂机锁 工具源码
源码大小:0.08M
文件格式:.rar
开发语言:C#
更新时间:2020-11-05
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 1 元 
   源码介绍

挂机锁,支持自定义提示

public Form1()
        {
            InitializeComponent();
            _Init(); 
        }

        private void _Init()
        {

            textBox1.Text = "正在挂机,请勿打扰...";
            this.MinimizeBox = false;
            this.MaximizeBox = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox2.Text.Trim()=="" ||textBox3.Text.Trim()=="")
            {
                MessageBox.Show("请输入密码!","提示");
                return;
            }
            if (textBox2.Text.Trim() != textBox3.Text.Trim()) 
            {
                MessageBox.Show("两次密码不一致!","提示");
                return;
            }

            if (string.IsNullOrEmpty(textBox1.Text.Trim()))
            {
                textBox1.Text = "挂机中...";
            }
            Form2 frm2 = new Form2();//实例化F2窗体
            frm2.s = this.Size;//传递窗体大小
            frm2.X = this.Location.X;//传递窗体的X坐标
            frm2.Y = this.Location.Y;//传递窗体的Y坐标
            frm2.info = textBox1.Text.Trim();//传递挂机信息
            frm2.pwd = textBox2.Text.Trim();//传递解锁密码
            this.Hide();//隐藏当前窗体
            frm2.ShowDialog();//打开 f2窗体 

        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }