Beispiel #1
0
        public void UpdateRamInfo()
        {
            int load = (int)ram.GetInUsePercent();
            int aval = (int)ram.GetAvailableMbytes();

            if (load > RamCriticalPercentLoad)
            {
                if (count++ > 10)
                {
                    count = 0;
                    if (RamLowMemory != null)
                    {
                        RamLowMemory(this, new EventArgs());
                    }
                }
            }
            else
            {
                count = 0;
            }

            ramLoad      = load.ToString() + " %";
            ramAvailable = aval + " MB";

            CompMemoryLoad.TextInCenter = RamLoad;
            CompMemoryAv.TextInCenter   = RamAvailable + "\n( " + (100 - load) + "%)";
            CompMemoryLoad.Value        = load;
            CompMemoryAv.Value          = 100 - load;
        }