------ #### OnLineUpgradeConfig V1.0.2501.0601 - *.[修复]修复用户管理列表无法默认勾选已选择用户的BUG。 #### RaUI V4.0.2501.0601 - *.[新增]RyFiles类新增SetFileDate、SetFileCreationTime、SetFileLastWriteTime方法。 - *.[新增]RyFiles.CopyBigFile方法现在会同步来源文件的创建和修改时间。 - *.[新增]ryQuickSQL类新增GetPostData函数,将数据快速转成Post数据。 - *.[改进]执行MySQL下的ExecuteNonQuery时,如果遇到连接关闭错误,允许重连并重新执行。 - *.[改进]IDbInterface在执行新的SQL语句前,自动清空最后错误。 - *.[修复]修复LayeredForm窗体以正常窗体打开的时候,文本框无法编辑的BUG。 - *.[修复]修复ApkOp获取apk权限时可能带乱码的BUG。 - *.[修复]修复WeifenLuo.WinFormsUI.Docking的ResourceManager.GetString路径不对导致报错的BUG。
55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
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 Config
|
|
{
|
|
public partial class frmSetting : Form
|
|
{
|
|
public frmSetting()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void btnCancel_Click(object sender, EventArgs e)
|
|
{
|
|
this.DialogResult = DialogResult.Cancel;
|
|
}
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
{
|
|
RegistryKey LMach = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
|
|
RegistryKey softwareRun = LMach.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
|
|
if (chkAutoRun.Checked == true)
|
|
{ softwareRun.SetValue("ryProcessServer", "\"" + Application.ExecutablePath + "\" q", RegistryValueKind.String); }
|
|
else
|
|
{
|
|
if (softwareRun.GetValue("ryProcessServer") != null)
|
|
{
|
|
softwareRun.DeleteValue("ryProcessServer");
|
|
}
|
|
}
|
|
|
|
softwareRun.Close();
|
|
LMach.Close();
|
|
this.DialogResult = DialogResult.OK;
|
|
}
|
|
|
|
private void frmSetting_Load(object sender, EventArgs e)
|
|
{
|
|
RegistryKey LMach = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
|
|
RegistryKey softwareRun = LMach.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
|
|
if (softwareRun.GetValue("ryProcessServer", "").ToString() == "\"" + Application.ExecutablePath + "\" q")
|
|
{ chkAutoRun.Checked = true; }
|
|
else { chkAutoRun.Checked = false; }
|
|
softwareRun.Close();
|
|
LMach.Close();
|
|
}
|
|
}
|
|
}
|