【发布时间】:2009-08-28 21:31:53
【问题描述】:
我正在尝试在 gnome 库中找到一些东西来做到这一点:
Gnome.GnomeOpen(url_string);
gnome 将使用首选 gnome 应用程序打开 URL
这存在吗?
【问题讨论】:
-
我也刚刚发现了 Gnome.Url.Show(link);
我正在尝试在 gnome 库中找到一些东西来做到这一点:
Gnome.GnomeOpen(url_string);
gnome 将使用首选 gnome 应用程序打开 URL
这存在吗?
【问题讨论】:
Process.Start 应该会为您处理所有杂乱的工作:
Process.Start ("http://www.mono-project.com");
【讨论】:
System.Process。
未经测试:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName = "xdg-open"; //best guess
proc.StartInfo.Arguments = string_url;
proc.Start();
proc.WaitForExit();
我没有 linux 在这里工作来测试这个,但是你应该能够通过将命令更改为它需要的,使用上面的作为模板来完成你想要的。
【讨论】: