public AskResult AskSaveOrCancel() { var dialog = new YesNoCancelDialog("Question", "Do you want to save the project first?"); dialog.TransientFor = this; var result = dialog.Run(); dialog.Destroy(); if (result == (int)ResponseType.Yes) { return(AskResult.Yes); } else if (result == (int)ResponseType.No) { return(AskResult.No); } return(AskResult.Cancel); }
public AskResult AskSaveOrCancel () { var dialog = new YesNoCancelDialog ("Question", "Do you want to save the project first?"); dialog.TransientFor = this; var result = dialog.Run (); dialog.Destroy (); if (result == (int)ResponseType.Yes) return AskResult.Yes; else if (result == (int)ResponseType.No) return AskResult.No; return AskResult.Cancel; }