5
MonoMacにはMessageBox.Show()
と同等のものがありますか、それともこの目的のために特別なポップアップクラスを作成する必要がありますか?MonoCodeにMessageBox.Show()equivelantはありますか
MonoMacにはMessageBox.Show()
と同等のものがありますか、それともこの目的のために特別なポップアップクラスを作成する必要がありますか?MonoCodeにMessageBox.Show()equivelantはありますか
あなたはNSAlertを探しています。これはMessageBoxとほぼ同じです。
NSAlert.RunModal()を使用してNSAlertを表示したり、特定のウィンドウにシートとして表示したい場合はNSAlert.BeginSheet()を使用できます。
var alert = new NSAlert {
MessageText = "Hello, this is an alert!",
AlertStyle = NSAlertStyle.Informational
};
alert.AddButton ("OK");
alert.AddButton ("Cancel");
var returnValue = alert.RunModal();
// returnValue will be 1000 for OK, 1001 for Cancel
あなたはここにMonoMacの観点から、もう少しそれを使用する方法を見てとることができます。
https://github.com/picoe/Eto/blob/master/Source/Eto.Platform.Mac/Forms/MessageBoxHandler.cs