public void SaveFeature(ChocoFeature feature)
        {
            if (feature.Name == ShowNotifications)
            {
                Properties.Settings.Default.ShowNotifications = feature.IsEnabled;
                Properties.Settings.Default.Save();
            }
            else if (feature.Name == ExitToTray)
            {
                Properties.Settings.Default.ExitToTray = feature.IsEnabled;
                Properties.Settings.Default.Save();
            }
            else if (feature.Name == StartWithWindows)
            {
                Properties.Settings.Default.StartWithWindows = feature.IsEnabled;
                Properties.Settings.Default.Save();

                WindowsStartup.ChangeStartup("HotChocolatey", $"\"{Assembly.GetExecutingAssembly().Location}\" --trayOnly", feature.IsEnabled);
            }
        }
Пример #2
0
 public void SaveFeature(ChocoFeature feature)
 {
     new SaveFeatureChocoTask(feature.Name, feature.IsEnabled).Execute();
 }