Skip to content

Commit 555c52f

Browse files
committed
- Added Korean and Serbian languages
- Improved Code & UI - Improved Slovenian language - Signed all executable versions using a personal self-code signing certificate. It reset the downloads counter.
1 parent a4d80a9 commit 555c52f

22 files changed

+96
-90
lines changed

src/App.xaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@
6464
</ControlTemplate>
6565
</Setter.Value>
6666
</Setter>
67-
<Style.Triggers>
68-
<Trigger Property="IsEnabled" Value="False">
69-
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
70-
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
71-
</Trigger>
72-
</Style.Triggers>
7367
<Style.Resources>
7468
<Style TargetType="{x:Type Border}">
7569
<Setter Property="CornerRadius" Value="3" />
@@ -205,7 +199,6 @@
205199
<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden" />
206200
</Trigger>
207201
<Trigger Property="IsEnabled" Value="False">
208-
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
209202
<Setter TargetName="ToggleButton" Property="Foreground" Value="{StaticResource DarkDisabled}" />
210203
</Trigger>
211204
<Trigger Property="IsFocused" Value="True">
@@ -246,7 +239,7 @@
246239
</Border>
247240
<ControlTemplate.Triggers>
248241
<Trigger Property="IsEnabled" Value="False">
249-
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
242+
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
250243
</Trigger>
251244
<Trigger Property="IsFocused" Value="True">
252245
<Setter Property="Foreground" Value="{StaticResource DarkOver}" />
@@ -314,7 +307,7 @@
314307
</Style.Triggers>
315308
</Style>
316309
<!-- ScrollBar (BEGIN) -->
317-
<Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}">
310+
<Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}" BasedOn="{StaticResource FrameworkElementBase}">
318311
<Setter Property="Template">
319312
<Setter.Value>
320313
<ControlTemplate TargetType="{x:Type Thumb}">
@@ -344,7 +337,7 @@
344337
</Setter.Value>
345338
</Setter>
346339
</Style>
347-
<Style TargetType="{x:Type ScrollBar}">
340+
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource FrameworkElementBase}">
348341
<Setter Property="Background" Value="Transparent" />
349342
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
350343
<Setter Property="Margin" Value="-5, 0, -5, 0" />
@@ -375,7 +368,7 @@
375368
</Grid>
376369
<ControlTemplate.Triggers>
377370
<Trigger Property="IsEnabled" Value="False">
378-
<Setter TargetName="ScrollBarThumb" Property="Visibility" Value="Collapsed" />
371+
<Setter TargetName="ScrollBarThumb" Property="Background" Value="{StaticResource DarkDisabled}" />
379372
</Trigger>
380373
<Trigger Property="IsMouseOver" Value="True">
381374
<Setter TargetName="ScrollBarThumb" Property="Background" Value="{StaticResource DarkOver}" />
@@ -403,6 +396,7 @@
403396
</Setter>
404397
</Style>
405398
<!-- ScrollBar (END) -->
399+
<Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource FrameworkElementBase}" />
406400
<Style TargetType="{x:Type Slider}" BasedOn="{StaticResource FrameworkElementBase}">
407401
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
408402
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}" />

src/App.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ protected override void OnStartup(StartupEventArgs e)
273273
}
274274
else
275275
mainWindow.Show();
276+
277+
// Reduce app memory usage
278+
NativeMethods.EmptyWorkingSet(Process.GetCurrentProcess().Handle);
276279
}
277280
else // NO GUI
278281
{

src/Control/CustomContextMenuStrip.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ public CustomContextMenuStrip()
2323
// Rounded border
2424
var windowCornerPreference = Constants.Windows.DesktopWindowManager.Value.WindowCornerPreferenceRound;
2525
NativeMethods.DwmSetWindowAttribute(Handle, Constants.Windows.DesktopWindowManager.Attribute.WindowCornerPreference, ref windowCornerPreference, sizeof(int));
26-
26+
2727
// Border color
2828
var borderColor = ColorTranslator.ToWin32(_darkBorderBrush);
2929
NativeMethods.DwmSetWindowAttribute(Handle, Constants.Windows.DesktopWindowManager.Attribute.BorderColor, ref borderColor, sizeof(int));
3030
}
31-
31+
3232
internal sealed class ToolStripRenderer : ToolStripProfessionalRenderer
3333
{
3434
internal ToolStripRenderer()
@@ -41,7 +41,7 @@ protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
4141
{
4242
base.OnRenderItemText(e);
4343

44-
e.Item.ForeColor = e.Item.Selected ? _darkOver: _darkForeground;
44+
e.Item.ForeColor = e.Item.Selected ? _darkOver : _darkForeground;
4545
}
4646

4747
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)

src/Core/HotKeyManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private void OnThreadPreprocessMessage(ref MSG msg, ref bool handled)
7474
try
7575
{
7676
hotKey = new HotKey
77-
(
77+
(
7878
key: KeyInterop.KeyFromVirtualKey(((int)msg.lParam >> 16) & 0xFFFF),
7979
modifiers: (ModifierKeys)((int)msg.lParam & 0xFFFF)
8080
);

src/Core/Localizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private static void Load(string language)
119119

120120
var localResource = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, string.Format("{0}{1}", language, Constants.App.LocalizationResourceExtension));
121121
var resource = string.Format("{0}{1}{2}", Constants.App.LocalizationResourcePath, language, Constants.App.LocalizationResourceExtension);
122-
122+
123123
using (Stream stream = File.Exists(localResource) ? File.OpenRead(localResource) : Assembly.GetExecutingAssembly().GetManifestResourceStream(resource))
124124
{
125125
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Localization));

src/Core/NativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static class NativeMethods
1010
{
1111
[DllImport("advapi32.dll", SetLastError = true)]
1212
[return: MarshalAs(UnmanagedType.Bool)]
13-
internal static extern bool AdjustTokenPrivileges(IntPtr tokenHandle, [MarshalAs(UnmanagedType.Bool)]bool disableAllPrivileges, ref Structs.Windows.TokenPrivileges newState, int bufferLength, IntPtr previousState, IntPtr returnLength);
13+
internal static extern bool AdjustTokenPrivileges(IntPtr tokenHandle, [MarshalAs(UnmanagedType.Bool)] bool disableAllPrivileges, ref Structs.Windows.TokenPrivileges newState, int bufferLength, IntPtr previousState, IntPtr returnLength);
1414

1515
[DllImport("dwmapi.dll", SetLastError = true)]
1616
internal static extern void DwmSetWindowAttribute(IntPtr hWnd, int attribute, ref int value, int size);

src/Core/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System;
1+
using Microsoft.Win32;
2+
using System;
23
using System.Collections.Generic;
34
using System.Globalization;
45
using System.Linq;
56
using System.Windows.Input;
6-
using Microsoft.Win32;
77

88
namespace WinMemoryCleaner
99
{

src/Model/Localization.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal class Localization
1616

1717
[DataMember]
1818
public string AutoOptimization { get; private set; }
19-
19+
2020
[DataMember]
2121
public string AutoOptimizationInterval { get; private set; }
2222

@@ -91,7 +91,7 @@ internal class Localization
9191

9292
[DataMember]
9393
public string Minimize { get; private set; }
94-
94+
9595
[DataMember]
9696
public string OptimizationHotkey { get; private set; }
9797

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
[assembly: AssemblyCopyright(Constants.App.License)]
1010
[assembly: AssemblyCulture("")]
1111
[assembly: AssemblyDescription(Constants.App.Title)]
12-
[assembly: AssemblyFileVersion("2.2.0.0")]
12+
[assembly: AssemblyFileVersion("2.3.0.0")]
1313
[assembly: AssemblyKeyFile(Constants.App.KeyFile)]
1414
[assembly: AssemblyProduct(Constants.App.Name)]
1515
[assembly: AssemblyTitle(Constants.App.Title)]
1616
[assembly: AssemblyTrademark(Constants.App.Author.Name)]
17-
[assembly: AssemblyVersion("2.2.0.0")]
17+
[assembly: AssemblyVersion("2.3.0.0")]
1818
[assembly: ComVisible(false)]
1919
[assembly: Guid(Constants.App.Guid)]
2020
[assembly: NeutralResourcesLanguage("")]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"Add": "Додај",
3+
"AlwaysOnTop": "Увек на екрану",
4+
"AutoOptimization": "Аутоматска оптимизација",
5+
"AutoOptimizationInterval": "Интервал ауто оптимизације слободне меморије је {0} минута",
6+
"AutoUpdate": "Аутоматско ажурирање",
7+
"Close": "Затвори",
8+
"CloseAfterOptimization": "Затвори након оптимизације",
9+
"CloseToTheNotificationArea": "Затвори у системску траку",
10+
"DevelopedBy": "Развијен од",
11+
"Error": "Грешка",
12+
"ErrorAdminPrivilegeRequired": "Ова операција захтева администраторске привилегије ({0})",
13+
"ErrorCanNotSaveLog": "Не може се сачувати LOG: {0} (Изузетак: {1})",
14+
"ErrorFeatureIsNotSupported": "{0} чишћење није подржано од ове верзије оперативног система",
15+
"Every": "Сваких",
16+
"Exit": "Излаз",
17+
"Free": "Слободно",
18+
"HotkeyIsInUseByWindows": "Пречицу ({0}) Windows већ користи",
19+
"Invalid": "Неважећи",
20+
"MemoryAreas": "Области меморије",
21+
"MemoryCombinedPageList": "Листа комбинованих страница",
22+
"MemoryModifiedPageList": "Листа измењених страница",
23+
"MemoryOptimized": "Меморија оптимизована",
24+
"MemoryProcessesWorkingSet": "Радни сет процеса",
25+
"MemoryStandbyList": "Листа чекања",
26+
"MemoryStandbyListLowPriority": "Листа чекања (ниског приоритета)",
27+
"MemorySystemWorkingSet": "Системски радни сет",
28+
"MemoryUsage": "Коришћење меморије",
29+
"Minimize": "Минимизуј",
30+
"OptimizationHotkey": "Пречица за оптимизацију",
31+
"Optimize": "Оптимизуј",
32+
"Optimized": "Оптимизовано",
33+
"ProcessExclusionList": "Процеси искључени из оптимизације",
34+
"Remove": "Уклони",
35+
"RepositoryInfo": "Документација, питања и предлози.",
36+
"RunOnStartup": "Покрени на старту",
37+
"Settings": "Подешавања",
38+
"ShowOptimizationNotifications": "Прикажи обавештења о оптимизацији",
39+
"StartMinimized": "Покрени минимизовано",
40+
"UpdatedToVersion": "Ажурирано на верзију {0}",
41+
"Used": "Искоришћено",
42+
"WhenFreeMemoryIsBelow": "Када је слободна меморија испод {0}%"
43+
}

0 commit comments

Comments
 (0)