Example #1
0
        private CpuInfoCollection GetSettings()
        {
            var settingFile = ConfigurationProvider.CpuSettingsFile;
            var collection  = new CpuInfoCollection();

            collection.Open(settingFile);

            return(collection);
        }
        private void PviManager_ServiceConnected(object sender, PviEventArgs e)
        {
            PviService = sender as Service;

            var settingFile = ConfigurationProvider.CpuSettingsFile;
            var collection  = new CpuInfoCollection();

            try
            {
                collection.Open(settingFile);
                CpuService             = new CpuManager(PviService);
                CpuService.CpusLoaded += CpuService_CpusLoaded;
                CpuService.LoadCpuCollection(collection.GetAll());
            }
            catch (System.Exception ex)
            {
                _logger.Log(new LogEntry(LoggingEventType.Error, "Error Loading Cpu Settings", ex));
            }
        }