Skip to content

Commit

Permalink
Merge branch 'release/v3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Beger committed Aug 16, 2017
2 parents fe5f386 + 610a5a5 commit bdc192b
Show file tree
Hide file tree
Showing 60 changed files with 902 additions and 940 deletions.
2 changes: 1 addition & 1 deletion nUpdate.Administration/Program.cs
Expand Up @@ -54,7 +54,7 @@ public static class Program
/// <summary>
/// The version string shown in all dialog titles.
/// </summary>
public static string VersionString => "nUpdate Administration v3.0-beta10";
public static string VersionString => "nUpdate Administration v3.1";

public static string AesKeyPassword => "VZh7mLRPNI";
public static string AesIvPassword => "cOijH2vgwR";
Expand Down
7 changes: 3 additions & 4 deletions nUpdate.Administration/Properties/AssemblyInfo.cs
Expand Up @@ -3,7 +3,7 @@
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using nUpdate.Core;

// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
Expand Down Expand Up @@ -38,7 +38,6 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyInformationalVersion("v3.0.0.0 Beta 10")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
[assembly: NeutralResourcesLanguage("")]
2 changes: 1 addition & 1 deletion nUpdate.Administration/UI/Dialogs/InfoDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions nUpdate.Client.GuiInterface/Properties/AssemblyInfo.cs
Expand Up @@ -37,6 +37,5 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyInformationalVersion("v3.0.0.0 Beta 10")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
5 changes: 2 additions & 3 deletions nUpdate.Test/Properties/AssemblyInfo.cs
Expand Up @@ -37,6 +37,5 @@
// durch Einsatz von '*', wie in nachfolgendem Beispiel:
// [Assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyInformationalVersion("v3.0.0.0 Beta 10")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
5 changes: 2 additions & 3 deletions nUpdate.UpdateInstaller/Properties/AssemblyInfo.cs
Expand Up @@ -37,6 +37,5 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyInformationalVersion("v3.0.0.0 Beta 10")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
2 changes: 1 addition & 1 deletion nUpdate/Core/Architecture.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

namespace nUpdate.Core
{
Expand Down
2 changes: 1 addition & 1 deletion nUpdate/Core/ConnectionChecker.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

using nUpdate.Core.Win32;

Expand Down
2 changes: 1 addition & 1 deletion nUpdate/Core/DevelopmentalStage.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

namespace nUpdate.Core
{
Expand Down
2 changes: 1 addition & 1 deletion nUpdate/Core/IDeepCopy.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

namespace nUpdate.Core
{
Expand Down
7 changes: 2 additions & 5 deletions nUpdate/Core/IconHelper.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

using System;
using System.Drawing;
Expand All @@ -23,7 +23,7 @@ internal class IconHelper
/// </remarks>
internal static Icon ExtractAssociatedIcon(string filePath)
{
int index = 0;
var index = 0;

Uri uri;
if (filePath == null)
Expand All @@ -47,10 +47,7 @@ internal static Icon ExtractAssociatedIcon(string filePath)
return null;

if (!File.Exists(filePath))
{
//IntSecurity.DemandReadFileIO(filePath);
throw new FileNotFoundException(filePath);
}

var iconPath = new StringBuilder(260);
iconPath.Append(filePath);
Expand Down
58 changes: 33 additions & 25 deletions nUpdate/Core/Localization/LocalizationHelper.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

using System;
using System.Collections.Generic;
Expand All @@ -7,11 +7,36 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

namespace nUpdate.Core.Localization
{
internal class LocalizationHelper
{
internal static CultureInfo[] IntegratedCultures => new[]
{
new CultureInfo("de-AT"), new CultureInfo("de-CH"), new CultureInfo("de-DE"), new CultureInfo("zh-CN"),
new CultureInfo("en")
};

internal static LocalizationProperties GetLocalizationProperties(CultureInfo cultureInfo,
Dictionary<CultureInfo, string> localizationFilePaths)
{
var resourceName = $"nUpdate.Core.Localization.{cultureInfo.Name}.json";
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
if (stream != null)
return Serializer.Deserialize<LocalizationProperties>(stream);

string localizationFilePath;
localizationFilePaths.TryGetValue(cultureInfo, out localizationFilePath);
if (localizationFilePath == null)
throw new Exception("The path of the localization file is not valid.");
return Serializer.Deserialize<LocalizationProperties>(File.ReadAllText(localizationFilePath,
Encoding.UTF8));
}
}

/// <summary>
/// Returns the localized values for the given enumeration objects.
/// </summary>
Expand All @@ -25,17 +50,17 @@ internal class LocalizationHelper
{
var fieldInfo = o.GetType().GetField(o.ToString());
var descriptionAttributes =
(DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);
(DescriptionAttribute[]) fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);

if (descriptionAttributes.Length > 0)
{
var resourceId = descriptionAttributes[0].Description;
yield return
(string)
properties.GetType()
.GetProperties()
.First(x => x.Name == resourceId)
.GetValue(properties, null);
properties.GetType()
.GetProperties()
.First(x => x.Name == resourceId)
.GetValue(properties, null);
}
else
{
Expand All @@ -44,29 +69,12 @@ yield return
}
}

internal static CultureInfo[] IntegratedCultures => new[] { new CultureInfo("de-AT"), new CultureInfo("de-CH"), new CultureInfo("de-DE"), new CultureInfo("zh-CN"), new CultureInfo("en") };

internal static bool IsIntegratedCulture(CultureInfo cultureInfo, Dictionary<CultureInfo, string> localizationFilePaths)
internal static bool IsIntegratedCulture(CultureInfo cultureInfo,
Dictionary<CultureInfo, string> localizationFilePaths)
{
string localizationFilePath;
localizationFilePaths.TryGetValue(cultureInfo, out localizationFilePath);
return IntegratedCultures.Contains(cultureInfo) || localizationFilePath != null;
}

internal static LocalizationProperties GetLocalizationProperties(CultureInfo cultureInfo, Dictionary<CultureInfo, string> localizationFilePaths)
{
string resourceName = $"nUpdate.Core.Localization.{cultureInfo.Name}.json";
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
if (stream != null)
return Serializer.Deserialize<LocalizationProperties>(stream);

string localizationFilePath;
localizationFilePaths.TryGetValue(cultureInfo, out localizationFilePath);
if (localizationFilePath == null)
throw new Exception("The path of the localization file is not valid.");
return Serializer.Deserialize<LocalizationProperties>(File.ReadAllText(localizationFilePath, System.Text.Encoding.Default));
}
}
}
}
70 changes: 35 additions & 35 deletions nUpdate/Core/Localization/LocalizationProperties.cs
@@ -1,4 +1,4 @@
// Author: Dominic Beger (Trade/ProgTrade) 2016
// Copyright © Dominic Beger 2017

namespace nUpdate.Core.Localization
{
Expand Down Expand Up @@ -73,54 +73,54 @@ internal LocalizationProperties()
}

public string CancelButtonText { get; set; }
public string CloseButtonText { get; set; }
public string ContinueButtonText { get; set; }
public string DownloadingProcessRunningExceptionText { get; set; }
public string FileDeletingOperationText { get; set; }
public string FileRenamingOperationText { get; set; }
public string InstallButtonText { get; set; }
public string CloseButtonText { get; set; }
public string UpdateSearchDialogHeader { get; set; }
public string NewUpdateDialogMultipleUpdatesHeader { get; set; }
public string NewUpdateDialogSingleUpdateHeader { get; set; }
public string NewUpdateDialogInfoText { get; set; }
public string InstallerCopyingText { get; set; }
public string InstallerExtractingFilesText { get; set; }
public string InstallerFileInUseError { get; set; }
public string InstallerInitializingErrorCaption { get; set; }
public string InstallerUpdatingErrorCaption { get; set; }
public string InvalidSignatureErrorCaption { get; set; }
public string InvalidSignatureErrorText { get; set; }
public string MainFolderCreationExceptionText { get; set; }
public string NetworkConnectionExceptionText { get; set; }
public string NewUpdateDialogAccessText { get; set; }
public string NewUpdateDialogAvailableVersionsText { get; set; }
public string NewUpdateDialogCurrentVersionText { get; set; }
public string NewUpdateDialogSizeText { get; set; }
public string NewUpdateDialogChangelogText { get; set; }
public string NewUpdateDialogBigPackageWarning { get; set; }
public string NewUpdateDialogAccessText { get; set; }
public string NewUpdateDialogRegistryAccessText { get; set; }
public string NewUpdateDialogChangelogText { get; set; }
public string NewUpdateDialogCurrentVersionText { get; set; }
public string NewUpdateDialogFilesAccessText { get; set; }
public string NewUpdateDialogInfoText { get; set; }
public string NewUpdateDialogMultipleUpdatesHeader { get; set; }
public string NewUpdateDialogProcessesAccessText { get; set; }
public string NewUpdateDialogRegistryAccessText { get; set; }
public string NewUpdateDialogServicesAccessText { get; set; }
public string NewUpdateDialogSingleUpdateHeader { get; set; }
public string NewUpdateDialogSizeText { get; set; }
public string NoUpdateDialogHeader { get; set; }
public string NoUpdateDialogInfoText { get; set; }
public string UpdateDownloadDialogLoadingHeader { get; set; }
public string UpdateDownloadDialogLoadingInfo { get; set; }
public string InstallerExtractingFilesText { get; set; }
public string InstallerCopyingText { get; set; }
public string InstallerInitializingErrorCaption { get; set; }
public string InstallerUpdatingErrorCaption { get; set; }
public string InstallerFileInUseError { get; set; }
public string FileRenamingOperationText { get; set; }
public string FileDeletingOperationText { get; set; }
public string RegistrySubKeyCreateOperationText { get; set; }
public string RegistrySubKeyDeleteOperationText { get; set; }
public string RegistryNameValuePairSetValueOperationText { get; set; }
public string RegistryNameValuePairDeleteValueOperationText { get; set; }
public string PackageFileNotFoundExceptionText { get; set; }
public string PackageNotFoundErrorText { get; set; }
public string PackageSizeCalculationExceptionText { get; set; }
public string PackageValidityCheckErrorCaption { get; set; }
public string ProcessStartOperationText { get; set; }
public string ProcessStopOperationText { get; set; }
public string RegistryNameValuePairDeleteValueOperationText { get; set; }
public string RegistryNameValuePairSetValueOperationText { get; set; }
public string RegistrySubKeyCreateOperationText { get; set; }
public string RegistrySubKeyDeleteOperationText { get; set; }
public string SearchProcessRunningExceptionText { get; set; }
public string ServiceStartOperationText { get; set; }
public string ServiceStopOperationText { get; set; }
public string UpdateSearchErrorCaption { get; set; }
public string PackageValidityCheckErrorCaption { get; set; }
public string PackageNotFoundErrorText { get; set; }
public string InvalidSignatureErrorCaption { get; set; }
public string SignatureNotMatchingErrorText { get; set; }
public string InvalidSignatureErrorText { get; set; }
public string SearchProcessRunningExceptionText { get; set; }
public string DownloadingProcessRunningExceptionText { get; set; }
public string NetworkConnectionExceptionText { get; set; }
public string PackageSizeCalculationExceptionText { get; set; }
public string StatisticsScriptExceptionText { get; set; }
public string PackageFileNotFoundExceptionText { get; set; }
public string MainFolderCreationExceptionText { get; set; }
public string UpdateDownloadDialogLoadingHeader { get; set; }
public string UpdateDownloadDialogLoadingInfo { get; set; }
public string UpdateSearchDialogHeader { get; set; }
public string UpdateSearchErrorCaption { get; set; }
}
}

0 comments on commit bdc192b

Please sign in to comment.