1 Star 0 Fork 0

ser163/Hodor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
GOT.cs 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
ser163 提交于 2021-10-25 22:12 . 添加选择共享路径功能.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Net;
using System.Collections;
namespace Hodor
{
static class GOT
{
// 获取本机所有ip
public static List<string> GetAllIP()
{
string name = Dns.GetHostName();
IPAddress[] ipadrlist = Dns.GetHostAddresses(name);
List<string> IPList = new List<string>();
foreach (IPAddress ipa in ipadrlist)
{
if (ipa.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
{
IPList.Add(ipa.ToString());
}
}
return IPList;
}
public static void OpenFolder(string DiskLabel)
{
//open folder
Process.Start("Explorer.exe", DiskLabel);
}
public static bool DriverExists(string DriverName)
{
return System.IO.Directory.GetLogicalDrives().Contains(DriverName);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ser163/Hodor.git
git@gitee.com:ser163/Hodor.git
ser163
Hodor
Hodor
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385