private void CollectAllInfo(string _sFilePath) { try { string sInfo = string.Empty; progressBar.Visible = true; foreach (ComputerInfoKeysFull eVal in Enum.GetValues(typeof(ComputerInfoKeysFull))) { progressBar.CustomText = eVal.ToString().Replace("Win32_", ""); progressBar.PerformStep(); if (ComputerMetrics.GetOneKeyInfo(eVal.ToString(), out sInfo) == true) { File.AppendAllText(_sFilePath, sInfo); } } } catch (Exception exp) { Logger.WriteErrorLogOnly(exp, "99aabef5-82d9-4034-ab3e-07d4bf44c839"); } }
private void CollectSubSetInfo(string _sFilePath) { try { string sInfo = string.Empty; progressBar.Visible = true; foreach (ComputerInfoKeys eVal in Enum.GetValues(typeof(ComputerInfoKeys))) { progressBar.CustomText = eVal.ToString().Replace("Win32_", ""); progressBar.PerformStep(); if (ComputerMetrics.GetOneKeyInfo(eVal.ToString(), out sInfo) == true) { File.AppendAllText(_sFilePath, sInfo); } } } catch (Exception exp) { Logger.WriteErrorLogOnly(exp, "6be88bde-ab49-44b9-b8da-3e5650bbb95f"); } }