Update directory layout

This commit is contained in:
2018-02-06 21:54:26 -05:00
parent ceea58b9bc
commit 38d692c9fc
19 changed files with 6 additions and 6 deletions

34
Library/StartManager.cs Normal file
View File

@@ -0,0 +1,34 @@
using Common.Wpf.Extensions;
using System;
using System.Windows;
namespace FloatingStatusWindowLibrary
{
public static class StartManager
{
public delegate void AutoStartChangedEventHandler(bool autoStart);
public static event AutoStartChangedEventHandler AutoStartChanged = delegate { };
public static bool ManageAutoStart { get; set; }
private static bool _autoStartEnabled;
public static bool AutoStartEnabled
{
get
{
return ManageAutoStart && _autoStartEnabled;
}
set
{
if (!ManageAutoStart)
throw new InvalidOperationException("Cannot set AutoStartEnabled when ManageAutoStart is False");
_autoStartEnabled = value;
Application.Current.SetStartWithWindows(_autoStartEnabled);
AutoStartChanged(_autoStartEnabled);
}
}
}
}