Example #1
0
 private void ShowInformationButton_Click(object sender, EventArgs e)
 {
     if (infoForm != null)
     {
         infoForm.Close();
     }
     infoForm = new InfoPreviewForm();
     infoForm.AddColumns(new string[, ] {
         { "ParameterColumn", "Parameter" }, { "ValueColumn", "Value" }
     });
     infoForm.AddInfo(computerInfo.GetComputerInfoTable().ToArray());
     infoForm.Show();
 }
        private void ShowInformationButton_Click(object sender, EventArgs e)
        {
            GetInfo();
            if (infoForm != null)
            {
                infoForm.Close();
            }
            infoForm = new InfoPreviewForm();
            infoForm.AddColumns(new string[, ] {
                { "ParameterColumn", "Parameter" }, { "ValueColumn", "Value" }
            });
            List <DataGridViewRow> rows = new List <DataGridViewRow>();

            rows.Add(generateRow("Domain name", domainInfo.domain));
            rows.Add(generateRow("Long domain name", domainInfo.domain_long));
            rows.Add(generateRow("Admin username", domainInfo.admin));
            rows.Add(generateRow("DNS IP", domainInfo.dns));
            infoForm.AddInfo(rows.ToArray());
            infoForm.Show();
        }