我想使用我构建的程序并在单击 GUI 界面中的 onrunapplication 按钮时将其分配为运行:
using System;
using Gtk;
public partial class MainWindow: Gtk.Window
{
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
}
protected void OnExitbuttonClicked (object sender, EventArgs e)
{
Application.Quit();
}
protected void OnRunapplicationClicked (object sender, EventArgs e)
{
???
}
}
这是我要运行的程序的开头:
using System;
using Gtk;
using System.IO;
using System.Net;
namespace namelookup
{
class MainClass
{
public static void Main(string[] args)
{