예제 #1
0
        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);
        }
예제 #2
0
        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;
        }