ouruisong преди 6 месеца
родител
ревизия
e1b59d137e

+ 7 - 0
CollaborativePlatformMain/CollaborativePlatformMain.csproj

@@ -106,6 +106,10 @@
     <Reference Include="System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Drawing.Common.8.0.3\lib\net462\System.Drawing.Common.dll</HintPath>
     </Reference>
+    <Reference Include="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>SystemLibrary\Other\System.Windows.Forms.dll</HintPath>
+    </Reference>
     <Reference Include="System.Xml">
       <Private>True</Private>
     </Reference>
@@ -427,6 +431,9 @@
     <Content Include="SystemLibrary\CAD\CADNETCommon2019.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="SystemLibrary\Other\System.Windows.Forms.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 9 - 3
CollaborativePlatformMain/DFEntity/FloorLayerData.cs

@@ -46,22 +46,26 @@ namespace CollaborativePlatformMain.DFEntity
         /// 楼层管理器
         /// </summary>
         /// <param name="floorName"></param>
+        /// <param name="floorName"></param>
         /// <param name="subDatas"></param>
-        public FloorLayerData(string floorName, List<FloorLayerData> subDatas) 
+        public FloorLayerData(string floorName, string dWGPath, List<FloorLayerData> subDatas)
         {
             FloorName = floorName;
             SubDatas = subDatas;
         }
 
 
-
-
         /// <summary>
         /// 楼层名称
         /// </summary>
         public string FloorName { get; set; }
 
         /// <summary>
+        /// 图纸地址
+        /// </summary>
+        public string DWGPath { get; set; }
+
+        /// <summary>
         /// 图层数据
         /// </summary>
         public List<FloorLayerData> SubDatas { get; set; } = new List<FloorLayerData>();
@@ -71,5 +75,7 @@ namespace CollaborativePlatformMain.DFEntity
         /// </summary>
         public string LayerName { get; set; }
 
+
+
     }
 }

+ 2 - 2
CollaborativePlatformMain/Form/FloorDrawingForm.xaml.cs

@@ -63,7 +63,7 @@ namespace CollaborativePlatformMain.Form
                     num++;
                 }
 
-                FloorDatas.Add(new FloorLayerData("F" + i, layerDatas));
+                FloorDatas.Add(new FloorLayerData("F" + i, "", layerDatas));
             }
 
             sv_floor.ItemsSource = null;
@@ -135,7 +135,7 @@ namespace CollaborativePlatformMain.Form
                     num++;
                 }
 
-                warmDatas.Add(new FloorLayerData("F" + i, layerDatas));
+                warmDatas.Add(new FloorLayerData("F" + i, "", layerDatas));
             }
             UploadDrawingForm.WarmLayerDatas = warmDatas;
 

+ 17 - 2
CollaborativePlatformMain/Form/MessageSubPage/Project/OperatingFloorPage.xaml.cs

@@ -1,4 +1,6 @@
-using CollaborativePlatformMain.DFEntity.MessageSubUtil;
+using CollaborativePlatformMain.CADStartUtil;
+using CollaborativePlatformMain.DFEntity;
+using CollaborativePlatformMain.DFEntity.MessageSubUtil;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -111,8 +113,21 @@ namespace CollaborativePlatformMain.Form.MessageSubPage.Project
 
         }
 
+        /// <summary>
+        /// 点击事件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void tr_threemodel_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
         {
+            OperatEntity operatEntity = tr_threemodel.SelectedItem as OperatEntity;
+            if (operatEntity == null) return;
+            if (operatEntity.DrawPath != null && operatEntity.DrawPath != "")
+            {
+                OpenDrawPathData openDrawPathData = new OpenDrawPathData(true, operatEntity.DrawPath);
+
+                StartCADUtil.StartCADMath(false, openDrawPathData);
+            }
 
         }
 
@@ -193,7 +208,7 @@ namespace CollaborativePlatformMain.Form.MessageSubPage.Project
                     if (!projectName.Contains("项目")) projectName = projectName + "项目";
                     projectName = projectName + "建筑";
                     string secondeName = projectName + "图纸更新";
-                    if (messageData.SeconNode.Replace(" ", "").Equals(secondeName)) 
+                    if (messageData.SeconNode.Replace(" ", "").Equals(secondeName))
                     {
                         foreach (var item in UploadDrawingForm.ArchLayerDatas)
                         {

+ 2 - 2
CollaborativePlatformMain/Form/UploadDrawingForm.xaml.cs

@@ -171,7 +171,7 @@ namespace CollaborativePlatformMain.Form
                     fiveDatas.Add(new OperatEntity(layerData.LayerName, "", new ObservableCollection<OperatEntity>(), true));
                 }
 
-                fourDatas.Add(new OperatEntity(floorLayerData.FloorName, "", fiveDatas, false));
+                fourDatas.Add(new OperatEntity(floorLayerData.FloorName, floorLayerData.DWGPath, fiveDatas, false));
             }
             threeDatas.Add(new OperatEntity("分层图", "", fourDatas, false));
             twoDatas.Add(new OperatEntity("治理图纸", "", threeDatas, false));
@@ -307,7 +307,7 @@ namespace CollaborativePlatformMain.Form
                     layerDatas.Add(layerData);
                 }
 
-                warmDatas.Add(new FloorLayerData(ArchLayerDatas[i].FloorName, layerDatas));
+                warmDatas.Add(new FloorLayerData(ArchLayerDatas[i].FloorName, "", layerDatas));
             }
             WarmLayerDatas = warmDatas;
 

BIN
CollaborativePlatformMain/SystemLibrary/Other/System.Windows.Forms.dll