FullProfessionPage.xaml.cs 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. using CollaborativePlatformMain.CADStartUtil;
  2. using CollaborativePlatformMain.DFEntity.MessageSubUtil;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Shapes;
  16. namespace CollaborativePlatformMain.Form.MessageSubPage
  17. {
  18. /// <summary>
  19. /// FullProfessionPage.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class FullProfessionPage : Page
  22. {
  23. /// <summary>
  24. /// 父级窗体
  25. /// </summary>
  26. public HomepageForm HomepageForm;
  27. public FullProfessionPage(HomepageForm homepageForm)
  28. {
  29. InitializeComponent();
  30. HomepageForm = homepageForm;
  31. }
  32. private void tr_threemodel_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  33. {
  34. int a = 1;
  35. }
  36. /// <summary>
  37. /// 建筑-鼠标点击事件
  38. /// </summary>
  39. /// <param name="sender"></param>
  40. /// <param name="e"></param>
  41. private void tb_arch_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  42. {
  43. // 创建新的列定义
  44. ColumnDefinition colDef1 = new ColumnDefinition();
  45. colDef1.Width = new GridLength(3, GridUnitType.Star);
  46. ColumnDefinition colDef2 = new ColumnDefinition();
  47. colDef2.Width = new GridLength(1, GridUnitType.Star);
  48. ColumnDefinition colDef3 = new ColumnDefinition();
  49. colDef3.Width = new GridLength(1, GridUnitType.Star);
  50. ColumnDefinition colDef4 = new ColumnDefinition();
  51. colDef4.Width = new GridLength(1, GridUnitType.Star);
  52. ColumnDefinition colDef5 = new ColumnDefinition();
  53. colDef5.Width = new GridLength(1, GridUnitType.Star);
  54. // 清除旧的列定义
  55. gridName.ColumnDefinitions.Clear();
  56. // 添加到Grid中
  57. gridName.ColumnDefinitions.Add(colDef1);
  58. gridName.ColumnDefinitions.Add(colDef2);
  59. gridName.ColumnDefinitions.Add(colDef3);
  60. gridName.ColumnDefinitions.Add(colDef4);
  61. gridName.ColumnDefinitions.Add(colDef5);
  62. }
  63. /// <summary>
  64. /// 结构-鼠标点击事件
  65. /// </summary>
  66. /// <param name="sender"></param>
  67. /// <param name="e"></param>
  68. private void tb_stru_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  69. {
  70. // 创建新的列定义
  71. ColumnDefinition colDef1 = new ColumnDefinition();
  72. colDef1.Width = new GridLength(1, GridUnitType.Star);
  73. ColumnDefinition colDef2 = new ColumnDefinition();
  74. colDef2.Width = new GridLength(3, GridUnitType.Star);
  75. ColumnDefinition colDef3 = new ColumnDefinition();
  76. colDef3.Width = new GridLength(1, GridUnitType.Star);
  77. ColumnDefinition colDef4 = new ColumnDefinition();
  78. colDef4.Width = new GridLength(1, GridUnitType.Star);
  79. ColumnDefinition colDef5 = new ColumnDefinition();
  80. colDef5.Width = new GridLength(1, GridUnitType.Star);
  81. // 清除旧的列定义
  82. gridName.ColumnDefinitions.Clear();
  83. // 添加到Grid中
  84. gridName.ColumnDefinitions.Add(colDef1);
  85. gridName.ColumnDefinitions.Add(colDef2);
  86. gridName.ColumnDefinitions.Add(colDef3);
  87. gridName.ColumnDefinitions.Add(colDef4);
  88. gridName.ColumnDefinitions.Add(colDef5);
  89. }
  90. /// <summary>
  91. /// 给排水-鼠标点击事件
  92. /// </summary>
  93. /// <param name="sender"></param>
  94. /// <param name="e"></param>
  95. private void tb_water_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  96. {
  97. // 创建新的列定义
  98. ColumnDefinition colDef1 = new ColumnDefinition();
  99. colDef1.Width = new GridLength(1, GridUnitType.Star);
  100. ColumnDefinition colDef2 = new ColumnDefinition();
  101. colDef2.Width = new GridLength(1, GridUnitType.Star);
  102. ColumnDefinition colDef3 = new ColumnDefinition();
  103. colDef3.Width = new GridLength(3, GridUnitType.Star);
  104. ColumnDefinition colDef4 = new ColumnDefinition();
  105. colDef4.Width = new GridLength(1, GridUnitType.Star);
  106. ColumnDefinition colDef5 = new ColumnDefinition();
  107. colDef5.Width = new GridLength(1, GridUnitType.Star);
  108. // 清除旧的列定义
  109. gridName.ColumnDefinitions.Clear();
  110. // 添加到Grid中
  111. gridName.ColumnDefinitions.Add(colDef1);
  112. gridName.ColumnDefinitions.Add(colDef2);
  113. gridName.ColumnDefinitions.Add(colDef3);
  114. gridName.ColumnDefinitions.Add(colDef4);
  115. gridName.ColumnDefinitions.Add(colDef5);
  116. }
  117. /// <summary>
  118. /// 暖通-鼠标点击事件
  119. /// </summary>
  120. /// <param name="sender"></param>
  121. /// <param name="e"></param>
  122. private void tb_warm_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  123. {
  124. // 创建新的列定义
  125. ColumnDefinition colDef1 = new ColumnDefinition();
  126. colDef1.Width = new GridLength(1, GridUnitType.Star);
  127. ColumnDefinition colDef2 = new ColumnDefinition();
  128. colDef2.Width = new GridLength(1, GridUnitType.Star);
  129. ColumnDefinition colDef3 = new ColumnDefinition();
  130. colDef3.Width = new GridLength(1, GridUnitType.Star);
  131. ColumnDefinition colDef4 = new ColumnDefinition();
  132. colDef4.Width = new GridLength(3, GridUnitType.Star);
  133. ColumnDefinition colDef5 = new ColumnDefinition();
  134. colDef5.Width = new GridLength(1, GridUnitType.Star);
  135. // 清除旧的列定义
  136. gridName.ColumnDefinitions.Clear();
  137. // 添加到Grid中
  138. gridName.ColumnDefinitions.Add(colDef1);
  139. gridName.ColumnDefinitions.Add(colDef2);
  140. gridName.ColumnDefinitions.Add(colDef3);
  141. gridName.ColumnDefinitions.Add(colDef4);
  142. gridName.ColumnDefinitions.Add(colDef5);
  143. }
  144. /// <summary>
  145. /// 电气-鼠标点击事件
  146. /// </summary>
  147. /// <param name="sender"></param>
  148. /// <param name="e"></param>
  149. private void tb_ele_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  150. {
  151. // 创建新的列定义
  152. ColumnDefinition colDef1 = new ColumnDefinition();
  153. colDef1.Width = new GridLength(1, GridUnitType.Star);
  154. ColumnDefinition colDef2 = new ColumnDefinition();
  155. colDef2.Width = new GridLength(1, GridUnitType.Star);
  156. ColumnDefinition colDef3 = new ColumnDefinition();
  157. colDef3.Width = new GridLength(1, GridUnitType.Star);
  158. ColumnDefinition colDef4 = new ColumnDefinition();
  159. colDef4.Width = new GridLength(1, GridUnitType.Star);
  160. ColumnDefinition colDef5 = new ColumnDefinition();
  161. colDef5.Width = new GridLength(3, GridUnitType.Star);
  162. // 清除旧的列定义
  163. gridName.ColumnDefinitions.Clear();
  164. // 添加到Grid中
  165. gridName.ColumnDefinitions.Add(colDef1);
  166. gridName.ColumnDefinitions.Add(colDef2);
  167. gridName.ColumnDefinitions.Add(colDef3);
  168. gridName.ColumnDefinitions.Add(colDef4);
  169. gridName.ColumnDefinitions.Add(colDef5);
  170. }
  171. /// <summary>
  172. /// 点击事件
  173. /// </summary>
  174. /// <param name="sender"></param>
  175. /// <param name="e"></param>
  176. private void cb_Check_Checked(object sender, RoutedEventArgs e)
  177. {
  178. }
  179. /// <summary>
  180. /// 鼠标点击事件
  181. /// </summary>
  182. /// <param name="sender"></param>
  183. /// <param name="e"></param>
  184. private void Label_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  185. {
  186. Label label = sender as Label;
  187. if (label == null) return;
  188. OperatEntity operatEntity = label.DataContext as OperatEntity;
  189. if (operatEntity == null) return;
  190. if (operatEntity.DrawPath != null && operatEntity.DrawPath != "")
  191. {
  192. OpenDrawPathData openDrawPathData = new OpenDrawPathData(true, operatEntity.DrawPath);
  193. StartCADUtil.StartCADMath(false, openDrawPathData);
  194. }
  195. }
  196. }
  197. }