private static void SystemMonitorOnProcessStatisticChange(ProcessStatisticChangeEventArgs args) { switch (args.StatisticWhichChanged) { case eProcessStatisticChange.MaximumNumberOfRunningProcesses: MaximumNumberOfRunningProcesses = args.MaximumNumberOfRunningProcesses; break; case eProcessStatisticChange.NumberOfRunningProcesses: NumberOfRunningProcesses = args.NumberOfRunningProcesses; break; case eProcessStatisticChange.RAMFree: RamFree = args.RAMFree; break; case eProcessStatisticChange.RAMFreeMinimum: RamFreeMinimum = args.RAMFreeMinimum; break; case eProcessStatisticChange.TotalRAMSize: TotalRamSize = args.TotalRAMSize; break; } }
void SystemMonitor_ProcessStatisticChange(ProcessStatisticChangeEventArgs args) { switch (args.StatisticWhichChanged) { case eProcessStatisticChange.MaximumNumberOfRunningProcesses: MaxProcesses_F = SystemMonitor.MaximumNumberOfRunningProcesses; break; case eProcessStatisticChange.NoChange: break; case eProcessStatisticChange.NumberOfRunningProcesses: NumProcesses_F = SystemMonitor.NumberOfRunningProcesses; break; case eProcessStatisticChange.RAMFree: HeapFree_F = SystemMonitor.RAMFree.ToString(); break; case eProcessStatisticChange.RAMFreeMinimum: HeapFreeMin_F = SystemMonitor.RAMFreeMinimum.ToString(); break; case eProcessStatisticChange.TotalRAMSize: TotalHeapSpace_F = SystemMonitor.TotalRAMSize.ToString(); break; default: break; } }