示例#1
0
        private void btnYesNoCancel_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxYesNoCancel messageBoxYesNoCancel = new MessageBoxYesNoCancel("Test Yes& No", "This is Yes & No Test .....", 200, 500, @"/Images/MessageBoxIcons/Information.png", @"/Images/MessageBoxIcons/Information.png");

            messageBoxYesNoCancel.Owner = this;
            messageBoxYesNoCancel.ShowDialog();

            if (messageBoxYesNoCancel.DialogResultRetern == "yes")
            {
                MessageBox.Show("Retern yes");
            }
            else if (messageBoxYesNoCancel.DialogResultRetern == "no")
            {
                MessageBox.Show("Retern no");
            }
            else
            {
                MessageBox.Show("Retern cancel");
            }
        }
示例#2
0
        private void btnMBYesNoCancel_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxYesNoCancel messageBoxYesNoCancel = new MessageBoxYesNoCancel("Ask For 3 Aproval..", "This is Need Aproval 3 ..........?", 200, 500, @"/Images/error.png", @"/Images/error.png");

            messageBoxYesNoCancel.Owner = this;
            messageBoxYesNoCancel.ShowDialog();

            if (messageBoxYesNoCancel.DialogResultRetern == "yes")
            {
                lblYesNoCancelRetern.Content = "Retern Yes :) ";
            }
            else if (messageBoxYesNoCancel.DialogResultRetern == "no")
            {
                lblYesNoCancelRetern.Content = "Retern No :( ";
            }
            else
            {
                lblYesNoCancelRetern.Content = "Retern Cancel :'( ";
            }
        }