【发布时间】:2015-10-21 02:01:42
【问题描述】:
我正在尝试覆盖 Gtk.Window 关闭事件,以便在设置了某个布尔值时向用户显示对话框。尽管布尔值为真,但我的应用程序退出而不显示对话框。我尝试打印出布尔值。是正确的。
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Console.WriteLine (bval);
if (bval == true) {
mynot notification=new mynot(this);
notification.Show ();
}
else
{
Gtk.Application.Quit ();
a.RetVal = true;
}
}
【问题讨论】: