示例#1
0
        internal bool QueryCanClose()
        {
            ConfirmationResult result = application.AskConfirmation(ConfirmationType.NeedSaveChanges);

            if (result == ConfirmationResult.Cancel)
            {
                return(false);
            }
            if (result == ConfirmationResult.Yes)
            {
                SaveDocument();
            }
            return(true);
        }