?? sysset.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 + -