VSoft/Source/VSoft_Dll/Config/frmSetting.cs
如果当时 2e557b5365 ### 2021-02-27更新
------
#### VSoft    V1.0.2102.2701
- *.[新增]全新的UI,更加美观。
2021-02-27 22:49:54 +08:00

62 lines
2.1 KiB
C#

using ryCommon;
using ryControls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace VSoft.Config
{
public partial class FrmSetting : Skins.SKinForm
{
public FrmSetting()
{
InitializeComponent();
}
private void FrmSetting_Resize(object sender, EventArgs e)
{
}
private void BtnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void BtnOK_Click(object sender, EventArgs e)
{
mySetting.Save();
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
ryCommon.RyRegedit.SetAutoRun(ChkAutoRun.Checked, Soft_Info.Soft_Id, "\"" + Application.ExecutablePath.Replace("/","\\") + "\" "+ Soft_Info.Soft_Pram);
DialogResult = DialogResult.OK;
}
ryControls.RySetting mySetting = new ryControls.RySetting();
private void FrmSetting_Load(object sender, EventArgs e)
{
mySetting.FilePath = Soft_Info.UserDataFolder + "\\Setting.xml";
mySetting.Add("ShowMainHotKey", hotkeyTextBox1, "1+88");
mySetting.Add("OpenByClick", ChkOpenByClick);
mySetting.Add("HideAfterRun", ChkHideAfterRun,true);
mySetting.Add("ShowMainMouseKeyOn", ChkMouseKey, true);
mySetting.Add("ShowMainMouseKey", CbbMouseKeyShow, 0);
mySetting.Read();
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
ChkAutoRun.Checked = ryCommon.RyRegedit.IsAutoRun(Soft_Info.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" "+ Soft_Info.Soft_Pram);
}
private void CbbMouseKeyShow_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void ChkMouseKey_CheckedChanged(object sender, EventArgs e)
{
CbbMouseKeyShow.Enabled = ChkMouseKey.Checked;
}
}
}