SeconContactsPage.xaml.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. /// SeconContactsPage.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class SeconContactsPage : Page
  21. {
  22. /// <summary>
  23. /// 父级窗体
  24. /// </summary>
  25. public HomepageForm Homepage;
  26. public SeconContactsPage(HomepageForm homepage)
  27. {
  28. InitializeComponent();
  29. Homepage = homepage;
  30. }
  31. /// <summary>
  32. /// 窗体初始化
  33. /// </summary>
  34. /// <param name="sender"></param>
  35. /// <param name="e"></param>
  36. private void Window_Loaded(object sender, RoutedEventArgs e)
  37. {
  38. List<ContactsUtil> contactsUtils = new List<ContactsUtil>();
  39. //建筑
  40. ContactsUtil archSubData1 = new ContactsUtil("1", "建筑-伙计1");
  41. ContactsUtil archSubData2 = new ContactsUtil("2", "建筑-伙计2");
  42. ContactsUtil archSubData3 = new ContactsUtil("3", "建筑-伙计3");
  43. ContactsUtil archSubData4 = new ContactsUtil("4", "建筑-伙计4");
  44. ContactsUtil archSubData5 = new ContactsUtil("5", "建筑-伙计5");
  45. ContactsUtil archData = new ContactsUtil("1", "建筑组", new List<ContactsUtil>() { archSubData1, archSubData2, archSubData3, archSubData4, archSubData5 });
  46. contactsUtils.Add(archData) ;
  47. //结构
  48. ContactsUtil struSubData1 = new ContactsUtil("1", "结构-伙计1");
  49. ContactsUtil struSubData2 = new ContactsUtil("2", "结构-伙计2");
  50. ContactsUtil struSubData3 = new ContactsUtil("3", "结构-伙计3");
  51. ContactsUtil struSubData4 = new ContactsUtil("4", "结构-伙计4");
  52. ContactsUtil struSubData5 = new ContactsUtil("5", "结构-伙计5");
  53. ContactsUtil struData = new ContactsUtil("1", "结构组", new List<ContactsUtil>() { struSubData1, struSubData2, struSubData3, struSubData4, struSubData5 });
  54. contactsUtils.Add(struData);
  55. //给排水
  56. ContactsUtil waterSubData1 = new ContactsUtil("1", "给排水-伙计1");
  57. ContactsUtil waterSubData2 = new ContactsUtil("2", "给排水-伙计2");
  58. ContactsUtil waterSubData3 = new ContactsUtil("3", "给排水-伙计3");
  59. ContactsUtil waterSubData4 = new ContactsUtil("4", "给排水-伙计4");
  60. ContactsUtil waterSubData5 = new ContactsUtil("5", "给排水-伙计5");
  61. ContactsUtil waterData = new ContactsUtil("1", "给排水组", new List<ContactsUtil>() { waterSubData1, waterSubData2, waterSubData3, waterSubData4, waterSubData5 });
  62. contactsUtils.Add(waterData);
  63. //暖通
  64. ContactsUtil warmSubData1 = new ContactsUtil("1", "暖通-伙计1");
  65. ContactsUtil warmSubData2 = new ContactsUtil("2", "暖通-伙计2");
  66. ContactsUtil warmSubData3 = new ContactsUtil("3", "暖通-伙计3");
  67. ContactsUtil warmSubData4 = new ContactsUtil("4", "暖通-伙计4");
  68. ContactsUtil warmSubData5 = new ContactsUtil("5", "暖通-伙计5");
  69. ContactsUtil warmData = new ContactsUtil("1", "暖通组", new List<ContactsUtil>() { warmSubData1, warmSubData2, warmSubData3, warmSubData4, warmSubData5 });
  70. contactsUtils.Add(warmData);
  71. //电气
  72. ContactsUtil eleSubData1 = new ContactsUtil("1", "电气-伙计1");
  73. ContactsUtil eleSubData2 = new ContactsUtil("2", "电气-伙计2");
  74. ContactsUtil eleSubData3 = new ContactsUtil("3", "电气-伙计3");
  75. ContactsUtil eleSubData4 = new ContactsUtil("4", "电气-伙计4");
  76. ContactsUtil eleSubData5 = new ContactsUtil("5", "电气-伙计5");
  77. ContactsUtil eleData = new ContactsUtil("1", "电气组", new List<ContactsUtil>() { eleSubData1, eleSubData2, eleSubData3, eleSubData4, eleSubData5 });
  78. contactsUtils.Add(eleData);
  79. tr_Contacts.ItemsSource = null;
  80. tr_Contacts.ItemsSource = contactsUtils;
  81. }
  82. private void tv_projectLeftButtonUp(object sender, MouseButtonEventArgs e)
  83. {
  84. }
  85. }
  86. }