Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Oct 19, 2019
1 parent 32341af commit 813cc0c
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 121 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.0] - 2019-10-19
### Added
- Added italian translation thx @irondave
- Added Brazilian Portuguese translation thx @Possessed777
- Added ini option to select language

### Fixed
- fixed minor issues with progress display

### Changed
- date format should now be proeprly localized
- improved auto check for update feature


## [0.9a+] - 2018-12-07
### Added
- Added Russian translation thx @zetcamp
Expand Down Expand Up @@ -184,4 +198,4 @@ Color=#ccffcc

## [0.1] - 2018-08-16
### Added
- Initial release
- Initial release
6 changes: 3 additions & 3 deletions wumgr/Common/FileOps.cs
Expand Up @@ -14,11 +14,11 @@ static public string FormatSize(decimal size)
{
if (size == 0)
return "";
if (size > 1024 * 1024 * 1024)
if (size >= 1024 * 1024 * 1024)
return (size / (1024 * 1024 * 1024)).ToString("F") + " GB";
if (size > 1024 * 1024)
if (size >= 1024 * 1024)
return (size / (1024 * 1024)).ToString("F") + " MB";
if (size > 1024)
if (size >= 1024)
return (size / (1024)).ToString("F") + " KB";
return ((Int64)size).ToString() + " B";
}
Expand Down
6 changes: 3 additions & 3 deletions wumgr/Program.cs
Expand Up @@ -63,7 +63,9 @@ static void Main(string[] args)
if (fvi.FileBuildPart != 0)
mVersion += (char)('a' + (fvi.FileBuildPart - 1));

Translate.Load();
wrkPath = appPath;

Translate.Load(IniReadValue("Options", "Lang", ""));

AppLog Log = new AppLog();
AppLog.Line("{0}, Version v{1} by David Xanatos", mName, mVersion);
Expand Down Expand Up @@ -115,8 +117,6 @@ static void Main(string[] args)
}
}

wrkPath = appPath;

if (!FileOps.TestWrite(GetINIPath()))
{
Console.WriteLine("Can't write to default working directory.");
Expand Down
6 changes: 3 additions & 3 deletions wumgr/Properties/AssemblyInfo.cs
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("wumgr")]
[assembly: AssemblyCopyright("Copyright © DavidXanatos 2018")]
[assembly: AssemblyCopyright("Copyright © DavidXanatos 2018-2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.1")]
[assembly: AssemblyFileVersion("0.9.1")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
15 changes: 11 additions & 4 deletions wumgr/WuAgent.cs
Expand Up @@ -12,6 +12,7 @@
using System.Windows.Forms;
using System.ServiceProcess;
using System.Collections.Specialized;
using System.Globalization;

namespace wumgr
{
Expand Down Expand Up @@ -500,9 +501,6 @@ public RetCodes UnInstallUpdatesManually(List<MsUpdate> Updates)
if (mUpdateInstaller.IsBusy())
return RetCodes.Busy;

mCurOperation = AgentOperation.RemoveingUpdates;
OnProgress(-1, 0, 0, 0);

List<MsUpdate> FilteredUpdates = new List<MsUpdate>();
foreach (MsUpdate Update in Updates)
{
Expand All @@ -519,6 +517,9 @@ public RetCodes UnInstallUpdatesManually(List<MsUpdate> Updates)
return RetCodes.NoUpdated;
}

mCurOperation = AgentOperation.RemoveingUpdates;
OnProgress(-1, 0, 0, 0);

if (!mUpdateInstaller.UnInstall(FilteredUpdates))
OnFinished(RetCodes.InstallFailed);

Expand All @@ -527,6 +528,12 @@ public RetCodes UnInstallUpdatesManually(List<MsUpdate> Updates)

void DownloadsFinished(object sender, UpdateDownloader.FinishedEventArgs args) // "manuall" mode
{
if (mCurOperation == AgentOperation.CancelingOperation)
{
OnFinished(RetCodes.Abborted);
return;
}

if (mCurOperation == AgentOperation.PreparingCheck)
{
AppLog.Line("wsusscn2.cab downloaded");
Expand Down Expand Up @@ -1087,7 +1094,7 @@ private void StoreUpdates(List<MsUpdate> Updates)
Program.IniWriteValue(Update.KB, "Info", Update.Description, INIPath);
Program.IniWriteValue(Update.KB, "Category", Update.Category, INIPath);

Program.IniWriteValue(Update.KB, "Date", Update.Date.ToString("dd.MM.yyyy"), INIPath);
Program.IniWriteValue(Update.KB, "Date", Update.Date.ToString(CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern), INIPath);
Program.IniWriteValue(Update.KB, "Size", Update.Size.ToString(), INIPath);

Program.IniWriteValue(Update.KB, "SupportUrl", Update.SupportUrl, INIPath);
Expand Down
206 changes: 103 additions & 103 deletions wumgr/WuMgr.Designer.cs

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

0 comments on commit 813cc0c

Please sign in to comment.