public static Confirm ( IPanel parent, String caption, String title = null ) : bool | ||
parent | IPanel | parent scanner |
caption | String | prompt string |
title | String | title of the dialog |
return | bool |
public static bool Confirm(IPanel parent, String caption, String title = null)
{
bool retVal = false;
Form form = initYesNoDialog(title, caption);
if (form != null)
{
Context.AppPanelManager.ShowDialog(parent, form as IPanel);
if (form is IExtension)
{
var invoker = (form as IExtension).GetInvoker();
bool? yesNo = invoker != null ? invoker.GetBoolValue("Choice").Value : false;
retVal = (yesNo != null) ? yesNo.Value : false;
}
}
return retVal;
}