프로젝트

일반

사용자정보

개정판 72424099

ID724240998dea9da5d5d472c8292b957d2b3a4f9b
상위 ac4f1e13
하위 366f00c2

김태성이(가) 약 5년 전에 추가함

Markus.ImageComparer/ImageComparerBase.cs Parallel.ForEach 제거

Change-Id: I2875826245d2ce1530ffb6ffe712615d17b4a36e

차이점 보기:

KCOM_API/ServiceDeepView.svc.cs
229 229
        [OperationContract]
230 230
        public List<Rect> GetCompareRect(string projectNo, string originDocItem_ID, string targetDocItem_ID, string originPageNo, string targetPageNo, string isInternalAddress)
231 231
        {
232
      
233 232
            List<Rect> result = new List<Rect>();
234 233

  
235
            string originFile = "";
236
            string targetFile = "";
234
            try
235
            {
236
                string originFile = "";
237
                string targetFile = "";
237 238

  
238
            string sOriginFolder = originDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(originDocItem_ID) / 100).ToString() : (originDocItem_ID.Length >= 5 ? originDocItem_ID.Substring(0, 5) : originDocItem_ID);
239
            string sTagetFolder = targetDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(targetDocItem_ID) / 100).ToString() : (targetDocItem_ID.Length >= 5 ? targetDocItem_ID.Substring(0, 5) : targetDocItem_ID);
239
                string sOriginFolder = originDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(originDocItem_ID) / 100).ToString() : (originDocItem_ID.Length >= 5 ? originDocItem_ID.Substring(0, 5) : originDocItem_ID);
240
                string sTagetFolder = targetDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(targetDocItem_ID) / 100).ToString() : (targetDocItem_ID.Length >= 5 ? targetDocItem_ID.Substring(0, 5) : targetDocItem_ID);
240 241

  
241
            if (Boolean.Parse(isInternalAddress))
242
            {
243
                originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sOriginFolder, originDocItem_ID, originPageNo);
244
                targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sTagetFolder, targetDocItem_ID, targetPageNo);
245
            }
246
            else
247
            {
248
                originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo,  originDocItem_ID, originPageNo);
249
                targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo,  targetDocItem_ID, targetPageNo);
250
            }
242
                if (Boolean.Parse(isInternalAddress))
243
                {
244
                    originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sOriginFolder, originDocItem_ID, originPageNo);
245
                    targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sTagetFolder, targetDocItem_ID, targetPageNo);
246
                }
247
                else
248
                {
249
                    originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, originDocItem_ID, originPageNo);
250
                    targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, targetDocItem_ID, targetPageNo);
251
                }
251 252

  
252
            using (Markus.Image.ImageComparer compareLib = new Markus.Image.ImageComparer())
253
                using (Markus.Image.ImageComparer compareLib = new Markus.Image.ImageComparer())
254
                {
255
                    result = compareLib.CompareReturnRects(originFile, targetFile, new System.Drawing.Size(20, 20));
256
                }
257
            }
258
            catch (Exception ex)
253 259
            {
254
                result = compareLib.CompareReturnRects(originFile, targetFile, new System.Drawing.Size(20, 20));
260
                //throw new FaultException(ex.ToString() + " Inner Exception : " + ex.InnerException?.ToString());
255 261
            }
262
      
256 263

  
257 264
            return result;
258 265
        }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)