GTK #을 배우기 시작했고, 제 첫 GUI 프로그램을 작성했습니다. 터미널을 통해 실행했을 때 상단 모서리에있는 X를 클릭하면 프로그램이 종료되지 않았습니다. 내 작업 관리자를 보면서 다시 실행했고, 실제로 종료하지 않습니다. 나는 그것을 수동으로 죽여야 만한다. 종료하기 위해 특별한 코드가 필요합니까? 내 현재 코드는 내가 모노의 버전 4에 대해 그것을 컴파일내 GTK # 프로그램을 어떻게 종료합니까?
using System;
using Gtk;
public class GtkHelloWorld {
public static void Main() {
Application.Init();
//Create the Window
Window myWin = new Window("My first GTK# Application! ");
myWin.Resize(200,200);
//Create a label and put some text in it.
Label myLabel = new Label();
myLabel.Text = "Hello World!!!!";
//Add the label to the form
myWin.Add(myLabel);
//Show Everything
myWin.ShowAll();
Application.Run();
}
}
, 그래서 내가 종료하려면 mono --runtime=v4.0 /path/to/file.exe
당신이 모노 + GTK의 기본 동작하지 개까지 속도를 덮어 쓰기 한 것 같은데,하지만 당신은 뭔가 등으로 덮어 수 this.Dispose() –