프로젝트

일반

사용자정보

개정판 d7548b21

IDd7548b21a761c8bd101a41da40185ac7b1302f84
상위 d4b461e2
하위 51e24238

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

issue #664 빈 Text 저장 및 삭제 건

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
28 28
using MarkupToPDF.Common;
29 29
using KCOM.Controls;
30 30
using KCOMDataModel.DataModel;
31
using System.Xml;
31 32

  
32 33
namespace KCOM.Views
33 34
{
......
271 272
            return false;
272 273
        }
273 274

  
275
       
274 276
        public void DeleteItem(MarkupInfoItem item)
275 277
        {
276 278
            if (PreviewUserMarkupInfoItem != null && item.Consolidate == 1 && item.AvoidConsolidate == 0)
......
354 356
                da.To = 0;
355 357
                da.Duration = new Duration(TimeSpan.FromSeconds(1));
356 358
                da.AutoReverse = true;
357
                da.RepeatBehavior = System.Windows.Media.Animation.RepeatBehavior.Forever;
359
                da.RepeatBehavior = System.Windows.Media.Animation.RepeatBehavior.Forever;                
358 360
            }
359
        }
361
        }        
360 362

  
361 363
        public void ReleaseAdorner()
362 364
        {
......
429 431
                foreach (var control in ViewerDataModel.Instance.MarkupControls_USER)
430 432
                {
431 433
                    var root = layerControl.MarkupToString(control, App.ViewInfo.UserID);
432
                    var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault();
433
                    if (existItem != null) //신규 추가 된 코멘트
434
                    {
435
                        if (existItem.Data != root.ConvertData) //코멘트가 같은지
436
                        {
437
                            existItem.Data = root.ConvertData;
438
                            existItem.IsUpdate = true;
439
                        }
440
                    }
441
                    else
442
                    {
443
                        if (root.CommentID != null)
434

  
435
                   
436
                        var existItem = ViewerDataModel.Instance.MarkupList_USER.Where(data => data.ID == root.CommentID).FirstOrDefault();
437
                        if (existItem != null) //신규 추가 된 코멘트
444 438
                        {
445
                            isComingNewBie = true;
446
                            var currentCommentCheck = ViewerDataModel.Instance.MarkupList_USER.Where(dt => dt.ID == control.CommentID).FirstOrDefault();
447
                            if (currentCommentCheck != null)
439
                            if (existItem.Data != root.ConvertData) //코멘트가 같은지
448 440
                            {
449
                                currentCommentCheck.Data = root.ConvertData;
441
                                existItem.Data = root.ConvertData;
442
                                existItem.IsUpdate = true;
450 443
                            }
451
                            else
444
                        }
445
                        else
446
                        {
447
                            if (root.CommentID != null)
452 448
                            {
453
                                ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx
449
                                isComingNewBie = true;
450
                                var currentCommentCheck = ViewerDataModel.Instance.MarkupList_USER.Where(dt => dt.ID == control.CommentID).FirstOrDefault();
451
                                if (currentCommentCheck != null)
452
                                {
453
                                    currentCommentCheck.Data = root.ConvertData;
454
                                }
455
                                else
454 456
                                {
455
                                    ID = control.CommentID,
456
                                    Data = root.ConvertData,
457
                                    Data_Type = root.DATA_TYPE,
458
                                    MarkupInfoID = App.Custom_ViewInfoId,
459
                                    PageNumber = this.pageNavigator.CurrentPage.PageNumber,
460
                                });
457
                                    ViewerDataModel.Instance.MarkupList_USER.Add(new MarkupItemEx
458
                                    {
459
                                        ID = control.CommentID,
460
                                        Data = root.ConvertData,
461
                                        Data_Type = root.DATA_TYPE,
462
                                        MarkupInfoID = App.Custom_ViewInfoId,
463
                                        PageNumber = this.pageNavigator.CurrentPage.PageNumber,
464
                                    });
465
                                }
461 466
                            }
462 467
                        }
463
                    }
468
                    
469

  
470
                    
464 471
                }
465 472
            }
466 473

  
......
484 491

  
485 492
        private void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
486 493
        {
494

  
495
            for (var j = 0; j < (Common.ViewerDataModel.Instance.MarkupControls_USER).Count; j++)
496
            {    
497
                if (((Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).GetType().Name == "TextControl")
498
                {                    
499
                    if (((MarkupToPDF.Controls.Text.TextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Text == null
500
                    || ((MarkupToPDF.Controls.Text.TextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Text == "")
501
                    {
502
                        Common.ViewerDataModel.Instance.MarkupControls_USER.RemoveAt(j);
503
                    }
504
                }
505
                else if (((Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).GetType().Name == "ArrowTextControl")
506
                {
507
                    if (((MarkupToPDF.Controls.Text.ArrowTextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Base_TextBox.Text == null
508
                    || ((MarkupToPDF.Controls.Text.ArrowTextControl)(Common.ViewerDataModel.Instance.MarkupControls_USER)[j]).Base_TextBox.Text == "")
509
                    {
510
                        Common.ViewerDataModel.Instance.MarkupControls_USER.RemoveAt(j);
511
                    }
512
                }
513
            }
514

  
487 515
            if (ViewerDataModel.Instance.UndoDataList.Count > 0)
488
            {
516
            {   
489 517
                this.ParentOfType<MainWindow>().dzTopMenu.SaveEvent(null, null);
490 518
            }
491 519

  
......
647 675
            Common.ViewerDataModel.Instance.MarkupControls.Clear();  //전체 제거
648 676

  
649 677
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
678
 
650 679
            foreach (var item in gridSelectionItem)
651 680
            {
652 681
                if (item.UserID == App.ViewInfo.UserID)
......
665 694
                }
666 695
            }
667 696

  
668

  
669 697
            if (!testPanel2.IsHidden)
670 698
            {
671 699
                ViewerDataModel.Instance.Sync_ContentOffsetX = zoomAndPanControl.ContentOffsetX;
......
686 714

  
687 715
            }
688 716

  
689

  
690

  
691 717
            var instanceMain = this.ParentOfType<MainWindow>();
692 718
            instanceMain.dzTopMenu.tlcurrentPage.Text = e.CurrentPage.PAGE_NUMBER.ToString();
693 719
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = e.CurrentPage.PAGE_NUMBER.ToString();
......
4442 4468
                                RemoveLineStroke(canvasDrawingMouseDownPoint);
4443 4469
                            }
4444 4470
                            IsDrawing = true;
4471

  
4472
                            temp.AddTemp(currentControl);
4445 4473
                            return;
4446 4474
                        }
4447 4475
                    default:
......
4452 4480
                        }
4453 4481
                        break;
4454 4482
                }
4455

  
4456 4483
            }
4457 4484
            if (mouseHandlingMode != MouseHandlingMode.None && mouseButtonDown == MouseButton.Left)
4458 4485
            {
......
5069 5096
                            ViewerDataModel.Instance.ImageViewHeight_C = defaultBitmapImage_Compare.PixelHeight;
5070 5097
                        };
5071 5098
                    }
5072

  
5099
                    
5100
                    
5073 5101
                    zoomAndPanCanvas2.Width = Convert.ToDouble(Common.ViewerDataModel.Instance.ContentWidth);
5074 5102
                    zoomAndPanCanvas2.Height = Convert.ToDouble(Common.ViewerDataModel.Instance.ContentHeight);
5075 5103
                    zoomAndPanControl2.ApplyTemplate();
......
5355 5383
        }
5356 5384
        #endregion
5357 5385

  
5386
        TempFile temp = new TempFile();
5387
        //MarkupInfoItem
5358 5388
        public void CreateControl()
5359 5389
        {
5390
            
5360 5391
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
5361 5392
            {
5362 5393
                ViewerDataModel.Instance.UndoDataList.Remove(i);
5363 5394
            });
5364 5395
            multi_Undo_Data.Markup = currentControl;
5365 5396
            UndoData.Markup_List.Add(multi_Undo_Data);
5397
           
5366 5398
            ViewerDataModel.Instance.UndoDataList.Add(UndoData);
5399

  
5400
            //List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList();
5401

  
5402
            temp.AddTemp(currentControl);
5367 5403
        }
5368 5404

  
5405
        
5369 5406
        public Multi_Undo_data Control_Style(CommentUserInfo control)
5370 5407
        {
5371 5408
            multi_Undo_Data = new Multi_Undo_data();
......
5406 5443
            if (undo == null)
5407 5444
                return;
5408 5445

  
5446
            
5447

  
5409 5448
            switch (undo.Event)
5410 5449
            {
5411 5450
                case (Event_Type.Create):
......
5413 5452
                        foreach (var item in undo.Markup_List)
5414 5453
                        {
5415 5454
                            ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup));
5455
                            //임시파일에서도 삭제한다.
5456
                            temp.DataDel(item.Markup.CommentID);
5416 5457
                        }
5417 5458
                    }
5418 5459
                    break;
......
5549 5590
                        foreach (var item in redo.Markup_List)
5550 5591
                        {
5551 5592
                            ViewerDataModel.Instance.MarkupControls_USER.Add(item.Markup);
5593
                            temp.AddTemp(item.Markup);
5552 5594
                        }
5553 5595
                    }
5554 5596
                    break;

내보내기 Unified diff

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