终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

59 rindas
1.5 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. /// Interaction logic for MainWindow.xaml
  20. /// </summary>
  21. public partial class MainWindow : Window
  22. {
  23. public MainWindow()
  24. {
  25. InitializeComponent();
  26. }
  27. private void mylistview_MouseDown(object sender, MouseButtonEventArgs e)
  28. {
  29. this.DragMove();
  30. }
  31. private void Button_Click(object sender, RoutedEventArgs e)
  32. {
  33. this.Close();
  34. }
  35. private void NavButton_Click(object sender, RoutedEventArgs e)
  36. {
  37. try
  38. {
  39. if (sender is RadioButton bt)
  40. {
  41. Type type = Type.GetType($"BPASmart.RecipeManagement.View.{bt.Tag?.ToString()}");
  42. ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes);
  43. contentRegion.Content = (FrameworkElement)cti.Invoke(null);
  44. }
  45. }
  46. catch (Exception ex)
  47. {
  48. }
  49. }
  50. }
  51. }