我正在使用Modern UI並嘗試創建一個對話框,詢問問題然後等待響應。我可以用messagebox做到這一點,但儘管我會嘗試使用現代UI。我不確定如何獲得按鈕的點擊值。現代UI對話結果問題
if (testapp.linkvalue != "NULL")
{
var v = new ModernDialog
{
Title = "my test",
Content = "pewpew lazers rule. If you agree click ok"
};
v.Buttons = new Button[] { v.OkButton, v.CancelButton };
var r = v.ShowDialog();
if (????????????????)
{
MessageBox.Show("ok was clicked");
}
else
{
MessageBox.Show("cancel was clicked");
}
}
是做到了完美。謝謝你,本週早些時候我放棄了希望。 –