📄 default.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic.FileIO;
using Microsoft.VisualBasic.Logging;
using Microsoft.VisualBasic.MyServices;
using System.Resources;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Microsoft.VisualBasic.Devices.Computer myComputer = new Microsoft.VisualBasic.Devices.Computer();
Microsoft.VisualBasic.Devices.Computer myComputer1 = new Computer();
Response.Write("操作系统完整名称:" + myComputer.Info.OSFullName + "<BR/>");
Response.Write("操作系统平台:" + myComputer.Info.OSPlatform + "<BR/>");
Response.Write("操作系统版本:" + myComputer.Info.OSVersion + "<BR/>");
Response.Write("全部物理内存:" + myComputer.Info.TotalPhysicalMemory + " Bytes<BR/>");
Response.Write("可用物理内存:" + myComputer.Info.AvailablePhysicalMemory + " Bytes<BR/>");
Response.Write("全部虚拟内存:" + myComputer.Info.TotalVirtualMemory + " Bytes<BR/>");
Response.Write("可用虚拟内存:" + myComputer.Info.AvailableVirtualMemory + " Bytes<BR/>");
GridView1.DataSource = myComputer.Registry.LocalMachine.GetSubKeyNames();
GridView1.DataBind();
//服务器计算机
Microsoft.VisualBasic.Devices.ServerComputer myServerComputer = new ServerComputer();
//myServerComputer.Registry.CurrentUser.
Microsoft.VisualBasic.Devices.Network myNetwork = new Network();
myNetwork.Ping("Localhost");
//myNetwork.UploadFile;
//myNetwork.DownloadFile;
Microsoft.VisualBasic.Devices.Audio myAudio = new Audio();
myAudio.Play("c:\\windows\\media\\chord.wav");
Microsoft.VisualBasic.Devices.Clock myClock = new Clock();
//myClock.LocalTime;
//Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase myForm = new WindowsFormsApplicationBase();
//Log
//Log myLog=new Log();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -