终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 line
1.2 KiB

  1. using BPA.Helper;
  2. using System.Windows;
  3. using System.Windows.Controls;
  4. namespace BPASmartClient.Academy.View
  5. {
  6. /// <summary>
  7. /// RecipeSettingsView.xaml 的交互逻辑
  8. /// </summary>
  9. public partial class RecipeSettingsView : UserControl
  10. {
  11. public RecipeSettingsView()
  12. {
  13. InitializeComponent();
  14. this.Unloaded += RecipeSettingsView_Unloaded;
  15. }
  16. private void RecipeSettingsView_Unloaded(object sender, RoutedEventArgs e)
  17. {
  18. Json<LocalRecipe>.Save();
  19. }
  20. //public static void SetAlignment()
  21. //{
  22. // //获取系统是以Left-handed(true)还是Right-handed(false)
  23. // var ifLeft = SystemParameters.MenuDropAlignment;
  24. // if (ifLeft)
  25. // {
  26. // Console.WriteLine($"系统为左撇子,转换为右撇子。");
  27. // // change to false
  28. // var t = typeof(SystemParameters);
  29. // var field = t.GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static);
  30. // field.SetValue(null, false);
  31. // ifLeft = SystemParameters.MenuDropAlignment;
  32. // }
  33. //}
  34. }
  35. }