WpfCefJSConfirm.xaml.cs 974 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Shapes;
  13. namespace Xilium.CefGlue.WPF
  14. {
  15. /// <summary>
  16. /// Interaction logic for WpfCefJSConfirm.xaml
  17. /// </summary>
  18. public partial class WpfCefJSConfirm : Window
  19. {
  20. public WpfCefJSConfirm(string message)
  21. {
  22. InitializeComponent();
  23. this.messageTextBlock.Text = message;
  24. }
  25. private void OkButton_Click(object sender, RoutedEventArgs e)
  26. {
  27. this.DialogResult = true;
  28. this.Close();
  29. }
  30. private void CancelButton_Click(object sender, RoutedEventArgs e)
  31. {
  32. this.DialogResult = false;
  33. this.Close();
  34. }
  35. }
  36. }