Ejemplo n.º 1
0
        private void userButton3_Click(object sender, EventArgs e)
        {
            if (userButton1.Selected)
            {
                Settings.Can_Account_Login = true;
            }
            else
            {
                Settings.Can_Account_Login = false;
            }

            Settings.Account_Forbidden_Reason = textBox1.Text;
            Settings.SaveToFile();
            MessageBox.Show("保存成功");
            Close();
        }
Ejemplo n.º 2
0
        private void userButton1_Click(object sender, EventArgs e)
        {
            try
            {
                Settings.SystemVersion = new SystemVersion(textBox2.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show("版本号格式错误:应为1.0.0" + Environment.NewLine +
                                "错误描述:" + ex.Message);
            }

            try
            {
                Settings.SaveToFile();
                MessageBox.Show("保存成功");
            }
            catch (Exception ex)
            {
                MessageBox.Show("数据保存失败" + Environment.NewLine +
                                "错误描述:" + ex.Message);
            }
        }