chr
7 天以前 43a0207d207390abdeeb3ab9155eebf03edd7b1a
PdmSwPlugin.PDM/PdmControl.xaml.cs
@@ -1038,14 +1038,8 @@
            ConcurrentDictionary<string, DrawInfo> result = new ConcurrentDictionary<string, DrawInfo>();
            PdmBom topBom = model.BomTree[0];
            CountdownEvent counter = new CountdownEvent(1);
            taskFactory.StartNew(() =>
            {
                GetAllByTask(new object[] {
                topBom, result, counter, ErrMsgs, 0 });
            });
            GetAllByTask(new object[] { topBom, result, counter, ErrMsgs, 0 });
            counter.Wait();
            // 不需要手动释放
            //counter.Dispose();
            return new Dictionary<string, DrawInfo>(result);
        }
@@ -1061,7 +1055,7 @@
            int level = (int)datas[4];
            try
            {
                counter.TryAddCount();
                counter.AddCount();
                string filepath = bom.partNo;
                lock (result)
                {
@@ -1616,6 +1610,8 @@
        /// <exception cref="Exception"></exception>
        private void UploadSingleDraw(DrawAuditOrder daOrder, PdmBom bom, bool justUpload)
        {
            try
            {
            string d3FilePath = bom.d3FilePath;
            string d2FilePath = d3FilePath.Replace(Path.GetExtension(d3FilePath), ".slddrw");
            if (string.IsNullOrEmpty(d3FilePath) || !File.Exists(d3FilePath))
@@ -1643,6 +1639,11 @@
            Result<DrawAudit> res = Client.PostSyncAction<DrawAudit>("drawAudit/add", httpContent);
            DrawAudit da = res.HandleResult();
        }
            catch (NullReferenceException nex)
            {
                Logger.Error($"UploadSingleDraw NullReferenceException.", nex);
            }
        }
        private void Exclude_Click(object sender, RoutedEventArgs e)
        {