프로젝트

일반

사용자정보

개정판 90e7968d

ID90e7968da9d5053a78b4cb08170ebddef4a62fad
상위 6c8c6f91
하위 beb36e17, 9322ec12

이지연이(가) 5년 이상 전에 추가함

issue #000: daelim source compare 중

Change-Id: I010a1b75dae4b786e1c2a51a34c923eafd384667

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
232 232
        }
233 233

  
234 234
        #endregion
235
                
235

  
236 236
        public MainMenu()
237 237
        {
238 238
            //InitializeComponent();    
239
            this.Loaded += MainMenu_Loaded;            
239
            this.Loaded += MainMenu_Loaded;
240 240
        }
241 241

  
242 242
        public class TempDt
......
250 250
        }
251 251

  
252 252
        List<TempDt> tempDtList = new List<TempDt>();
253
            
253

  
254 254
        private void SetCursor()
255 255
        {
256 256
            this.Cursor = cursor;
......
290 290
                {
291 291
                    return true;
292 292
                }
293
            }               
293
            }
294 294

  
295 295
            return false;
296 296
        }
297 297

  
298
       
298

  
299 299
        public void DeleteItem(MarkupInfoItem item)
300 300
        {
301 301
            if (PreviewUserMarkupInfoItem != null && item.Consolidate == 1 && item.AvoidConsolidate == 0)
......
371 371
        private static Timer timer;
372 372
        private int InitInterval = KCOM.Properties.Settings.Default.InitInterval;
373 373
        private void MainMenu_Loaded(object sender, RoutedEventArgs e)
374
        {     
374
        {
375 375
            InitializeComponent();
376

  
377
            //System.Diagnostics.Debug.WriteLine("MainMenu() : " + sw.ElapsedMilliseconds.ToString() + "ms");
378 376
            
377
            //System.Diagnostics.Debug.WriteLine("MainMenu() : " + sw.ElapsedMilliseconds.ToString() + "ms");
378

  
379 379
            if (App.ParameterMode)
380 380
            {
381 381
                this.pageNavigator.PageChanging += pageNavigator_PageChanging;
......
389 389
                da.RepeatBehavior = System.Windows.Media.Animation.RepeatBehavior.Forever;
390 390

  
391 391
                if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission)
392
                {                    
392
                {
393 393
                    this.SymbolPane.Visibility = Visibility.Collapsed;
394 394
                    this.FavoritePane.Visibility = Visibility.Collapsed;
395 395
                    this.drawingRotateCanvas.IsHitTestVisible = false;
396
                }                
396
                }
397 397
            }
398
            timer = new Timer(timercallback, null, 0, InitInterval * 60000); 
398
            timer = new Timer(timercallback, null, 0, InitInterval * 60000);
399 399
        }
400 400

  
401 401
        private void timercallback(Object o)
......
405 405
            TempFileAdd();
406 406
            sw.Stop();
407 407

  
408
            Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate
408
            Dispatcher.InvokeAsync(new Action(delegate
409 409
            {
410 410
               if (this.ParentOfType<MainWindow>().dzTopMenu.cbAutoSave.IsChecked == true) //Auto Save Checked?
411 411
                {
......
413 413
                }
414 414
            }));
415 415

  
416
            GC.Collect();
416
            ////GC.Collect();
417 417
        }
418 418

  
419 419
        void TempFileAdd()
......
513 513

  
514 514
        public void TempLoad()
515 515
        {
516
            if ((System.IO.File.Exists(FilePath)) == true) 
516
            if ((System.IO.File.Exists(FilePath)) == true)
517 517
            {
518 518
                XmlDocument xdoc = new XmlDocument();
519
                xdoc.Load(FilePath);               
520
                XmlNodeList nodes = xdoc.SelectNodes("/Root/CommentID"); 
519
                xdoc.Load(FilePath);
520
                XmlNodeList nodes = xdoc.SelectNodes("/Root/CommentID");
521 521
                int PageNumber = 0;
522
                if (nodes.Count > 0) 
522
                if (nodes.Count > 0)
523 523
                {
524 524
                    if (MessageBox.Show("저장하지 못한 데이터가 있습니다. 불러오시겠습니까?", "MARKUS", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
525 525
                    {
......
530 530
                            string DATA_TYPE = node.SelectSingleNode("DATA_TYPE").InnerText;
531 531
                            string MarkupInfoID = node.SelectSingleNode("MarkupInfoID").InnerText;
532 532
                            int IsUpdate = Convert.ToInt32(node.SelectSingleNode("IsUpdate").InnerText);
533
                            PageNumber = Convert.ToInt32(node.SelectSingleNode("PageNumber").InnerText);                           
534
                            
533
                            PageNumber = Convert.ToInt32(node.SelectSingleNode("PageNumber").InnerText);
534

  
535 535
                            tempLoadData.Add(new TempLoadData()
536 536
                            {
537 537
                                PageNumber = PageNumber,
......
560 560
                {
561 561
                    temp.Remove();
562 562
                }
563
            }          
563
            }
564 564
        }
565
    
565

  
566 566

  
567 567
        public void ReleaseAdorner()
568 568
        {
569
            Logger.sendCheckLog("pageNavigator_PageChanging_ReleaseAdorner", 1);
570
            if (SelectLayer.Children.Count > 0)
569
            try
571 570
            {
572
                foreach (var item in SelectLayer.Children)
571
                Logger.sendCheckLog("pageNavigator_PageChanging_ReleaseAdorner", 1);
572
                if (SelectLayer.Children.Count > 0)
573 573
                {
574
                    if (item.GetType().Name == "AdornerFinal")
574
                    foreach (var item in SelectLayer.Children)
575 575
                    {
576
                        (item as AdornerFinal).unRegister();
577

  
578
                        foreach (var InnerItem in (item as AdornerFinal).MemberSet.Cast<AdornerMember>())
576
                        if (item.GetType().Name == "AdornerFinal")
579 577
                        {
580
                            if (!ViewerDataModel.Instance.MarkupControls_USER.Contains(InnerItem.DrawingData))
578
                            (item as AdornerFinal).unRegister();
579

  
580
                            foreach (var InnerItem in (item as AdornerFinal).MemberSet.Cast<AdornerMember>())
581 581
                            {
582
                                if (InnerItem.DrawingData.GetType().Name == "PolygonControl")
582
                                if (!ViewerDataModel.Instance.MarkupControls_USER.Contains(InnerItem.DrawingData))
583 583
                                {
584
                                    if ((InnerItem.DrawingData as PolygonControl).CommentID == null)
584
                                    if (InnerItem.DrawingData.GetType().Name == "PolygonControl")
585 585
                                    {
586
                                        (InnerItem.DrawingData as PolygonControl).CommentID = KCOM.Events.Save.shortGuid();
586
                                        if ((InnerItem.DrawingData as PolygonControl).CommentID == null)
587
                                        {
588
                                            (InnerItem.DrawingData as PolygonControl).CommentID = KCOM.Events.Save.shortGuid();
589
                                        }
587 590
                                    }
588
                                }
589 591

  
590
                                ViewerDataModel.Instance.MarkupControls_USER.Add(InnerItem.DrawingData as CommentUserInfo);
592
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(InnerItem.DrawingData as CommentUserInfo);
593
                                }
591 594
                            }
592 595
                        }
593 596
                    }
597
                    SelectLayer.Children.Clear();
594 598
                }
595
                SelectLayer.Children.Clear();
596 599
            }
600
            catch (Exception ex)
601
            {
602
                Logger.sendResLog("ReleaseAdorner", ex.ToString(), 0);
603
            }            
597 604
        }
598 605

  
599 606
        public List<CommentUserInfo> AddAdorner()
......
637 644
                foreach (var control in ViewerDataModel.Instance.MarkupControls_USER)
638 645
                {
639 646
                    var root = layerControl.MarkupToString(control, App.ViewInfo.UserID);
640
                   
647

  
641 648
                    var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault();
642 649
                    if (existItem != null) //신규 추가 된 코멘트
643 650
                    {
......
673 680
                                ComingNewBieEnd = false;
674 681
                            }
675 682
                        }
676
                    }                    
683
                    }
677 684
                }
678 685
            }
679 686

  
......
706 713
            }
707 714
            Logger.sendCheckLog("pageNavigator_PageChanging_UndoDataListClear", 1);
708 715
            ViewerDataModel.Instance.UndoDataList.Clear();
709
            
716

  
710 717
            InkControl_Convert();
711 718

  
712 719
            ReleaseAdorner();
......
754 761
            defaultBitmapImage.EndInit();
755 762

  
756 763
            ViewerDataModel.Instance.ImageViewPath = null;
757
            Logger.sendCheckLog("pageNavigator_PageChanging_GC.Collect()", 1);
758 764
            GC.Collect();
759 765

  
760

  
761 766
            Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage Downloading", 1);
762 767
            if (defaultBitmapImage.IsDownloading)
763 768
            {
764 769
                Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage IsDownloading", 1);
765 770
                defaultBitmapImage.DownloadCompleted += (ex, arg) =>
766 771
                {
767
                    Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage DownloadCompleted_Start", 1);
768 772
                    defaultBitmapImage.Freeze();
769 773
                    mainPanel.UpdateLayout();
770
                    GC.Collect();                    
774
                    GC.Collect();
771 775
                    ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage;
772 776
                    ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth;
773 777
                    ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight;
774
                    Logger.sendCheckLog("pageNavigator_PageChanging_BitmapImage DownloadCompleted_End", 1);
775 778
                };
776 779
            }
777 780

  
778
            Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanCanvas Page Setting", 1);
779 781
            zoomAndPanCanvas.Width = Convert.ToDouble(e.CurrentPage.PAGE_WIDTH);
780 782
            zoomAndPanCanvas.Height = Convert.ToDouble(e.CurrentPage.PAGE_HEIGHT);
781 783

  
......
785 787
            inkBoard.Width = zoomAndPanCanvas.Width;
786 788
            inkBoard.Height = zoomAndPanCanvas.Height;
787 789

  
788
           
790

  
789 791

  
790 792
            if (!testPanel2.IsHidden)
791 793
            {
......
861 863
                            ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare;
862 864
                            ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth;
863 865
                            ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
864
                            
866

  
865 867
                            zoomAndPanCanvas2.Width = defaultBitmapImage_Compare.PixelWidth;
866 868
                            zoomAndPanCanvas2.Height = defaultBitmapImage_Compare.PixelHeight;
867 869

  
......
889 891
            Common.ViewerDataModel.Instance.MarkupControls.Clear();  //전체 제거
890 892

  
891 893
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
892
 
894

  
893 895
            foreach (var item in gridSelectionItem)
894 896
            {
895 897
                if (item.UserID == App.ViewInfo.UserID)
......
899 901
                    {
900 902
                        layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
901 903
                    });
902
                    
904

  
903 905
                }
904 906
                else
905 907
                {
......
909 911
                    });
910 912
                }
911 913
            }
912
            
914

  
913 915
            if (!testPanel2.IsHidden)
914 916
            {
915 917
                ViewerDataModel.Instance.Sync_ContentOffsetX = zoomAndPanControl.ContentOffsetX;
......
941 943
            //}
942 944
            SetCommentPages(true);
943 945
        }
944
        
946

  
945 947

  
946 948
        //Temp Control Load
947 949
        public void TempControlLoad()
......
952 954
            {
953 955
                System.Windows.Controls.Control item = null;
954 956
                Multi_Undo_data multi_Undo_Data;
955
                
957

  
956 958

  
957 959
                switch (tempLoadData[k].IsUpdate)
958 960
                {
......
967 969

  
968 970
                        //Control                   
969 971
                        item = layerControl.TempMarkupParseEx(tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
970
                                               
972

  
971 973
                        UndoData = new Undo_data()
972 974
                        {
973 975
                            IsUndo = false,
......
1006 1008
                        multi_Undo_Data = new Multi_Undo_data();
1007 1009
                        multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
1008 1010
                        UndoData.Markup_List.Add(multi_Undo_Data);
1009
                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);                        
1011
                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);
1010 1012
                        break;
1011 1013
                    case 2://삭제
1012 1014

  
......
1015 1017
                        {
1016 1018
                            ViewerDataModel.Instance.MarkupControls_USER.Remove(control);
1017 1019
                            var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (control as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
1018
                            ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);                  
1020
                            ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
1019 1021
                        }
1020 1022
                        break;
1021
                }              
1022
            }       
1023
                }
1024
            }
1023 1025
        }
1024 1026

  
1025 1027
        private void SetCommentPages(bool onlyMe = false)
......
1363 1365
            //Control_Init(e.Source);
1364 1366
        }
1365 1367
        private Window _dragdropWindow = null;
1366
        private bool symbolMouse = false;
1367 1368

  
1368 1369
        [DllImport("user32.dll")]
1369 1370
        [return: MarshalAs(UnmanagedType.Bool)]
......
3098 3099
            defaultBitmapImage.UriSource = new Uri(uri);
3099 3100
            defaultBitmapImage.EndInit();
3100 3101

  
3101
            GC.Collect();
3102
            //GC.Collect();
3102 3103

  
3103 3104
            if (defaultBitmapImage.IsDownloading)
3104 3105
            {
3105 3106
                defaultBitmapImage.DownloadCompleted += (ex, arg) =>
3106 3107
                {
3107 3108
                    defaultBitmapImage.Freeze();
3108
                    GC.Collect();
3109
                    //GC.Collect();
3109 3110
                    BitmapSource bs = new CroppedBitmap(defaultBitmapImage, rect);
3110 3111
                    Save_Symbol_Capture(bs, (int)x, (int)y, (int)width, (int)height);
3111 3112
                };
......
5534 5535
                string user_id = App.ViewInfo.UserID;
5535 5536
                List<MarkupInfoItem> markupInfoItems = new List<MarkupInfoItem>();
5536 5537
                foreach (MarkupInfoItem item in this.gridViewMarkup.SelectedItems)
5537
                {                    
5538
                {
5538 5539
                    markupInfoItems.Add(item);
5539 5540
                }
5540 5541
                Logger.sendReqLog("TeamConsolidate", project_no + "," + user_id + "," + doc_id + "," + markupInfoItems, 1);
5541 5542
                Logger.sendResLog("TeamConsolidate", this.BaseClient.TeamConsolidate(project_no, user_id, doc_id, markupInfoItems).ToString(), 1);
5542 5543
                //this.BaseClient.TeamConsolidate(project_no, user_id, doc_id, markupInfoItems);
5543 5544

  
5544
                Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + _DocInfo.ID, 1);  
5545
                Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + _DocInfo.ID, 1);
5545 5546
                this.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, _DocInfo.ID);
5546 5547
            }
5547 5548
        }
......
5554 5555
                this.ParentOfType<MainWindow>().DialogMessage_Alert("Please select at least one user", "Alert");
5555 5556
            }
5556 5557
            else
5557
            {                                
5558
            {
5558 5559
                ViewerDataModel.Instance.IsConsolidate = true;
5559 5560
                this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null);
5560 5561
                List<KCOMDataModel.DataModel.MARKUP_DATA> instanceDataSet = new List<KCOMDataModel.DataModel.MARKUP_DATA>();
......
5573 5574

  
5574 5575
                Logger.sendReqLog("GetMarkupInfoItemsAsync", App.ViewInfo.ProjectNO + "," + _DocInfo.ID, 1);
5575 5576
                this.BaseClient.GetMarkupInfoItemsAsync(App.ViewInfo.ProjectNO, _DocInfo.ID);
5576
                
5577

  
5577 5578
            }
5578 5579
        }
5579 5580

  
......
5623 5624
            var item = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(d => d.Consolidate == 1 && d.AvoidConsolidate == 0).FirstOrDefault();
5624 5625
            if (item != null)
5625 5626
            {
5626
                Logger.sendReqLog("SetFinalPDFAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID + "," + item.MarkupInfoID + "," + _ViewInfo.UserID, 1);              
5627
                Logger.sendReqLog("SetFinalPDFAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID + "," + item.MarkupInfoID + "," + _ViewInfo.UserID, 1);
5627 5628

  
5628 5629
                BaseClient.SetFinalPDFAsync(_ViewInfo.ProjectNO, _DocInfo.ID, item.MarkupInfoID, _ViewInfo.UserID);
5629 5630
            }
......
5688 5689
                {
5689 5690
                    DialogMessage_Alert("Consolidation 된 코멘트가 존재하지 않습니다", "안내");
5690 5691
                }
5691
            }            
5692
            }
5692 5693
        }
5693 5694

  
5694 5695
        private void btnConsolidateFinalPDF_Loaded(object sender, RoutedEventArgs e)
5695
        {            
5696
        {
5696 5697
            btnConsolidateFinalPDF = (sender as RadRibbonButton);
5697 5698

  
5698 5699
            if (App.ViewInfo != null)
5699 5700
            {
5700 5701
                if (!App.ViewInfo.NewCommentPermission || !App.ViewInfo.CreateFinalPDFPermission)
5701 5702
                {
5702
                    btnConsolidateFinalPDF.Visibility = System.Windows.Visibility.Collapsed;                        
5703
                    btnConsolidateFinalPDF.Visibility = System.Windows.Visibility.Collapsed;
5703 5704
                }
5704
            }            
5705
            }
5705 5706
        }
5706 5707

  
5707 5708
        private void SyncCompare_Click(object sender, RoutedEventArgs e)
......
5717 5718
                    ViewerDataModel.Instance.PageNumber = 1;
5718 5719
                }
5719 5720

  
5720
                Logger.sendReqLog("GetCompareRectAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + CurrentRev.DOCUMENT_ID + 
5721
                Logger.sendReqLog("GetCompareRectAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + CurrentRev.DOCUMENT_ID +
5721 5722
                    "," + pageNavigator.CurrentPage.PageNumber.ToString() + "," + ViewerDataModel.Instance.PageNumber.ToString() + "," +
5722
                    userData.COMPANY != "EXT" ? "true" : "false" , 1);
5723
                    userData.COMPANY != "EXT" ? "true" : "false", 1);
5723 5724

  
5724 5725
                BaseClient.GetCompareRectAsync(_ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber.ToString(), ViewerDataModel.Instance.PageNumber.ToString(), userData.COMPANY != "EXT" ? "true" : "false");
5725 5726
            }
......
5848 5849

  
5849 5850
                        if (userData.COMPANY != "EXT")
5850 5851
                        {
5851
                            uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.PageNumber);
5852
                            uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, ViewerDataModel.Instance.PageNumber);
5852 5853
                        }
5853 5854
                        else
5854 5855
                        {
......
5949 5950
                string uri = "";
5950 5951
                if (userData.COMPANY != "EXT")
5951 5952
                {
5952
                    uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
5953
                    uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
5953 5954
                }
5954 5955
                else
5955 5956
                {
......
5998 5999
                        string uri = "";
5999 6000
                        if (userData.COMPANY != "EXT")
6000 6001
                        {
6001
                            uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
6002
                            uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
6002 6003
                        }
6003 6004
                        else
6004 6005
                        {
......
6045 6046
                    }
6046 6047

  
6047 6048
                    Logger.sendResLog("GetSyncMarkupInfoItemsCompleted", "UserState : " + ea.UserState + "\r Result :" + ea.Result + "\r Cancelled :" + ea.Cancelled + "\r Error :" + ea.Error, 1);
6048
                };                
6049
                };
6049 6050
                BaseClient.GetSyncMarkupInfoItemsAsync(_ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, _ViewInfo.UserID);
6050 6051
                Logger.sendReqLog("GetSyncMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + CurrentRev.DOCUMENT_ID + "," + _ViewInfo.UserID, 1);
6051 6052
            }
......
6067 6068
                    string uri = "";
6068 6069
                    if (userData.COMPANY != "EXT")
6069 6070
                    {
6070
                        uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
6071
                        uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToUInt32(CurrentRev.DOCUMENT_ID) / 100).ToString(), CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
6071 6072
                    }
6072 6073
                    else
6073 6074
                    {
......
6091 6092
                            ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
6092 6093
                        };
6093 6094
                    }
6094
                    
6095
                    
6095

  
6096

  
6096 6097
                    zoomAndPanCanvas2.Width = Convert.ToDouble(Common.ViewerDataModel.Instance.ContentWidth);
6097 6098
                    zoomAndPanCanvas2.Height = Convert.ToDouble(Common.ViewerDataModel.Instance.ContentHeight);
6098 6099
                    zoomAndPanControl2.ApplyTemplate();
......
6107 6108

  
6108 6109
                    tlSyncRev.Text = String.Format("Rev. {0}", CurrentRev.RevNo);
6109 6110
                    tlSyncPageNum.Text = String.Format("Current Page : {0}", pageNavigator.CurrentPage.PageNumber);
6110
                    gridViewHistory_Busy.IsBusy = false;                    
6111
                    gridViewHistory_Busy.IsBusy = false;
6111 6112
                }
6112 6113
                Logger.sendResLog("GetSyncMarkupInfoItemsCompleted", "UserState : " + ea.UserState + "\r Result :" + ea.Result + "\r Cancelled :" + ea.Cancelled + "\r Error :" + ea.Error, 1);
6113
                
6114

  
6114 6115
            };
6115 6116
            Logger.sendReqLog("GetSyncMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + CurrentRev.DOCUMENT_ID + "," + _ViewInfo.UserID, 1);
6116
            BaseClient.GetSyncMarkupInfoItemsAsync(_ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, _ViewInfo.UserID);           
6117
            BaseClient.GetSyncMarkupInfoItemsAsync(_ViewInfo.ProjectNO, CurrentRev.DOCUMENT_ID, _ViewInfo.UserID);
6117 6118
        }
6118 6119

  
6119 6120
        private void PdfLink_ButtonDown(object sender, MouseButtonEventArgs e)
......
6221 6222
                                defaultBitmapImage.UriSource = new Uri(filename);
6222 6223
                                defaultBitmapImage.EndInit();
6223 6224

  
6224
                                GC.Collect();
6225 6225
                                System.Drawing.Bitmap image;
6226 6226

  
6227 6227
                                if (defaultBitmapImage.IsDownloading)
......
6229 6229
                                    defaultBitmapImage.DownloadCompleted += (ex2, arg2) =>
6230 6230
                                    {
6231 6231
                                        defaultBitmapImage.Freeze();
6232
                                        GC.Collect();
6232
                                        //GC.Collect();
6233 6233

  
6234 6234
                                        image = GetBitmap(defaultBitmapImage);
6235 6235

  
......
6287 6287
                                        //potrace.WaitForExit();
6288 6288
                                    };
6289 6289
                                }
6290
                                else
6291
                                {
6292

  
6293
                                    //GC.Collect();
6294
                                }
6290 6295
                            }
6291 6296
                        };                                             
6292 6297
                    }
......
6465 6470
            {
6466 6471
                renderBitmap.Render(dv);
6467 6472

  
6468
                GC.Collect();
6473
                //GC.Collect();
6469 6474
                GC.WaitForPendingFinalizers();
6470
                GC.Collect();
6475
                //GC.Collect();
6471 6476
                // encode png data
6472 6477
                PngBitmapEncoder pngEncoder = new PngBitmapEncoder();
6473 6478
                // puch rendered bitmap into it
......
6499 6504
                Header = header,
6500 6505
                Theme = new VisualStudio2013Theme(),
6501 6506
                ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 },
6502
            };
6507
            };            
6503 6508
            RadWindow.Alert(parameters);
6504 6509
        }
6505 6510

  
......
6640 6645

  
6641 6646
            Logger.sendReqLog("GetCheckList", projectno + "," + checklist_id, 1);
6642 6647
            Item = this.BaseClient.GetCheckList(projectno, checklist_id);
6643
            if(Item != null)
6648
            if (Item != null)
6644 6649
            {
6645 6650
                Logger.sendResLog("GetCheckList", "TRUE", 1);
6646 6651
            }
......
6648 6653
            {
6649 6654
                Logger.sendResLog("GetCheckList", "FALSE", 1);
6650 6655
            }
6651
            
6656

  
6652 6657
            if (Item == null)
6653 6658
            {
6654 6659
                check_ = new KCOMDataModel.DataModel.CHECK_LIST
......
6675 6680
            {
6676 6681
                Item.IMAGE_URL = Result;
6677 6682
                Item.IMAGE_ANCHOR = x + "," + y + "," + width + "," + height;
6678
                Item.PAGENUMBER = this.pageNavigator.CurrentPage.PageNumber;          
6683
                Item.PAGENUMBER = this.pageNavigator.CurrentPage.PageNumber;
6679 6684
                Logger.sendReqLog("SaveCheckList", projectno + "," + checklist_id + "," + Item, 1);
6680 6685
                Logger.sendResLog("SaveCheckList", this.BaseClient.SaveCheckList(projectno, checklist_id, Item).ToString(), 1);
6681 6686
                //this.BaseClient.SaveCheckList(projectno, checklist_id, Item);
6682 6687
            }
6683
            
6688

  
6684 6689
        }
6685 6690

  
6686 6691
        public void Set_Capture()
6687
        {            
6692
        {
6688 6693
            double x = canvasDrawingMouseDownPoint.X;
6689 6694
            double y = canvasDrawingMouseDownPoint.Y;
6690 6695
            double width = dragCaptureBorder.Width;
......
6702 6707
        TempFile temp = new TempFile();
6703 6708
        //MarkupInfoItem
6704 6709
        public void CreateControl()
6705
        {            
6710
        {
6711

  
6706 6712
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
6707 6713
            {
6708 6714
                ViewerDataModel.Instance.UndoDataList.Remove(i);
6709 6715
            });
6710 6716
            multi_Undo_Data.Markup = currentControl;
6711 6717
            UndoData.Markup_List.Add(multi_Undo_Data);
6712
           
6718

  
6713 6719
            ViewerDataModel.Instance.UndoDataList.Add(UndoData);
6714 6720

  
6715 6721
            //List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList();
6716 6722
        }
6717
        
6723

  
6718 6724
        public Multi_Undo_data Control_Style(CommentUserInfo control)
6719 6725
        {
6720 6726
            multi_Undo_Data = new Multi_Undo_data();
......
6743 6749

  
6744 6750
        public void Undo()
6745 6751
        {
6746
         // if (ViewerDataModel.Instance.IsPressCtrl)
6747
         //   {
6748
         //      ViewerDataModel.Instance.IsPressCtrl = false;
6749
         //   }
6752
            // if (ViewerDataModel.Instance.IsPressCtrl)
6753
            //   {
6754
            //      ViewerDataModel.Instance.IsPressCtrl = false;
6755
            //   }
6750 6756
            Undo_data undo = new Undo_data();
6751 6757
            AdornerFinal final;
6752 6758
            ReleaseAdorner();
......
6755 6761
            if (undo == null)
6756 6762
                return;
6757 6763

  
6758
            
6764

  
6759 6765

  
6760 6766
            switch (undo.Event)
6761 6767
            {
......
6875 6881
                    break;
6876 6882
            }
6877 6883
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == undo.EventTime).ToList().OrderByDescending(order => order.EventTime).ToList().ForEach(i =>
6878
           {
6879
               i.IsUndo = true;
6880
           });
6884
            {
6885
                i.IsUndo = true;
6886
            });
6881 6887
        }
6882 6888

  
6883 6889

  
6884
        
6890

  
6885 6891
        public void Redo()
6886 6892
        {
6887 6893
            //if (ViewerDataModel.Instance.IsPressCtrl)
......
7213 7219

  
7214 7220
        private void zoomAndPanControl_Drop(object sender, DragEventArgs e)
7215 7221
        {
7216
            if (e.Data.GetDataPresent(typeof(string)))
7222
            try
7217 7223
            {
7218
                this.getCurrentPoint = e.GetPosition(drawingRotateCanvas);
7219
                string dragData = e.Data.GetData(typeof(string)) as string;
7220
                Move_Symbol(sender, dragData);
7224
                if (e.Data.GetDataPresent(typeof(string)))
7225
                {
7226
                    this.getCurrentPoint = e.GetPosition(drawingRotateCanvas);
7227
                    string dragData = e.Data.GetData(typeof(string)) as string;
7228
                    Move_Symbol(sender, dragData);
7229
                }
7221 7230
            }
7231
            catch (Exception ex)
7232
            {
7233
                Logger.sendResLog("zoomAndPanControl_Drop", ex.ToString(), 0);
7234
            }            
7222 7235
        }
7223 7236

  
7224 7237
        private void Move_Symbol(object sender, string dragData)
7225 7238
        {
7226
            if (dragData.Contains("|DZ|"))
7239
            try
7227 7240
            {
7228
                List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>();
7241
                if (dragData.Contains("|DZ|"))
7242
                {
7243
                    List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>();
7229 7244

  
7230
                string[] delimiterChars = { "|DZ|" };
7231
                string[] data = dragData.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries);
7245
                    string[] delimiterChars = { "|DZ|" };
7246
                    string[] data = dragData.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries);
7232 7247

  
7233
                this.ParentOfType<MainWindow>().dzMainMenu.ReleaseAdorner();
7248
                    this.ParentOfType<MainWindow>().dzMainMenu.ReleaseAdorner();
7234 7249

  
7235
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
7250
                    Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
7236 7251

  
7237
                //강인구 Undo/Redo 보류
7238
                UndoData = new Undo_data()
7239
                {
7240
                    IsUndo = false,
7241
                    Event = Event_Type.Create,
7242
                    EventTime = DateTime.Now,
7243
                    Markup_List = new List<Multi_Undo_data>()
7244
                };
7252
                    //강인구 Undo/Redo 보류
7253
                    UndoData = new Undo_data()
7254
                    {
7255
                        IsUndo = false,
7256
                        Event = Event_Type.Create,
7257
                        EventTime = DateTime.Now,
7258
                        Markup_List = new List<Multi_Undo_data>()
7259
                    };
7245 7260

  
7246
                ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i =>
7247
                {
7248
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
7249
                });
7261
                    ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i =>
7262
                    {
7263
                        ViewerDataModel.Instance.UndoDataList.Remove(i);
7264
                    });
7250 7265

  
7251
                foreach (string parse in data)
7252
                {
7253
                    if (parse != "")
7266
                    foreach (string parse in data)
7254 7267
                    {
7255
                        System.Windows.Controls.Control item = this.layerControl.markupParse_Paste(parse, ViewerDataModel.Instance.MarkupControls_USER);
7256
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.Save.shortGuid();
7268
                        if (parse != "")
7269
                        {
7270
                            System.Windows.Controls.Control item = this.layerControl.markupParse_Paste(parse, ViewerDataModel.Instance.MarkupControls_USER);
7271
                            (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.Save.shortGuid();
7257 7272

  
7258
                        ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
7259
                        ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo);
7273
                            ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
7274
                            ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo);
7260 7275

  
7261
                        adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo);
7276
                            adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo);
7262 7277

  
7263
                        multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
7278
                            multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
7264 7279

  
7265
                        UndoData.Markup_List.Add(multi_Undo_Data);
7266
                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);
7280
                            UndoData.Markup_List.Add(multi_Undo_Data);
7281
                            ViewerDataModel.Instance.UndoDataList.Add(UndoData);
7282
                        }
7267 7283
                    }
7268
                }
7269
                Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet);
7284
                    Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet);
7270 7285

  
7271
                /// move symbol to current mouse point
7272
                double realPointX = this.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2);
7273
                double realPointY = this.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2);
7274
                final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(realPointX, realPointY));
7286
                    /// move symbol to current mouse point
7287
                    double realPointX = this.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2);
7288
                    double realPointY = this.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2);
7289
                    final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(realPointX, realPointY));
7275 7290

  
7276
                if (final.MemberSet.Where(type => type.Drawingtype == MarkupToPDF.Controls.Common.ControlType.TextControl).FirstOrDefault() != null)
7277
                {
7278
                    final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(0.001, 0.001)); //dummy
7279
                }
7280
                /// up to here
7291
                    if (final.MemberSet.Where(type => type.Drawingtype == MarkupToPDF.Controls.Common.ControlType.TextControl).FirstOrDefault() != null)
7292
                    {
7293
                        final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(0.001, 0.001)); //dummy
7294
                    }
7295
                    /// up to here
7281 7296

  
7282
                ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
7297
                    ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
7298
                }
7283 7299
            }
7284
        }
7285

  
7286
        private void zoomAndPanControl_PreviewDrop(object sender, DragEventArgs e)
7287
        {
7288

  
7289
        }
7290

  
7291
        private void zoomAndPanControl_GiveFeedback(object sender, GiveFeedbackEventArgs e)
7292
        {
7293

  
7294
        }
7300
            catch (Exception ex)
7301
            {
7302
                Logger.sendResLog("Move_Symbol", ex.ToString(), 0);
7303
            }            
7304
        }        
7295 7305
    }
7296 7306
}

내보내기 Unified diff

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