Skip to content

Commit 234c48f

Browse files
committed
* Fixed a couple of spelling mistakes inside the code
* Minor fix for French translations * Updated copyright text
1 parent 9b3c359 commit 234c48f

22 files changed

+56
-45
lines changed

MemPlus/Business/EXPORT/ExportTypes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
internal sealed class ExportTypes
77
{
88
/// <summary>
9-
/// Enumaration containing all the different export types
9+
/// Enumeration containing all the different export types
1010
/// </summary>
1111
internal enum ExportType
1212
{

MemPlus/Business/EXPORT/LogExporter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace MemPlus.Business.EXPORT
99
/// <summary>
1010
/// Static class containing the logic for exporting logs
1111
/// </summary>
12+
// ReSharper disable once InconsistentNaming
1213
internal static class LogExporter
1314
{
1415
/// <summary>

MemPlus/Business/EXPORT/ProcessDetailExporter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace MemPlus.Business.EXPORT
99
/// <summary>
1010
/// Static class that can be used to export ProcessDetail information
1111
/// </summary>
12+
// ReSharper disable once InconsistentNaming
1213
internal static class ProcessDetailExporter
1314
{
1415
/// <summary>

MemPlus/Business/LOG/Log.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22

3+
// ReSharper disable InconsistentNaming
34
namespace MemPlus.Business.LOG
45
{
56
/// <summary>

MemPlus/Business/LOG/ProcessLog.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace MemPlus.Business.LOG
66
/// <summary>
77
/// A class that represent a change in the ProcessAnalyzer
88
/// </summary>
9+
// ReSharper disable once InconsistentNaming
910
internal class ProcessLog : Log
1011
{
1112
/// <summary>

MemPlus/Business/PROCESS/ProcessDetail.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <summary>
44
/// Internal class that represents the presentable details of a Process object
55
/// </summary>
6+
// ReSharper disable once InconsistentNaming
67
internal class ProcessDetail
78
{
89
/// <summary>

MemPlus/Business/RAM/RamController.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ internal sealed class RamController : IDisposable
3737
/// </summary>
3838
private readonly ComputerInfo _info;
3939
/// <summary>
40-
/// The list of processes that should be excluded from memory optimisation
40+
/// The list of processes that should be excluded from memory optimization
4141
/// </summary>
4242
private List<string> _processExceptionList;
4343
/// <summary>
44-
/// An integer value representative of the percentage of RAM usage that should be reached before RAM optimisation should be called
44+
/// An integer value representative of the percentage of RAM usage that should be reached before RAM optimization should be called
4545
/// </summary>
4646
private double _autoOptimizeRamThreshold;
4747
/// <summary>
48-
/// The last time automatic RAM optimisation was called in terms of RAM percentage threshold settings
48+
/// The last time automatic RAM optimization was called in terms of RAM percentage threshold settings
4949
/// </summary>
5050
private DateTime _lastAutoOptimizeTime;
5151
#endregion
@@ -64,7 +64,7 @@ internal sealed class RamController : IDisposable
6464
/// </summary>
6565
internal double RamTotal { get; private set; }
6666
/// <summary>
67-
/// Property containing how much RAM was saved during the last optimisation
67+
/// Property containing how much RAM was saved during the last optimization
6868
/// </summary>
6969
internal double RamSavings { get; private set; }
7070
/// <summary>
@@ -76,15 +76,15 @@ internal sealed class RamController : IDisposable
7676
/// </summary>
7777
internal bool EmptyWorkingSets { get; set; }
7878
/// <summary>
79-
/// Property displaying whether the FileSystem cache should be cleared or not during memory optimisation
79+
/// Property displaying whether the FileSystem cache should be cleared or not during memory optimization
8080
/// </summary>
8181
internal bool ClearFileSystemCache { get; set; }
8282
/// <summary>
83-
/// Property displaying whether the standby cache should be cleared or not during memory optimisation
83+
/// Property displaying whether the standby cache should be cleared or not during memory optimization
8484
/// </summary>
8585
internal bool ClearStandbyCache { get; set; }
8686
/// <summary>
87-
/// Property displaying whether automatic RAM optimisation should occur after a certain RAM usage percentage was reached
87+
/// Property displaying whether automatic RAM optimization should occur after a certain RAM usage percentage was reached
8888
/// </summary>
8989
internal bool AutoOptimizePercentage { get; set; }
9090
/// <summary>
@@ -101,7 +101,7 @@ internal sealed class RamController : IDisposable
101101
/// <summary>
102102
/// Event that is called when RAM clearing has occurred
103103
/// </summary>
104-
private event RamClearingCompleted RamClearingCompletedEvcent;
104+
private event RamClearingCompleted RamClearingCompletedEvent;
105105
/// <summary>
106106
/// Delegate void that indicates that a GUI update should occur when called
107107
/// </summary>
@@ -116,17 +116,17 @@ internal sealed class RamController : IDisposable
116116
/// Initialize a new RamController object
117117
/// </summary>
118118
/// <param name="updateGuiStatisticsEvent">An event to indicate that a GUI update should occur</param>
119-
/// <param name="ramClearingCompletedEvcent">An event to indicate that the RAM has been cleared</param>
119+
/// <param name="ramClearingCompletedEvent">An event to indicate that the RAM has been cleared</param>
120120
/// <param name="ramUpdateTimerInterval">The interval for which RAM usage statistics should be updated</param>
121121
/// <param name="logController">The LogController object that can be used to add logs</param>
122-
internal RamController(UpdateGuiStatistics updateGuiStatisticsEvent, RamClearingCompleted ramClearingCompletedEvcent, int ramUpdateTimerInterval, LogController logController)
122+
internal RamController(UpdateGuiStatistics updateGuiStatisticsEvent, RamClearingCompleted ramClearingCompletedEvent, int ramUpdateTimerInterval, LogController logController)
123123
{
124124
_logController = logController ?? throw new ArgumentNullException(nameof(logController));
125125
_logController.AddLog(new ApplicationLog("Initializing RamController"));
126126

127127
if (ramUpdateTimerInterval <= 0) throw new ArgumentException("Timer interval cannot be less than or equal to zero!");
128128
UpdateGuiStatisticsEvent = updateGuiStatisticsEvent ?? throw new ArgumentNullException(nameof(updateGuiStatisticsEvent));
129-
RamClearingCompletedEvcent = ramClearingCompletedEvcent ?? throw new ArgumentNullException(nameof(ramClearingCompletedEvcent));
129+
RamClearingCompletedEvent = ramClearingCompletedEvent ?? throw new ArgumentNullException(nameof(ramClearingCompletedEvent));
130130

131131
RamSavings = 0;
132132

@@ -146,7 +146,7 @@ internal RamController(UpdateGuiStatistics updateGuiStatisticsEvent, RamClearing
146146
}
147147

148148
/// <summary>
149-
/// Set the threshold percentage for automatic RAM optimisation
149+
/// Set the threshold percentage for automatic RAM optimization
150150
/// </summary>
151151
/// <param name="threshold">The percentage threshold</param>
152152
internal void SetAutoOptimizeThreshold(double threshold)
@@ -156,10 +156,10 @@ internal void SetAutoOptimizeThreshold(double threshold)
156156
}
157157

158158
/// <summary>
159-
/// Enable or disable automatic timed RAM optimisation
159+
/// Enable or disable automatic timed RAM optimization
160160
/// </summary>
161-
/// <param name="enabled">A boolean to indicate whether automatic RAM optimisation should occur or not</param>
162-
/// <param name="interval">The interval for automatic RAM optimisation</param>
161+
/// <param name="enabled">A boolean to indicate whether automatic RAM optimization should occur or not</param>
162+
/// <param name="interval">The interval for automatic RAM optimization</param>
163163
internal void AutoOptimizeTimed(bool enabled, int interval)
164164
{
165165
if (_ramAutoOptimizeTimer == null)
@@ -183,9 +183,9 @@ private async void RamAutoOptimizeTimerOnElapsed(object sender, ElapsedEventArgs
183183
}
184184

185185
/// <summary>
186-
/// Set the list of processes that should excluded from RAM optimisation
186+
/// Set the list of processes that should excluded from RAM optimization
187187
/// </summary>
188-
/// <param name="processExceptionList">The list of processes that should be excluded from RAM optimisation</param>
188+
/// <param name="processExceptionList">The list of processes that should be excluded from RAM optimization</param>
189189
internal void SetProcessExceptionList(List<string> processExceptionList)
190190
{
191191
_processExceptionList = processExceptionList;
@@ -194,7 +194,7 @@ internal void SetProcessExceptionList(List<string> processExceptionList)
194194
/// <summary>
195195
/// Set the interval for the RAM Monitor updates
196196
/// </summary>
197-
/// <param name="interval">The amount of miliseconds before an update should occur</param>
197+
/// <param name="interval">The amount of milliseconds before an update should occur</param>
198198
internal void SetRamUpdateTimerInterval(int interval)
199199
{
200200
_ramTimer.Interval = interval;
@@ -284,7 +284,7 @@ await Task.Run(async () =>
284284
Clipboard.Clear();
285285
}
286286

287-
RamClearingCompletedEvcent.Invoke();
287+
RamClearingCompletedEvent.Invoke();
288288

289289
_logController.AddLog(new ApplicationLog("Done clearing RAM memory"));
290290
}
@@ -315,7 +315,7 @@ await Task.Run(async () =>
315315
RamSavings = oldUsage - newUsage;
316316
});
317317

318-
RamClearingCompletedEvcent.Invoke();
318+
RamClearingCompletedEvent.Invoke();
319319

320320
_logController.AddLog(new ApplicationLog("Done clearing process working sets"));
321321
}
@@ -344,7 +344,7 @@ await Task.Run(() =>
344344
RamSavings = oldUsage - newUsage;
345345
});
346346

347-
RamClearingCompletedEvcent.Invoke();
347+
RamClearingCompletedEvent.Invoke();
348348

349349
_logController.AddLog(new ApplicationLog("Done clearing FileSystem cache"));
350350
}
@@ -358,10 +358,10 @@ private void UpdateRamUsage()
358358

359359
double total = Convert.ToDouble(_info.TotalPhysicalMemory);
360360
double usage = total - Convert.ToDouble(_info.AvailablePhysicalMemory);
361-
double perc = usage / total * 100;
361+
double percentage = usage / total * 100;
362362

363363
RamUsage = usage;
364-
RamUsagePercentage = perc;
364+
RamUsagePercentage = percentage;
365365
RamTotal = total;
366366

367367
if (RamUsagePercentage >= _autoOptimizeRamThreshold && AutoOptimizePercentage)

MemPlus/Business/RAM/RamData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace MemPlus.Business.RAM
22
{
33
/// <summary>
4-
/// Class for displaying RAM information inside a treeview
4+
/// Class for displaying RAM information inside a TreeView component
55
/// </summary>
66
internal sealed class RamData
77
{

MemPlus/Business/RAM/RamOptimizer.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ internal struct SystemCacheInformation64Bit
5050
internal struct TokenPrivileges
5151
{
5252
internal int Count;
53+
// ReSharper disable once IdentifierTypo
5354
internal long Luid;
5455
internal int Attr;
5556
}
@@ -70,17 +71,17 @@ internal sealed class RamOptimizer
7071
{
7172
#region Variables
7273
/// <summary>
73-
/// Constant int used for TokenPrivileges Atrr variable
74+
/// Constant int used for TokenPrivileges Attribute variable
7475
/// </summary>
75-
private const int SePrivilegeEnabled = 2;
76+
private const int PrivilegeEnabled = 2;
7677
/// <summary>
7778
/// Adjust memory quotas for a process
7879
/// </summary>
79-
private const string SeIncreaseQuotaName = "SeIncreaseQuotaPrivilege";
80+
private const string IncreaseQuotaName = "SeIncreaseQuotaPrivilege";
8081
/// <summary>
8182
/// Profile single process
8283
/// </summary>
83-
private const string SeProfileSingleProcessName = "SeProfileSingleProcessPrivilege";
84+
private const string ProfileSingleProcessName = "SeProfileSingleProcessPrivilege";
8485
/// <summary>
8586
/// Memory purge standby list
8687
/// </summary>
@@ -103,7 +104,7 @@ internal RamOptimizer(LogController logController)
103104
/// <summary>
104105
/// Clear the working sets of all processes that are available to the application
105106
/// </summary>
106-
/// <param name="processExceptions">A list of processes that should be excluded from memory optimisation</param>
107+
/// <param name="processExceptions">A list of processes that should be excluded from memory optimization</param>
107108
internal void EmptyWorkingSetFunction(List<string> processExceptions)
108109
{
109110
_logController.AddLog(new RamLog("Emptying working set"));
@@ -161,7 +162,7 @@ internal void ClearFileSystemCache(bool clearStandbyCache)
161162
try
162163
{
163164
// Check if privilege can be increased
164-
if (SetIncreasePrivilege(SeIncreaseQuotaName))
165+
if (SetIncreasePrivilege(IncreaseQuotaName))
165166
{
166167
_logController.AddLog(new RamLog("Privileges have successfully been increased"));
167168

@@ -211,7 +212,7 @@ internal void ClearFileSystemCache(bool clearStandbyCache)
211212

212213
// Clear the standby cache if we have to and if we can also increase the privileges
213214
// If we can't increase the privileges, it's pointless to even try
214-
if (!clearStandbyCache || !SetIncreasePrivilege(SeProfileSingleProcessName)) return;
215+
if (!clearStandbyCache || !SetIncreasePrivilege(ProfileSingleProcessName)) return;
215216
{
216217
_logController.AddLog(new RamLog("Clearing standby cache"));
217218

@@ -244,7 +245,7 @@ private bool SetIncreasePrivilege(string privilegeName)
244245
TokenPrivileges newst;
245246
newst.Count = 1;
246247
newst.Luid = 0L;
247-
newst.Attr = SePrivilegeEnabled;
248+
newst.Attr = PrivilegeEnabled;
248249

249250
_logController.AddLog(new RamLog("Looking up privilage value"));
250251
// If we can't look up the privilege value, we can't function properly

MemPlus/Business/UTILS/HotKeyController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace MemPlus.Business.UTILS
99
{
1010
/// <inheritdoc />
1111
/// <summary>
12-
/// Internal class used for controlling the registering and unregistering of hotkeys
12+
/// Internal class used for controlling the registering and de-registering of hotkeys
1313
/// </summary>
1414
internal sealed class HotKeyController : IDisposable
1515
{
@@ -22,6 +22,7 @@ internal sealed class HotKeyController : IDisposable
2222
/// The WindowInteropHelper that can be used to retrieve the handle of a Window
2323
/// </summary>
2424
private readonly WindowInteropHelper _helper;
25+
// ReSharper disable once CommentTypo
2526
/// <summary>
2627
/// The HwndSource that can be used to retrieve messages
2728
/// </summary>

0 commit comments

Comments
 (0)