-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge branch 'develop' into master
- Loading branch information
Showing
13 changed files
with
573 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> | ||
</startup> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#region Copyright | ||
|
||
// ----------------------------------------------------------------------- | ||
// <copyright file="ControlExtensions.cs" company="VPUpdater"> | ||
// (C) 2019 Oliver Booth. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
#endregion | ||
|
||
namespace VPUpdater | ||
{ | ||
#region Using Directives | ||
|
||
using System.Windows.Forms; | ||
|
||
#endregion | ||
|
||
/// <summary> | ||
/// Extension methods for <see cref="Control"/>. | ||
/// </summary> | ||
public static class ControlExtensions | ||
{ | ||
/// <summary> | ||
/// Thread-safe method invocation. Calls <see cref="Control.Invoke"/> if <see cref="Control.InvokeRequired"/> returns <see langword="true"/>. | ||
/// </summary> | ||
/// <param name="control">The control from which to invoke.</param> | ||
/// <param name="action">The action to invoke.</param> | ||
public static void InvokeIfRequired(this Control control, MethodInvoker action) | ||
{ | ||
if (control?.InvokeRequired ?? false) | ||
{ | ||
control.Invoke(action); | ||
} | ||
else | ||
{ | ||
action(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.