コード例 #1
0
ファイル: SystemMonitor.cs プロジェクト: uxav/lib2
        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;
            }
        }
コード例 #2
0
        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;
            }
        }