public DialogResult Show(IWindow parent) { var window = parent as WinFormsWindow; if (parent != null && window == null) { throw new ArgumentException("Invalid window type.", nameof(parent)); } System.Windows.Forms.DialogResult result; if (window == null) { result = MessageBox.Show( Message, Title, WinFormsMapper.MapButtons(Buttons)); } else { result = MessageBox.Show( window, Message, Title, WinFormsMapper.MapButtons(Buttons)); } return(WinFormsMapper.MapResult(result)); }
public DialogResult Show(IWindow parent) { var window = NativeCast.To <WinFormsWindow>(parent); System.Windows.Forms.DialogResult result; if (window == null) { result = WFMessageBox.Show( Message, Title, WinFormsMapper.MapButtons(Buttons)); } else { result = WFMessageBox.Show( window, Message, Title, WinFormsMapper.MapButtons(Buttons)); } return(WinFormsMapper.MapResult(result)); }