⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysset.cs

📁 学生学籍管理系统 学生管理 教材管理 成绩管理
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;

namespace 学籍管理系统
{
    public partial class sysset : DevComponents .DotNetBar .Office2007Form 
    {
        public sysset()
        {
            InitializeComponent();
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            string my=null ;
            if (checkBoxX1.Checked == true)
            {
                my="max";
            }
            else if (checkBoxX1.Checked == false)
            {
                my = "nor"; ;
            }

            RegistryKey hklm = Registry.LocalMachine;
            RegistryKey xjgl = hklm.CreateSubKey(@"SOFTWARE\学籍管理系统");
            try
            {
                xjgl.SetValue("MyView", my);
            }
            catch (Exception)
            {
                MessageBox.Show ("系统配置错误!");
            }
            finally
            {
                hklm.Close();
                
            }
            this.Close();
        }

        private void buttonX2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void sysset_Load(object sender, EventArgs e)
        {
            RegistryKey hkml = Registry.LocalMachine;
            RegistryKey xsxj = hkml.CreateSubKey(@"SOFTWARE\学籍管理系统");
            try
            {
                string my = xsxj.GetValue("MyView", "nor").ToString();
                if (my == "nor")
                {
                    checkBoxX1.Checked = false;
                }
                else
                {
                    checkBoxX1.Checked = true;
                }

            }
            finally
            {
                hkml.Close();
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -