private void cbox_basic_AutoOn_Click(object sender, RoutedEventArgs e) { if (cbox_basic_AutoOn.IsChecked != null) { Regedit.AutoStart((bool)cbox_basic_AutoOn.IsChecked); } }