PowerArgs.Cli.Dialog.ConfirmYesOrNo C# (CSharp) Method

ConfirmYesOrNo() public static method

public static ConfirmYesOrNo ( ConsoleString message, System.Action yesCallback, System.Action noCallback = null, int maxHeight = 10 ) : void
message ConsoleString
yesCallback System.Action
noCallback System.Action
maxHeight int
return void
        public static void ConfirmYesOrNo(ConsoleString message, Action yesCallback, Action noCallback = null, int maxHeight = 10)
        {
            ShowMessage(message, (b) =>
            {
                if (b != null && b.Id == "y")
                {
                    yesCallback();
                }
                else if (noCallback != null)
                {
                    noCallback();
                }
            }, true, maxHeight, new DialogButton() { Id = "y", DisplayText = "Yes", }, new DialogButton() { Id = "n", DisplayText = "No" });
        }

Same methods

Dialog::ConfirmYesOrNo ( string message, System.Action yesCallback, System.Action noCallback = null, int maxHeight = 10 ) : void