Преглед изворни кода

1、添加消息重复判断

litong пре 6 месеци
родитељ
комит
fb188cfedf

+ 13 - 1
CollaborativePlatformMain/Form/MessageSubPage/Project/NewProjrctPage.xaml.cs

@@ -156,7 +156,19 @@ namespace CollaborativePlatformMain.Form.MessageSubPage.Project
                 {
                     foreach (var item in BuildNames)
                     {
-                        SeconMessagePage.MessageDatas[i].ThreeNodes.Add(projectName + item + "更新");
+                        string addStringName = projectName + item + "更新";
+                        bool isExisteThree = false;
+                        foreach (var threeNode in SeconMessagePage.MessageDatas[i].ThreeNodes)
+                        {
+                            if (addStringName.Equals(threeNode))
+                            {
+                                isExisteThree = true;
+                            }
+                        }
+                        if (!isExisteThree)
+                        {
+                            SeconMessagePage.MessageDatas[i].ThreeNodes.Add(addStringName);
+                        }
                     }
                     isExisteSecon = true;
                     break;

+ 12 - 1
CollaborativePlatformMain/Form/MessageSubPage/Project/OperatingFloorPage.xaml.cs

@@ -212,7 +212,18 @@ namespace CollaborativePlatformMain.Form.MessageSubPage.Project
                     {
                         foreach (var item in UploadDrawingForm.ArchLayerDatas)
                         {
-                            messageData.ThreeNodes.Add(projectName + budingName + item.FloorName + "更新");
+                            string newProjectName = projectName + budingName + item.FloorName + "更新";
+                            bool isExProjectThree = false;
+                            foreach (var threeNode in messageData.ThreeNodes)
+                            {
+                                if (threeNode.Equals(newProjectName))
+                                {
+                                    isExProjectThree = true;
+                                    break;
+                                }
+                            }
+                            if (!isExProjectThree) messageData.ThreeNodes.Add(newProjectName);
+                           
                         }
 
                     }