Exemple #1
0
        private static string GetOptimizationSystem(AnalyzeData data)
        {
            var result = "Оперативная память";

            if (data.HddSsdUsageMax > 70)
            {
                result = "Постоянная память";
            }
            if (data.CpuUsageMax > 50)
            {
                result = "Процессор";
            }
            if (data.DSpeedMax == 0 && data.USpeedMax == 0)
            {
                result = "Сетевой интерфейс";
            }
            return(result);
        }
Exemple #2
0
        public MainWindow()
        {
            AnalyzeValues = new AnalyzeData
            {
                ReceivedBytesMax = 0,
                CpuUsageMax      = 0,
                DSpeedMax        = 0,
                HddSsdUsageMax   = 0,
                RamUsageMax      = 0,
                SentBytesMax     = 0,
                USpeedMax        = 0
            };
            InitializeNetworkMeter();
            // Set the timer
            _dispatcherTimer.Tick    += DispatcherTimer_Tick;
            _dispatcherTimer.Interval = new TimeSpan(0, 0, 1);

            InitializeComponent();
            InitializeCpuRam();
        }