Esempio n. 1
0
        private void LoadRawValuesCommand_Execute(object obj)
        {
            SmartDataEntry dataEntry = _drive.ReadSmartAttributes();

            _viewModel.LastRefreshed = dataEntry.Timestamp;
            _viewModel.RawValues.Clear();
            _viewModel.RawValues.Add(new GridPropertyViewModel("Total gigabytes written", $"{dataEntry.HostWrittenGb.ToString("0.##", CultureInfo.InvariantCulture)} GB"));
            _viewModel.RawValues.Add(new GridPropertyViewModel("Power on time", $"{dataEntry.PowerOnHours} hours"));
            _viewModel.RawValues.Add(new GridPropertyViewModel("Lifetime left", $"{dataEntry.PercentLifetimeLeft}%"));
            _viewModel.RawValues.Add(new GridPropertyViewModel("Power cycle count", $"{dataEntry.PowerCycleCount}"));
            _viewModel.RawValues.Add(new GridPropertyViewModel("Wear levelling", $"{dataEntry.WearLevellingCount}"));
        }
Esempio n. 2
0
        private void ReadSmartEntry()
        {
            SmartDataEntry smartEntry = _drive.ReadSmartAttributes();

            _realTimeData.Add(smartEntry);
            AppendDataEntry();

            double newValue = smartEntry.HostWrittenGb;

            if (_viewModel.StartFromZero)
            {
                newValue -= _realTimeData.First().HostWrittenGb;
            }
            _viewModel.ChartViewModel.SeriesValues.Add(newValue);
            _viewModel.ChartViewModel.Timestamps.Add(smartEntry.Timestamp.ToString("HH:mm:ss", CultureInfo.InvariantCulture));
            UpdateChartMinMax();
        }