Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            label1.Text = $"请将串号全部复制并发送给管理员" +
                          $"{Environment.NewLine}{Environment.NewLine}待管理员将注册码发来时粘贴进注册码文本框" +
                          $"{Environment.NewLine}{Environment.NewLine}然后点击注册即可.";

            textBox1.Text = PFunc.GetCheckStr();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //校验原始字符串

            var key = PFunc.GetCheckStr();


            if (PFunc.GetKey(textBox2.Text) == key)
            {
                Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
                configuration.AppSettings.Settings["Reg"].Value = textBox2.Text;
                configuration.Save(ConfigurationSaveMode.Modified);
                DialogResult = DialogResult.OK;
                Close();
                return;
            }

            MessageBox.Show(@"输入信息有误,请联系管理员");
        }
Exemplo n.º 3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //判断注册
            var key = PFunc.GetCheckStr();

            var value = ConfigurationManager.AppSettings["Reg"];

            if (PFunc.GetKey(value) != key)
            {
                var f = new RegisterFrom();
                f.ShowDialog();
                if (f.DialogResult != DialogResult.OK)
                {
                    Application.Exit();
                    return;
                }
            }

            Application.Run(new SerialForm());
        }
Exemplo n.º 4
0
 private void button2_Click(object sender, EventArgs e)
 {
     textBox2.Text = PFunc.GetKey(textBox3.Text);
 }