Skip to content

Commit

Permalink
Improved memory usage tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMundstein committed Dec 22, 2023
1 parent 94b06f7 commit 098f9f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression", Justification = "Ignored", Scope = "namespace", Target = "~N:WinMemoryCleaner")]
[assembly: SuppressMessage("Design", "CA1030:Use events where appropriate", Justification = "Ignored", Scope = "type", Target = "~T:WinMemoryCleaner.ObservableObject")]
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Ignored")]
[assembly: SuppressMessage("Design", "CA1034:Nested types should not be visible", Justification = "Ignored")]
Expand Down
3 changes: 3 additions & 0 deletions src/Service/NotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ public void Update(Memory memory)
if (memory == null)
throw new ArgumentNullException("memory");

if (memory.Physical.Used.Percentage == 0)
return;

using (var image = new Bitmap(16, 15))
using (var graphics = Graphics.FromImage(image))
using (var font = new Font("Arial", 9F))
Expand Down

0 comments on commit 098f9f4

Please sign in to comment.