프로젝트

일반

사용자정보

개정판 adce8360

IDadce8360d7bd82414057d588ef7d318e8f92e030
상위 1483bb13
하위 5a6493ad

백흠경이(가) 5년 이상 전에 추가함

issue #932: Sync 페이지가 제대로 로딩되지 않는 부분 개선

Change-Id: Idc3764695ed1183f350e8f0358a5c36b6e0fac78

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
4125 4125

  
4126 4126
        private void SyncCompare_Click(object sender, RoutedEventArgs e)
4127 4127
        {
4128
            if (CompareMode.IsChecked)
4129
            {
4130
                if (ViewerDataModel.Instance.PageBalanceMode && ViewerDataModel.Instance.PageBalanceNumber == 0)
4131
                {
4132
                    ViewerDataModel.Instance.PageBalanceNumber = 1;
4133
                }
4134
                if (ViewerDataModel.Instance.PageNumber == 0)
4135
                {
4136
                    ViewerDataModel.Instance.PageNumber = 1;
4137
                }
4138

  
4139
                Logger.sendReqLog("GetCompareRectAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + CurrentRev.DOCUMENT_ID +
4140
                    "," + pageNavigator.CurrentPage.PageNumber.ToString() + "," + ViewerDataModel.Instance.PageNumber.ToString() + "," +
4141
                    userData.COMPANY != "EXT" ? "true" : "false", 1);
4142

  
4143
                BaseClient.GetCompareRectAsync(_ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber.ToString(), ViewerDataModel.Instance.PageNumber.ToString(), userData.COMPANY != "EXT" ? "true" : "false");
4144
            }
4145
            else
4146
            {
4147
                da.From = 1;
4148
                da.To = 1;
4149
                da.Duration = new Duration(TimeSpan.FromSeconds(9999));
4150
                da.AutoReverse = false;
4151
                canvas_compareBorder.Children.Clear();
4152
                canvas_compareBorder.BeginAnimation(OpacityProperty, da);
4153
            }
4128
            SetCompareRect();
4154 4129
        }
4155 4130

  
4156 4131
        private void Sync_Click(object sender, RoutedEventArgs e)
......
4380 4355
            }
4381 4356
        }
4382 4357

  
4358
        /// <summary>
4359
        /// Compare된 영역을 초기화
4360
        /// </summary>
4361
        private void ClearCompareRect()
4362
        {
4363
            da.From = 1;
4364
            da.To = 1;
4365
            da.Duration = new Duration(TimeSpan.FromSeconds(9999));
4366
            da.AutoReverse = false;
4367
            canvas_compareBorder.Children.Clear();
4368
            canvas_compareBorder.BeginAnimation(OpacityProperty, da);
4369
        }
4370

  
4371
        /// <summary>
4372
        /// 문서 Comprare 
4373
        /// </summary>
4374
        private void SetCompareRect()
4375
        {
4376
            if (CompareMode.IsChecked)
4377
            {
4378
                if (ViewerDataModel.Instance.PageBalanceMode && ViewerDataModel.Instance.PageBalanceNumber == 0)
4379
                {
4380
                    ViewerDataModel.Instance.PageBalanceNumber = 1;
4381
                }
4382
                if (ViewerDataModel.Instance.PageNumber == 0)
4383
                {
4384
                    ViewerDataModel.Instance.PageNumber = 1;
4385
                }
4386

  
4387
                Logger.sendReqLog("GetCompareRectAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + CurrentRev.DOCUMENT_ID +
4388
                    "," + pageNavigator.CurrentPage.PageNumber.ToString() + "," + ViewerDataModel.Instance.PageNumber.ToString() + "," +
4389
                    userData.COMPANY != "EXT" ? "true" : "false", 1);
4390

  
4391
                BaseClient.GetCompareRectAsync(_ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber.ToString(), ViewerDataModel.Instance.PageNumber.ToString(), userData.COMPANY != "EXT" ? "true" : "false");
4392
            }
4393
            else
4394
            {
4395
                ClearCompareRect();
4396
            }
4397
        }
4398

  
4383 4399
        private void RadButton_Click(object sender, RoutedEventArgs e)
4384 4400
        {
4385 4401
            gridViewHistory_Busy.IsBusy = true;
......
4388 4404
            if (instance.CommandParameter != null)
4389 4405
            {
4390 4406
                CurrentRev = instance.CommandParameter as VPRevision;
4391
                BaseClient.GetSyncMarkupInfoItemsCompleted += (sen, ea) =>
4407
                System.EventHandler<ServiceDeepView.GetSyncMarkupInfoItemsCompletedEventArgs> GetSyncMarkupInfoItemshandler = null;
4408

  
4409
                GetSyncMarkupInfoItemshandler = (sen, ea) =>
4392 4410
                {
4393 4411
                    if (ea.Error == null && ea.Result != null)
4394 4412
                    {
......
4414 4432

  
4415 4433
                        Sync_Offset_Point = new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY);
4416 4434

  
4417
                        var defaultBitmapImage_Compare = new BitmapImage();
4418
                        defaultBitmapImage_Compare.BeginInit();
4419
                        defaultBitmapImage_Compare.CacheOption = BitmapCacheOption.OnLoad;
4420
                        defaultBitmapImage_Compare.UriSource = new Uri(uri);
4421
                        defaultBitmapImage_Compare.EndInit();
4435
                        var defaultBitmapImage_Compare = ImageSourceHelper.GetDownloadImage(uri);
4436
                        ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare;
4437
                        ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth;
4438
                        ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
4439
                        zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth;
4440
                        zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight;
4422 4441

  
4423
                        if (defaultBitmapImage_Compare.IsDownloading)
4424
                        {
4425
                            defaultBitmapImage_Compare.DownloadCompleted += (ex, arg) =>
4426
                            {
4427
                                defaultBitmapImage_Compare.Freeze();
4428
                                ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare;
4429
                                ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth;
4430
                                ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
4431
                                zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth;
4432
                                zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight;
4433
                            };
4434
                        }                        
4435 4442
                        zoomAndPanControl2.ApplyTemplate();
4436 4443
                        zoomAndPanControl2.UpdateLayout();
4437
                        //syncPannelRotate(zoomAndPanControl.RotationAngle);
4438 4444
                        if (Sync_Offset_Point != new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY))
4439 4445
                        {
4440 4446
                            zoomAndPanControl.ContentOffsetX = Sync_Offset_Point.X;
......
4451 4457
                    }
4452 4458

  
4453 4459
                    Logger.sendResLog("GetSyncMarkupInfoItemsCompleted", "UserState : " + ea.UserState + "\r Result :" + ea.Result + "\r Cancelled :" + ea.Cancelled + "\r Error :" + ea.Error, 1);
4460

  
4461
                    if (GetSyncMarkupInfoItemshandler != null)
4462
                    {
4463
                        BaseClient.GetSyncMarkupInfoItemsCompleted -= GetSyncMarkupInfoItemshandler;
4464
                    }
4465

  
4466
                    ClearCompareRect();
4467
                    SetCompareRect();
4454 4468
                };
4469

  
4470
                /// 중복 실행이 발생하여 수정함.
4471
                BaseClient.GetSyncMarkupInfoItemsCompleted += GetSyncMarkupInfoItemshandler;
4455 4472
                BaseClient.GetSyncMarkupInfoItemsAsync(_ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, _ViewInfo.UserID);
4473

  
4456 4474
                Logger.sendReqLog("GetSyncMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + CurrentRev.DOCUMENT_ID + "," + _ViewInfo.UserID, 1);
4457 4475
            }
4458 4476
        }

내보내기 Unified diff

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