Ejemplo n.º 1
0
        public string GetGraphicCardName()
        {
            var name = _sensorService.GetGpuName();

            return(name == "Unknown" ?
                   GetGraphicCardNameFromWMI() : name);
        }
Ejemplo n.º 2
0
        private async Task <BlockingCollection <IOverlayEntry> > GetOverlayEntryDefaults()
        {
            var overlayEntries = OverlayUtils.GetOverlayEntryDefaults()
                                 .Select(item => (item as IOverlayEntry).Clone()).ToBlockingCollection();

            //log hardware configs
            _logger.LogInformation("Set overlay defaults");
            _logger.LogInformation("CPU detected: {cpuName}.", _sensorService.GetCpuName());
            _logger.LogInformation("CPU threads detected: {threadCount}.", Environment.ProcessorCount);
            _logger.LogInformation("GPU detected: {gpuName}.", _sensorService.GetGpuName());

            await _overlayEntryCore.OverlayEntryCoreCompletionSource.Task;

            // Sensor data
            _overlayEntryCore.OverlayEntryDict.Values.ForEach(sensor => overlayEntries.TryAdd(sensor.Clone()));
            return(await Task.FromResult(overlayEntries));
        }
Ejemplo n.º 3
0
        private IObservable <BlockingCollection <IOverlayEntry> > GetOverlayEntryDefaults()
        {
            var overlayEntries = OverlayUtils.GetOverlayEntryDefaults()
                                 .Select(item => (item as IOverlayEntry).Clone()).ToBlockingCollection();

            //log hardware configs
            _logger.LogInformation("Set overlay defaults");
            _logger.LogInformation("CPU detected: {cpuName}.", _sensorService.GetCpuName());
            _logger.LogInformation("CPU threads detected: {threadCount}.", Environment.ProcessorCount);
            _logger.LogInformation("GPU detected: {gpuName}.", _sensorService.GetGpuName());

            // Sensor data
            return(_onDictionaryUpdatedBuffered
                   .Take(1)
                   .Select(sensorOverlayEntries =>
            {
                sensorOverlayEntries.ForEach(sensor => overlayEntries.TryAdd(sensor.Clone()));
                return overlayEntries;
            }));
        }