⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 检测系统硬盘
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;

namespace HDDScanTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Shown(object sender, EventArgs e)
        {
            //string hDid = Common.GetFirstHDid();
            //string uDid = Common.GetFirstUDid();
            //textBox1.Text = uDid;
            //string a = "PhysicalDrive0";
            //BitArray iowra = IOWrapper.GetVolumeMap(a);
            //int i = 9;
            //int j = 0;
            //int z = 27;
            //Console.WriteLine("0x{0:x}", i << 16);
            //Console.WriteLine("0x{0:x}", j << 14);
            //Console.WriteLine("0x{0:x}", z << 2);
            //Console.WriteLine("0x{0:x}", 0x9000 | 0x0 | 0x6c | 0x3);   
            HardDiskInfo info = AtapiDevice.GetHddInfo(1);
            
            textBox1.Text = info.ModuleNumber;
            textBox2.Text = info.Firmware;
            textBox3.Text = info.SerialNumber;
            textBox4.Text = info.Capacity.ToString();
        }


    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -