终端一体化运控平台
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.
 
 
 

52 regels
1.3 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace BPASmart.RecipeManagement
  17. {
  18. /// <summary>
  19. /// MainControl.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class MainControl : UserControl
  22. {
  23. public MainControl()
  24. {
  25. InitializeComponent();
  26. }
  27. private void mylistview_MouseDown(object sender, MouseButtonEventArgs e)
  28. {
  29. }
  30. private void NavButton_Click(object sender, RoutedEventArgs e)
  31. {
  32. try
  33. {
  34. if (sender is RadioButton bt)
  35. {
  36. Type type = Type.GetType($"BPASmart.RecipeManagement.View.{bt.Tag?.ToString()}");
  37. ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes);
  38. contentRegion.Content = (FrameworkElement)cti.Invoke(null);
  39. }
  40. }
  41. catch (Exception ex)
  42. {
  43. }
  44. }
  45. }
  46. }