问题描述
我必须将每个配置文件名称存储在一个Observable集合中,但是我不知道该怎么做,我在项目中占了很大一部分,但这是如何获得我不知道的每个配置文件名称的方法知道怎么做。
我看到人们正在使用Substrings和IndexOf,但我尝试过,但问题是我要显示的配置文件名称不只一个,因此无法正常工作。
我遵循了本教程:https://www.youtube.com/watch?v=Yr3nfHiA8Kk但它显示了如何操作,但当前连接了Wifi
InitializeComponent();
ObservableCollection<String> reseaux = new ObservableCollection<String>();
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "netsh.exe";
//p.StartInfo.Arguments = "wlan show interfaces";
p.StartInfo.Arguments = "wlan show profile";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
/*foreach (System.Diagnostics.Process profile in profile)
{
reseaux.Add(reseauName);
}*/
lesReseaux.ItemsSource = reseaux;
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)