OverView.xaml.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. using System.Windows.Media;
  4. namespace Venus_MainPages.Views
  5. {
  6. /// <summary>
  7. /// OverView.xaml 的交互逻辑
  8. /// </summary>
  9. public partial class OverView : UserControl
  10. {
  11. public OverView()
  12. {
  13. InitializeComponent();
  14. fl1.IsFlowing = true;
  15. fl1.FlowColor = new SolidColorBrush(Colors.Red);
  16. fl2.IsFlowing = true;
  17. fl3.IsFlowing = true;
  18. fl4.IsFlowing = true;
  19. flv.IsOpen = false;
  20. }
  21. bool isreserve;
  22. private void Button_Click(object sender, RoutedEventArgs e)
  23. {
  24. fl1.IsFlowing = !fl1.IsFlowing;
  25. fl2.IsFlowing = !fl2.IsFlowing;
  26. fl3.IsFlowing = !fl3.IsFlowing;
  27. fl4.IsFlowing = !fl4.IsFlowing;
  28. flv.IsOpen = !flv.IsOpen;
  29. }
  30. private void Button_Click_1(object sender, RoutedEventArgs e)
  31. {
  32. if (isreserve == true)
  33. {
  34. fl1.FlowDirection = FlowDirection.LeftToRight;
  35. fl2.FlowDirection = FlowDirection.LeftToRight;
  36. fl3.FlowDirection = FlowDirection.LeftToRight;
  37. fl4.FlowDirection = FlowDirection.LeftToRight;
  38. }
  39. else
  40. {
  41. fl1.FlowDirection = FlowDirection.RightToLeft;
  42. fl2.FlowDirection = FlowDirection.RightToLeft;
  43. fl3.FlowDirection = FlowDirection.RightToLeft;
  44. fl4.FlowDirection = FlowDirection.RightToLeft;
  45. }
  46. isreserve = !isreserve;
  47. }
  48. }
  49. }