private void startAtLogin_CheckedChanged(object sender, EventArgs e) { if (myStartAtLoginCheckBox.Checked) { AutostartUility.SetAutoStart(myApplicationKey, Assembly.GetExecutingAssembly().Location); } else { AutostartUility.UnSetAutoStart(myApplicationKey); } }
public mySettingsForm() { InitializeComponent(); myRemainingTime.Text = ""; myComboBox.SelectedIndex = mySettings.LastTimerValueIndex; myStartMinimizedCheckBox.Checked = mySettings.StartMinimized; if (mySettings.LastX != -1) { this.StartPosition = FormStartPosition.Manual; this.Location = new Point(mySettings.LastX, mySettings.LastY); } myStartAtLoginCheckBox.Checked = (AutostartUility.IsAutoStartEnabled(myApplicationKey) != null); }