RaUI/Source/Itrycn_Project2/frmSetting.cs

47 lines
1.6 KiB
C#
Raw Normal View History

2020-11-28 07:03:28 +00:00
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 Itrycn_Project2
2020-11-28 07:03:28 +00:00
{
public partial class FrmSetting : RySkins.SKinForm
2020-11-28 07:03:28 +00:00
{
public FrmSetting()
{
InitializeComponent();
}
private void FrmSetting_Resize(object sender, EventArgs e)
{
tabControl1.Refresh();
}
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_ConstInfo.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" "+ Soft_ConstInfo.Soft_Pram);
2020-11-28 07:03:28 +00:00
DialogResult = DialogResult.OK;
}
ryControls.RySetting mySetting = new ryControls.RySetting();
private void FrmSetting_Load(object sender, EventArgs e)
{
mySetting.FilePath = Soft_ConstInfo.UserDataFolder + "\\Setting.xml";
2020-11-28 07:03:28 +00:00
mySetting.Add("AutoLogin", chkAutoLogin,false);
mySetting.Read();
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
ChkAutoRun.Checked = ryCommon.RyRegedit.IsAutoRun(Soft_ConstInfo.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" "+ Soft_ConstInfo.Soft_Pram);
2020-11-28 07:03:28 +00:00
}
}
}