Mainform.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using SocketsViewer.Libs;
using SocketsViewer.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SocketsViewer
{
public partial class Mainform : Form
{
List<RowInfo> _rowInfos = new List<RowInfo>();
TransferHelper _transferHelper;
public Mainform()
{
InitializeComponent();
}
private void Mainform_Load(object sender, EventArgs e)
{
_transferHelper = new TransferHelper();
var td = new Thread(new ThreadStart(new Action(() =>
{
while (!this.IsDisposed)
{
try
{
SystemInfo systemInfo = new SystemInfo();
var cpu = $"核心数:{systemInfo.ProcessorCount}个 使用率:{systemInfo.CpuLoad}%";
var mem = $"{StringExtention.ToFormatString(systemInfo.MemoryAvailable)}/{StringExtention.ToFormatString(systemInfo.PhysicalMemory)}";
var sb = new StringBuilder();
var hds = systemInfo.GetLogicalDrives();
foreach (var item in hds)
{
sb.Append($"{item.Name}盘 {StringExtention.ToFormatString(item.FreeSpace)}/{StringExtention.ToFormatString(item.Size)} \t");
}
try
{
this.Invoke(new Action(() =>
{
label8.Text = cpu;
label9.Text = mem;
label10.Text = sb.ToString();
后面还有 308 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。