WinChangeState.xaml.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. using FWindSoft.Handle;
  15. namespace Test.Pager
  16. {
  17. /// <summary>
  18. /// WinChangeState.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class WinChangeState : Window
  21. {
  22. public WinChangeState()
  23. {
  24. InitializeComponent();
  25. }
  26. private void Button_Click(object sender, RoutedEventArgs e)
  27. {
  28. WizardState rootState = new WizardState("Root",(s) =>
  29. {
  30. var ss = MessageBox.Show(s.ToString(),"cccc",MessageBoxButton.YesNoCancel);
  31. return ss.ToString();
  32. });
  33. rootState.AddState(MessageBoxResult.Yes.ToString(), rootState);
  34. rootState.AddState(MessageBoxResult.No.ToString(), rootState);
  35. rootState.Execute("cccc");
  36. }
  37. }
  38. }