@@ -92,6 +92,10 @@ internal sealed class RamController
9292 /// </summary>
9393 internal bool ShowStatistics { get ; set ; }
9494 /// <summary>
95+ /// Property displaying whether RAM usage statistics should be displayed in the notifyicon
96+ /// </summary>
97+ internal bool ShowNotifyIconStatistics { get ; set ; }
98+ /// <summary>
9599 /// The last time automatic RAM optimisation was called in terms of RAM percentage threshold settings
96100 /// </summary>
97101 private DateTime _lastAutoOptimizeTime ;
@@ -217,10 +221,23 @@ private void UpdateGuiControls()
217221 {
218222 _mainWindow . Dispatcher . Invoke ( ( ) =>
219223 {
224+ string ramTotal = ( RamTotal / 1024 / 1024 / 1024 ) . ToString ( "F2" ) + " GB" ;
225+ string ramAvailable = ( RamUsage / 1024 / 1024 / 1024 ) . ToString ( "F2" ) + " GB" ;
220226 _mainWindow . CgRamUsage . Scales [ 0 ] . Pointers [ 0 ] . Value = RamUsagePercentage ;
221227 _mainWindow . CgRamUsage . GaugeHeader = "RAM usage (" + RamUsagePercentage . ToString ( "F2" ) + "%)" ;
222- _mainWindow . LblTotalPhysicalMemory . Content = ( RamTotal / 1024 / 1024 / 1024 ) . ToString ( "F2" ) + " GB" ;
223- _mainWindow . LblAvailablePhysicalMemory . Content = ( RamUsage / 1024 / 1024 / 1024 ) . ToString ( "F2" ) + " GB" ;
228+ _mainWindow . LblTotalPhysicalMemory . Content = ramTotal ;
229+ _mainWindow . LblAvailablePhysicalMemory . Content = ramAvailable ;
230+
231+ if ( ShowNotifyIconStatistics )
232+ {
233+ string tooltipText = "DeviceLog" ;
234+ tooltipText += Environment . NewLine ;
235+ tooltipText += "Total physical memory: " + ramTotal ;
236+ tooltipText += Environment . NewLine ;
237+ tooltipText += "Available physical memory: " + ramAvailable ;
238+
239+ _mainWindow . TbiIcon . ToolTipText = tooltipText ;
240+ }
224241 } ) ;
225242 }
226243
0 commit comments