瀏覽代碼

File Dialog: hook up cancel button

Miguel de Icaza 7 年之前
父節點
當前提交
829aae09c8
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Terminal.Gui/Dialogs/FileDialog.cs

+ 4 - 0
Terminal.Gui/Dialogs/FileDialog.cs

@@ -320,6 +320,10 @@ namespace Terminal.Gui {
 			};
 			};
 
 
 			this.cancel = new Button ("Cancel");
 			this.cancel = new Button ("Cancel");
+			this.cancel.Clicked += () => {
+				canceled = true;
+				Application.RequestStop ();
+			};
 			AddButton (cancel);
 			AddButton (cancel);
 
 
 			this.prompt = new Button (prompt) {
 			this.prompt = new Button (prompt) {