Skip to content

Commit

Permalink
Fixed an issue where UpdateForm was shown without visual styles when …
Browse files Browse the repository at this point in the history
…it is used from CheckForUpdateEvent event and in WPF app.
  • Loading branch information
ravibpatel committed Mar 11, 2020
1 parent 4f5c569 commit 365b9d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions AutoUpdater.NET/AutoUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ public static void Start(string appCast, Assembly myAssembly = null)

IsWinFormsApplication = Application.MessageLoop;

if (!IsWinFormsApplication)
{
Application.EnableVisualStyles();
}

Assembly assembly = myAssembly ?? Assembly.GetEntryAssembly();

if (Synchronous)
Expand Down Expand Up @@ -439,11 +444,6 @@ private static bool StartUpdate(object result)
{
if (args.IsUpdateAvailable)
{
if (!IsWinFormsApplication)
{
Application.EnableVisualStyles();
}

if (Mandatory && UpdateMode == Mode.ForcedDownload)
{
DownloadUpdate(args);
Expand Down

0 comments on commit 365b9d6

Please sign in to comment.