protected override void View_LoadData(object sender, EventArgs e) { base.View_LoadData(sender, e); View.LocalPort_Text = Setting.Instance.LocalPort.ToString(); View.RemotePort_Text = Setting.Instance.RemotePort.ToString(); View.RemoteClientPath = Setting.Instance.RemoteClientPath; View.RemoteClientArgs = Setting.Instance.RemoteClientArgs; View.HideClient_Toggle = Setting.Instance.HideClient; View.AutoStart_Toggle = AutoStart.Check(); }
private void CheckBox_AutoStart_CheckedChanged(object sender, EventArgs e) { var autoStartFlag = AutoStart.Check(); if (autoStartFlag) { AutoStart.Remove(); MessageBox.Show("Success Remove AutoStart"); } else { AutoStart.Set(); MessageBox.Show("Success Set AutoStart"); } }
private void OptionsForm_Load(object sender, EventArgs e) { CheckBox_SaveSettings.Checked = Options.IsRefreshOnSave; CheckBox_AutoStart.Checked = AutoStart.Check(); }