コード例 #1
0
ファイル: Form1.cs プロジェクト: chanfengsr/AllPrivateProject
        private void btnComputer_Click(object sender, EventArgs e)
        {
            Computer myPC = new Computer();

            txtMsg.AppendText(myPC.ComputerName + Environment.NewLine);
            txtMsg.AppendText(myPC.CpuID + Environment.NewLine);
            txtMsg.AppendText(myPC.DiskID + Environment.NewLine);
            txtMsg.AppendText(myPC.IpAddress + Environment.NewLine);
            txtMsg.AppendText(myPC.LoginUserName + Environment.NewLine);
            txtMsg.AppendText(myPC.MacAddress + Environment.NewLine);
            txtMsg.AppendText(myPC.SystemType + Environment.NewLine);
            txtMsg.AppendText(myPC.TotalPhysicalMemory + Environment.NewLine);
        }
コード例 #2
0
 public static Computer Instance()
 {
     if (_instance == null)
         _instance = new Computer();
     return _instance;
 }