Esempio n. 1
0
        private void comboBoxDriveLetter_SelectedIndexChanged(object sender, EventArgs e)
        {
            TextBoxDisque.Clear();
            ComboBox myCombo = (ComboBox)sender;

            _indexSelected = myCombo.SelectedIndex;
        }
Esempio n. 2
0
        private void ButtonWmi_Click(object sender, EventArgs e)
        {
            TextBoxDisque.Clear();

            this._stopWatch.Start();
            MyWmi.WmiDonneesDisque dd = MyWmi.GetSerialNumberWmi(this._indexSelected);
            LogMethodExcecutionTime("GetSerialNumberWmi");

            if (dd.NumeroSerie != "")
            {
                TextBoxDisque.AppendText(dd.NumeroSerie + "\r\n");
                TextBoxDisque.AppendText(dd.Modele + "\r\n");
                TextBoxDisque.AppendText(dd.Type + "\r\n");
                TextBoxDisque.AppendText(dd.DeviceID + "\r\n");
                return;
            }
            TextBoxDisque.AppendText("No serial number");
        }
Esempio n. 3
0
        private void GetSerialNumberDriveInfo(int index = 0)
        {
            TextBoxDisque.Clear();

            this._stopWatch.Start();
            DriveInfo info = new DriveInfo(index);

            LogMethodExcecutionTime("GetSerialNumberDriveInfo");

            if ((info.SerialNumber != null))
            {
                TextBoxDisque.AppendText(info.SerialNumber.ToString() + "\r\n");
                TextBoxDisque.AppendText(info.Model.ToString() + "\r\n");
                TextBoxDisque.AppendText(info.DriveType.ToString() + "\r\n");
                TextBoxDisque.AppendText(info.Firmware.ToString() + "\r\n");
                return;
            }
            TextBoxDisque.AppendText("No serial number");
        }
Esempio n. 4
0
 private void ButtonDriveInfo_Click(object sender, EventArgs e)
 {
     TextBoxDisque.Clear();
     GetSerialNumberDriveInfo(this._indexSelected);
 }