This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
760 additions
and
1,136 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="WereDev.Utils.Wu10Man.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<appSettings> | ||
<add key="WindowsUpdateUrls" value="stats.microsoft.com,download.microsoft.com,update.microsoft.com,windowsupdate.microsoft.com,windowsupdate.com,download.windowsupdate.com,ntservicepack.microsoft.com,wustat.windows.com" /> | ||
</appSettings> | ||
<userSettings> | ||
<WereDev.Utils.Wu10Man.Properties.Settings> | ||
<setting name="ShowAdvanced" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
</WereDev.Utils.Wu10Man.Properties.Settings> | ||
</userSettings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> | ||
</startup> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="WereDev.Utils.Wu10Man.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<appSettings> | ||
<add key="WindowsUpdateUrls" value="stats.microsoft.com,download.microsoft.com,update.microsoft.com,windowsupdate.microsoft.com,windowsupdate.com,download.windowsupdate.com,ntservicepack.microsoft.com,wustat.windows.com" /> | ||
<add key="ClientSettingsProvider.ServiceUri" value="" /> | ||
</appSettings> | ||
<userSettings> | ||
<WereDev.Utils.Wu10Man.Properties.Settings> | ||
<setting name="ShowAdvanced" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
</WereDev.Utils.Wu10Man.Properties.Settings> | ||
</userSettings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> | ||
</startup> | ||
<system.web> | ||
<membership defaultProvider="ClientAuthenticationMembershipProvider"> | ||
<providers> | ||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> | ||
</providers> | ||
</membership> | ||
<roleManager defaultProvider="ClientRoleProvider" enabled="true"> | ||
<providers> | ||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> | ||
</providers> | ||
</roleManager> | ||
</system.web> | ||
</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 |
---|---|---|
@@ -1,13 +1,5 @@ | ||
<Application x:Class="WereDev.Utils.Wu10Man.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:WereDev.Utils.Wu10Man" | ||
StartupUri="MainWindow.xaml" | ||
ShutdownMode="OnExplicitShutdown"> | ||
<Application.Resources> | ||
<!--<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>--> | ||
</Application.Resources> | ||
<Application.MainWindow> | ||
<local:MainWindow/> | ||
</Application.MainWindow> | ||
</Application> |
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
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 was deleted.
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
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,52 +1,52 @@ | ||
using NLog; | ||
using NLog.Targets; | ||
using System; | ||
using System.IO; | ||
|
||
namespace WereDev.Utils.Wu10Man.Helpers | ||
{ | ||
internal class Wu10Logger | ||
{ | ||
private readonly NLog.Logger _logger = LogManager.GetCurrentClassLogger(); | ||
|
||
public string LogFolder | ||
{ | ||
get | ||
{ | ||
var targets = LogManager.Configuration.AllTargets; | ||
foreach (var target in targets) | ||
{ | ||
var fileTarget = target as FileTarget; | ||
if (fileTarget != null) | ||
{ | ||
var logEventInfo = new LogEventInfo { TimeStamp = DateTime.Now }; | ||
var fileName = fileTarget.FileName.Render(logEventInfo); | ||
var folder = Path.GetDirectoryName(fileName); | ||
return folder; | ||
} | ||
} | ||
throw new InvalidOperationException("No file logging has been configured in nlog.config"); | ||
} | ||
} | ||
|
||
public void LogError(Exception ex) | ||
{ | ||
var exception = ex; | ||
while (exception != null) | ||
{ | ||
LogError(string.Format("{0} \r\n {1}", ex.Message, ex.StackTrace.Replace("\r\n", "\r\n\t"))); | ||
exception = exception.InnerException; | ||
} | ||
} | ||
|
||
public void LogError(string message) | ||
{ | ||
_logger.Error(message); | ||
} | ||
|
||
public void LogInfo(string message) | ||
{ | ||
_logger.Info(message ?? string.Empty); | ||
} | ||
} | ||
} | ||
using NLog; | ||
using NLog.Targets; | ||
using System; | ||
using System.IO; | ||
|
||
namespace WereDev.Utils.Wu10Man.Helpers | ||
{ | ||
internal static class Wu10Logger | ||
{ | ||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger(); | ||
|
||
public static string LogFolder | ||
{ | ||
get | ||
{ | ||
var targets = LogManager.Configuration.AllTargets; | ||
foreach (var target in targets) | ||
{ | ||
var fileTarget = target as FileTarget; | ||
if (fileTarget != null) | ||
{ | ||
var logEventInfo = new LogEventInfo { TimeStamp = DateTime.Now }; | ||
var fileName = fileTarget.FileName.Render(logEventInfo); | ||
var folder = Path.GetDirectoryName(fileName); | ||
return folder; | ||
} | ||
} | ||
throw new InvalidOperationException("No file logging has been configured in nlog.config"); | ||
} | ||
} | ||
|
||
public static void LogError(Exception ex) | ||
{ | ||
var exception = ex; | ||
while (exception != null) | ||
{ | ||
LogError($"{ex.GetType().ToString()}: {ex.Message}\r\n{ex.StackTrace}"); | ||
exception = exception.InnerException; | ||
} | ||
} | ||
|
||
public static void LogError(string message) | ||
{ | ||
_logger.Error(message); | ||
} | ||
|
||
public static void LogInfo(string message) | ||
{ | ||
_logger.Info(message ?? string.Empty); | ||
} | ||
} | ||
} |
Oops, something went wrong.