SuspensionForm.xaml.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using CollaborativePlatformMain.DFEntity.MessageSubUtil;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  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.Shapes;
  15. namespace CollaborativePlatformMain.Form.MessageSubPage
  16. {
  17. /// <summary>
  18. /// SuspensionForm.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class SuspensionForm : Window
  21. {
  22. /// <summary>
  23. /// 父级窗体
  24. /// </summary>
  25. public SeconToolLibraryPage SeconToolLibraryPage;
  26. /// <summary>
  27. /// 工具数据
  28. /// </summary>
  29. public List<ToolFunctionEntity> ToolFunctionEntities = new List<ToolFunctionEntity>();
  30. /// <summary>
  31. /// 工具栏悬浮窗
  32. /// </summary>
  33. /// <param name="toolFunctionEntities"></param>
  34. public SuspensionForm(SeconToolLibraryPage seconToolLibraryPage, List<ToolFunctionEntity> toolFunctionEntities)
  35. {
  36. InitializeComponent();
  37. SeconToolLibraryPage = seconToolLibraryPage;
  38. ToolFunctionEntities = toolFunctionEntities;
  39. }
  40. /// <summary>
  41. /// 窗体初始化
  42. /// </summary>
  43. /// <param name="sender"></param>
  44. /// <param name="e"></param>
  45. private void Window_Loaded(object sender, RoutedEventArgs e)
  46. {
  47. sv_legend.ItemsSource = null;
  48. sv_legend.ItemsSource = ToolFunctionEntities;
  49. }
  50. /// <summary>
  51. /// 点击事件
  52. /// </summary>
  53. /// <param name="sender"></param>
  54. /// <param name="e"></param>
  55. private void DockPanel_MouseDown(object sender, MouseButtonEventArgs e)
  56. {
  57. }
  58. /// <summary>
  59. /// 更新数据
  60. /// </summary>
  61. /// <param name="toolFunctionEntities"></param>
  62. public void SetToolEntity(List<ToolFunctionEntity> toolFunctionEntities)
  63. {
  64. sv_legend.ItemsSource = null;
  65. sv_legend.ItemsSource = toolFunctionEntities;
  66. }
  67. /// <summary>
  68. /// 窗体关闭事件
  69. /// </summary>
  70. /// <param name="sender"></param>
  71. /// <param name="e"></param>
  72. private void Window_Closed(object sender, EventArgs e)
  73. {
  74. SeconToolLibraryPage.BaseForm = null;
  75. }
  76. }
  77. }