示例#1
0
        public async Task <bool> ShowYesNoMessageBox(string _title, string _message)
        {
            YesNoMessageBoxEventArgs yesNoMessageBoxEventArgs = new YesNoMessageBoxEventArgs();

            yesNoMessageBoxEventArgs.Message = _message;
            yesNoMessageBoxEventArgs.Title   = _title;

            if (ShowYesNoMessageBoxRequested != null)
            {
                await ShowYesNoMessageBoxRequested(this, yesNoMessageBoxEventArgs);
            }

            return(yesNoMessageBoxEventArgs.answer);
        }
示例#2
0
        private async Task <bool> ShowYesNOMessageBoxEventHandler(object sender, YesNoMessageBoxEventArgs args)
        {
            args.answer = await ShowYesNoMessageBox(args.Title, args.Message);

            return(true);
        }