프로젝트

일반

사용자정보

개정판 f258d884

IDf258d884cb198e2bb79bb89c0ff1db76f9771d01
상위 e7334a0c
하위 e59e6c8e

백흠경이(가) 9달 전에 추가함

Fix: Consolidate 또는 AvoidConsolidate인 레이어만 삭제한다.

Change-Id: Iec8e0061785bbfaeee0fc4f861727f62ee04eacd

차이점 보기:

IKCOM/Interface.cs
106 106
        public bool IsPreviewUser { get; set; }
107 107
    }
108 108

  
109
    //public class _MemberDeptColors
110
    //{
111
    //    public List<MEMBER_DEPT_COLOR> _memberDeptColors { get; set; }
112
    //}
113

  
114
    //public class _MemberDeptColorsInfo
115
    //{
116
    //    public List<MEMBER_DEPT_COLORINFO> _memberDeptColorsInfo { get; set; }
117
    //}
118

  
119 109
    public class MarkupItemEx : MarkupItem
120 110
    {
121 111
        public string MarkupInfoID { get; set; }
KCOM/App.xaml.cs
46 46
        public static string urlPort;
47 47
        public static string urlHost_DB;
48 48
        public static string urlPort_DB;
49
        public static string Custom_ViewInfoId;
49
        
50
        /// <summary>
51
        /// 현재 활성화된 MarkupInfo의 Id
52
        /// </summary>
53
        public static string Custom_ViewInfoId { get; set; }
54

  
50 55
        public static bool ParameterMode = false;
51 56
        public static bool isExternal = false;
52 57
        public static bool isAuthenticate = false;
KCOM/Events/Implementation/TopMenuEvent.cs
1842 1842
                    break;
1843 1843
                case "fullscreen":
1844 1844
                    {
1845
                        instanceMain.WindowStyle = WindowStyle.None;
1845 1846
                        instanceMain.WindowState = WindowState.Maximized;
1846
                        //Sizemode 대기(강인구)
1847
                        //instanceMain.dzMainMenu.imageViewer.SizeMode = Leadtools.Windows.Controls.SizeMode.Fit;
1848 1847
                        instanceMain.dzMainMenu.zoomAndPanControl.ScaleToFit();
1849 1848
                        viewButton.IsChecked = false;
1850 1849
                    }
KCOM/Events/UndoCommand.cs
45 45
        /// push undo data
46 46
        /// </summary>
47 47
        /// <author>humkyung</author>
48
        /// <date>2019.06.14</date>
48
        /// <date>2019.06.14, 2024.04.26</date>
49 49
        /// <param name="comments"></param>
50
        //public void Push(ICollection<CommentUserInfo> comments, double dAngle, double dBeforeAngle = 0.0, List<Point> lstBeforePointSet = null)
51
        //{
52
        //    UndoData UndoData = new UndoData()
53
        //    {
54
        //        IsUndo = false,
55
        //        Event = EventType.Thumb,
56
        //        EventTime = DateTime.Now,
57
        //        MarkupDataColl = new List<Multi_UndoData>(),
58
        //    };
59

  
60
        //    Multi_UndoData multi_UndoData = new Multi_UndoData();
61

  
62
        //    foreach (var comment in comments)
63
        //    {
64
        //        multi_UndoData.PointSet = new List<Point>();
65
        //        var p_set = new List<Point>();
66

  
67
        //        if (comment is TextControl)
68
        //        {
69
        //            multi_UndoData.PointSet.Add((comment as TextControl).StartPoint);
70
        //            multi_UndoData.PointSet.Add((comment as TextControl).EndPoint);
71
        //        }
72

  
73
        //        foreach (var point in (comment as IPath).PointSet)
74
        //        {
75
        //            multi_UndoData.PointSet.Add(point);
76
        //        }
77

  
78
        //        if (lstBeforePointSet != null)
79
        //            multi_UndoData.BeforePointSet = lstBeforePointSet;
80

  
81
        //        if (comment is ArrowTextControl)
82
        //        {
83
        //            //multi_UndoData.Angle = dAngle = (comment as ArrowTextControl).CommentAngle;
84
        //            multi_UndoData.Angle = dAngle;
85
        //            multi_UndoData.BeforeAngle = dBeforeAngle;
86
        //        }
87
        //        else
88
        //        {
89
        //            multi_UndoData.Angle = dAngle;
90
        //            multi_UndoData.BeforeAngle = dBeforeAngle;
91
        //        }
92

  
93
        //        multi_UndoData.Markup = comment;
94
        //        UndoData.MarkupDataColl.Add(multi_UndoData);
95
        //        ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
96
        //                    MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Thumb, null, null);
97

  
98
        //        multi_UndoData = new Multi_UndoData();                
99
        //    }
100
        //    ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
101
        //    {
102
        //        ViewerDataModel.Instance.UndoDataList.Remove(i);
103
        //    });
104

  
105
        //    ViewerDataModel.Instance.UndoDataList.Add(UndoData);            
106
        //}
107

  
108 50
        public void Push(ICollection<CommentUserInfo> comments)
109 51
        {
110 52
            UndoDataGroup UndoData = new UndoDataGroup()
......
117 59

  
118 60
            foreach (var comment in comments)
119 61
            {
120
                UndoData multi_UndoData = new UndoData();
121
                multi_UndoData.Markup = comment;
122
                multi_UndoData.Clone = comment.Clone();
123
                /*
124
                multi_UndoData.PointSet = new List<Point>();
125
                var p_set = new List<Point>();
126

  
127
                if (comment is TextControl)
128
                {
129
                    multi_UndoData.PointSet.Add((comment as TextControl).StartPoint);
130
                    multi_UndoData.PointSet.Add((comment as TextControl).EndPoint);
131
                }
132

  
133
                foreach (var point in (comment as IPath).PointSet)
134
                {
135
                    multi_UndoData.PointSet.Add(point);
136
                }
137

  
138

  
139
                List<Point> points = new List<Point>();
140
                foreach(var point in (comment as IPath).PointSet)
141
                {
142
                    points.Add(point);
143
                }
144
                multi_UndoData.PointSet = points;
145

  
146
                if (comment is ArrowTextControl)
147
                {
148
                    //multi_UndoData.Angle = dAngle = (comment as ArrowTextControl).CommentAngle;
149
                    multi_UndoData.Angle = comment.CommentAngle;
150
                }
151
                else
152
                {
153
                    multi_UndoData.Angle = comment.CommentAngle;
154
                }
62
                UndoData _UndoData = new UndoData();
63
                _UndoData.Markup = comment;
64
                _UndoData.Clone = comment.Clone();
155 65

  
156
                multi_UndoData.Markup = comment;
157
                */
158
                UndoData.MarkupDataColl.Add(multi_UndoData);
66
                UndoData.MarkupDataColl.Add(_UndoData);
159 67
                ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
160
                            MarkupParser.MarkupToString(multi_UndoData.Markup, App.ViewInfo.UserID), EventType.Operation, null, null);
68
                            MarkupParser.MarkupToString(_UndoData.Markup, App.ViewInfo.UserID), EventType.Operation, null, null);
161 69
            }
162 70
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
163 71
            {
......
168 76
        }
169 77

  
170 78
        /// <summary>
171
        /// undo
79
        /// undo 실행
172 80
        /// </summary>
173 81
        public void Execute()
174 82
        {
KCOM/Services/BaseServices.cs
250 250
            }
251 251
        }
252 252

  
253
        /// <summary>
254
        /// ???
255
        /// </summary>
253 256
        public MarkupInfoItem PreviewUserMarkupInfoItem { get; set; }
254 257

  
255 258
        /// <summary>
......
426 429
                        }
427 430
                    });
428 431

  
429
                    var currentUser = e.Result.Where(data => data.UserID == App.ViewInfo.UserID && data.AvoidConsolidate == 0).FirstOrDefault();
430

  
432
                    var currentUser = e.Result.Find(data => data.UserID == App.ViewInfo.UserID && data.AvoidConsolidate == 0);
431 433
                    if (currentUser == null)
432 434
                    {
433 435
                        /// create a new markupinfo to do comments
KCOM/Views/MainMenu.xaml.cs
381 381
            return false;
382 382
        }
383 383

  
384
        /// <summary>
385
        /// 주어진 레이어를 삭제한다.
386
        /// </summary>
387
        /// <param name="item"></param>
384 388
        public void DeleteItem(MarkupInfoItem item)
385 389
        {
386 390
            if (PreviewUserMarkupInfoItem != null && item.Consolidate == 1 && item.AvoidConsolidate == 0)
......
388 392
                App.Custom_ViewInfoId = PreviewUserMarkupInfoItem.MarkupInfoID;
389 393
            }
390 394

  
391
            ViewerDataModel.Instance._markupInfoList.Remove(item);
395
            #region Consolidate 또는 AvoidConsolidate한 레이어만 삭제한다.
396
            if (item.Consolidate == 1 || item.AvoidConsolidate == 1) ViewerDataModel.Instance._markupInfoList.Remove(item);
397
            #endregion
392 398

  
399
            #region item에 속한 컨트롤들을 삭제한다.
393 400
            ViewerDataModel.Instance.MarkupControls.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a =>
394 401
            {
395 402
                ViewerDataModel.Instance.MarkupControls.Remove(a);
......
401 408
                ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.MarkupListUpdate(
402 409
                null, EventType.Delete, a.CommentID, null);
403 410
            });
411
            #endregion
404 412

  
405 413
            ViewerDataModel.Instance.MyMarkupList.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a =>
406 414
            {
......
411 419

  
412 420
            gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
413 421

  
414
            if (PreviewUserMarkupInfoItem == null && gridViewMarkup.SelectedItems.Where(d => (d as MarkupInfoItem).UserID == App.ViewInfo.UserID).FirstOrDefault() == null)
422
            if (PreviewUserMarkupInfoItem == null && gridViewMarkup.SelectedItems.FirstOrDefault(d => (d as MarkupInfoItem).UserID == App.ViewInfo.UserID) == null)
415 423
            {
416
                if (gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList().Where(d => d.UserID == App.ViewInfo.UserID).Count() == 0)
424
                if (!gridViewMarkup.Items.Cast<MarkupInfoItem>().Any(d => d.UserID == App.ViewInfo.UserID))
417 425
                {
418 426
                    var infoId = Commons.shortGuid();
419 427
                    PreviewUserMarkupInfoItem = new MarkupInfoItem
......
438 446
                    App.Custom_ViewInfoId = infoId;
439 447
                }
440 448
            }
441
            //Logger.sendReqLog("DeleteMarkupAsync", App.ViewInfo.ProjectNO + "," + item.MarkupInfoID, 1);
449

  
442 450
            BaseClient.DeleteMarkupAsync(App.ViewInfo.ProjectNO, item.MarkupInfoID);
443 451
        }
444 452

  
......
520 528
            //timer = new Timer(timercallback, null, 0, InitInterval * 60000);
521 529
        }
522 530

  
531
        /// <summary>
532
        /// 검색을 위해 원본 PDF 파일을 다운로드한다.
533
        /// </summary>
523 534
        private void DownloadOriginalFile()
524 535
        {
525 536
            #region 임시파일 다운로드
......
593 604
            }
594 605
        }
595 606

  
596
        //private void timercallback(Object o)
597
        //{
598
        //    Stopwatch sw = new Stopwatch();
599
        //    sw.Start();
600
        //    TempFile.TempFileAdd();
601
        //    sw.Stop();
602

  
603
        //    Dispatcher.InvokeAsync(new Action(delegate
604
        //    {
605
        //        if (this.ParentOfType<MainWindow>().dzTopMenu.cbAutoSave.IsChecked == true) //Auto Save Checked?
606
        //        {
607
        //            timer.Change(((int)this.ParentOfType<MainWindow>().dzTopMenu.cbSaveInterval.Value * 60000) / 2, sw.ElapsedMilliseconds); //Timer Setting
608
        //        }
609
        //    }));
610

  
611
        //    ////GC.Collect();
612
        //}
613

  
614 607
        /// <summary>
615 608
        /// update my markuplist
616 609
        ///  - update existing markup data if already exist
MarkupToPDF/Controls/Polygon/CloudControl.cs
724 724
            //    linesize_ = arcLength_;
725 725
            var radius = arcLength_;
726 726
            double overlap =  5.5D / 6D;
727
            double delta = 2 * radius * overlap;           
727
            double delta = 2 * radius * overlap;
728 728
            pathFigure.IsClosed = false;
729 729
            pathFigure.IsFilled = false;
730 730
            var curr = p1;
......
748 748
                }
749 749

  
750 750
                ArcSegment arcSeg = new ArcSegment();
751

  
752 751
                var x = prev.X + length * dx;
753 752
                var y = prev.Y + length * dy;
754 753

  

내보내기 Unified diff

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