public DevHealthTestForm() { InitializeComponent(); DevHealth.HealthInfos hInfo = new DevHealth.HealthInfos(); comboBox1.Items.Clear(); foreach (DevHealth.HealthInfos.healthInfo hI in hInfo._Infos) { comboBox1.Items.Add(hI); } comboBox1.SelectedIndex = 0; }
private void btnGet_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex == -1) { return; } DevHealth.HealthInfos.healthInfo hI = (DevHealth.HealthInfos.healthInfo)comboBox1.Items[comboBox1.SelectedIndex]; DevHealth.HealthInfos hInfo = new DevHealth.HealthInfos(); uint uErr = 0; string sInfo = hInfo.getInfo(hI, ref uErr); if (uErr == 0) { txtOut.Text = sInfo; } else { txtOut.Text = DevHealth.SSerrorStrings.getSSAPIErrorString(uErr);// getErrorString("0x" + uErr.ToString("X8")); } }