Skip to content

Commit

Permalink
Removed startup stuff... windows defender says anidow is a trojan
Browse files Browse the repository at this point in the history
  • Loading branch information
Tensei committed May 31, 2021
1 parent a85bb88 commit e172d87
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 104 deletions.
1 change: 0 additions & 1 deletion anidow/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ protected override void ConfigureIoC(IStyletIoCBuilder builder)
builder.Bind<Assembly>().ToInstance(Assembly.GetExecutingAssembly());
var tracker = InitTracker();
builder.Bind<Tracker>().ToInstance(tracker);
builder.Bind<WindowsStartUp>().ToSelf();

var logViewModel = new LogViewModel();
InitLogger(logViewModel);
Expand Down
80 changes: 0 additions & 80 deletions anidow/Helpers/WindowsStartUp.cs

This file was deleted.

6 changes: 0 additions & 6 deletions anidow/Pages/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,6 @@
<CheckBox Content="On close minimize to notification area." IsChecked="{Binding Settings.MinimizeToNotificationArea}" />

</Grid>
<Grid
Grid.Row="6"
Grid.Column="0"
Margin="0,4">
<CheckBox Content="Start anidow on windows startup." IsChecked="{Binding Settings.StartOnWindowsStartUp}" />
</Grid>
</Grid>
</Expander>
<Expander
Expand Down
19 changes: 2 additions & 17 deletions anidow/Services/SettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ public class SettingsService : PropertyChangedBase
{
private readonly ILogger _logger;
private readonly Assembly _assembly;
private readonly WindowsStartUp _windowsStartUp;
private readonly StoreService _storeService;

public SettingsService(StoreService storeService, ILogger logger,
Assembly assembly, WindowsStartUp windowsStartUp)
Assembly assembly)
{
_storeService = storeService ?? throw new ArgumentNullException(nameof(storeService));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
_assembly = assembly;
_windowsStartUp = windowsStartUp;
}

public bool CanSave { get; set; }
Expand All @@ -50,10 +48,7 @@ public async Task Init()

TempSettings = await _storeService.Load<SettingsModel>("settings.json") ?? new SettingsModel();
Settings = await _storeService.Load<SettingsModel>("settings.json") ?? new SettingsModel();

var startup = _windowsStartUp.IsEnabled();
Settings.StartOnWindowsStartUp = startup;
TempSettings.StartOnWindowsStartUp = startup;


TempSettings.PropertyChanged += SettingsOnPropertyChanged;
TempSettings.QBitTorrent.PropertyChanged += SettingsOnPropertyChanged;
Expand All @@ -69,16 +64,6 @@ public async Task Save()
await _storeService.Save(TempSettings, "settings.json");
Settings = await _storeService.Load<SettingsModel>("settings.json");

switch (Settings.StartOnWindowsStartUp)
{
case true when !_windowsStartUp.IsEnabled():
await _windowsStartUp.Enable();
break;
case false when _windowsStartUp.IsEnabled():
_windowsStartUp.Disable();
break;
}

_logger.Information("saved setting's");

ResourceLocator.SetColorScheme(Application.Current.Resources,
Expand Down

0 comments on commit e172d87

Please sign in to comment.