프로젝트

일반

사용자정보

개정판 cb5c7f06

IDcb5c7f06e634035c3e92a86516b610b5fdb14fb0
상위 2184f659
하위 3908a575

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

issue #999: fixed codes for save logic

Change-Id: I4d34d82a4b670a1bcb408047cd539f077c2a18f1

차이점 보기:

KCOM/Controls/CheckList.xaml.cs
890 890
                SelectionSet.Instance.UnSelect(menu);
891 891
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
892 892
                {
893
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
893
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
894 894
                }
895 895
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID)
896 896
                {
......
898 898
                }
899 899
                else
900 900
                {
901
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
901
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
902 902
                }
903 903
            }
904 904

  
KCOM/Controls/Symbol.xaml.cs
871 871
                SelectionSet.Instance.UnSelect(menu);
872 872
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
873 873
                {
874
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
874
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
875 875
                }
876 876
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID)
877 877
                {
......
879 879
                }
880 880
                else
881 881
                {
882
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEvent(null, null);
882
                    (Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
883 883
                }
884 884
            }
885 885
            Application.Current.MainWindow.Focus();
KCOM/Events/Event_KeyEvent.cs
150 150
                            //this.dzTopMenu.SaveEvent(null, null);
151 151
                            if (App.ViewInfo.CreateFinalPDFPermission || App.ViewInfo.NewCommentPermission)
152 152
                            {
153
                                this.dzTopMenu.SaveEvent(new object(), null);
153
                                this.dzTopMenu.SaveEventCallback(new object(), null);
154 154
                            }
155 155

  
156 156
                            //저장완료후 임시파일 삭제
KCOM/Events/Implementation/TopMenuEvent.cs
254 254
            //if (this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode != IKCOM.MouseHandlingMode.Drawing)
255 255
            if (this.ParentOfType<MainWindow>().dzMainMenu.currentControl == null && this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count == 0)
256 256
            {
257
                SaveEvent(null, null);
257
                SaveEventCallback(null, null);
258 258
            }
259

  
260 259
        }
261 260

  
262 261
        private void SaveTime(bool IsRun)
......
305 304
        /// </summary>
306 305
        /// <param name="sender"></param>
307 306
        /// <param name="e"></param>
308
        public void SaveEvent(object sender, RoutedEventArgs e)
307
        public void SaveEventCallback(object sender, RoutedEventArgs e)
309 308
        {
310 309
            if (this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy == true) return;
311 310

  
......
321 320

  
322 321
        /// <summary>
323 322
        /// save markup
324
        /// </summary>
323
        ///  - convert ink control to polygon control if ink control exists
324
        ///  - unselect and update my markup list
325 325
        /// <param name="sender"></param>
326 326
        /// <param name="e"></param>
327 327
        public void _SaveEvent(object sender, RoutedEventArgs e)
......
329 329
            var menu = this.ParentOfType<MainWindow>().dzMainMenu;
330 330
            try
331 331
            {
332
                SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
332
                menu.ConvertInkControlToPolygon();
333 333

  
334
                SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu);
334 335
                // update mylist and gridview
335 336
                menu.UpdateMyMarkupList();
336 337

  
337
                this.ParentOfType<MainWindow>().dzMainMenu.ConvertInkControlToPolygon();
338
                if (ViewerDataModel.Instance.UndoDataList.Count == 0) return;
338 339

  
339 340
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
340 341
                {
......
343 344
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0)
344 345
                {
345 346
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
346
                    return;
347 347
                }
348 348
                else
349 349
                {                    
......
353 353
                        {
354 354
                            this.ExecuteSaveCommand(menu);
355 355
                            ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now;
356
                            if (ViewerDataModel.Instance.IsConsolidate)
357
                            {
358
                                return;
359
                            }
360

  
361
                            if (sender != null)
356
                            if (!ViewerDataModel.Instance.IsConsolidate && (sender != null))
362 357
                            {
363 358
                                if (ViewerDataModel.Instance.IsPressCtrl)
364 359
                                {
......
366 361
                                }
367 362
                                this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert");
368 363
                            }
369
                            return;
370 364
                        }
371 365
                    }
372 366
                }
367

  
373 368
                if (sender != null)
374 369
                {
375
                    if (ViewerDataModel.Instance.IsPressCtrl)
376
                    {
377
                        ViewerDataModel.Instance.IsPressCtrl = false;
378
                    }
370
                    if (ViewerDataModel.Instance.IsPressCtrl) ViewerDataModel.Instance.IsPressCtrl = false;
379 371
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert");
380 372
                }
373

  
374
                ViewerDataModel.Instance.UndoDataList.Clear();
381 375
            }
382
            catch(Exception ex)
376
            catch (Exception ex)
383 377
            {
384 378
               
385 379
            }
......
449 443
                SelectionSet.Instance.UnSelect(menu);
450 444
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
451 445
                {
452
                    this.SaveEvent(null, null);
446
                    this.SaveEventCallback(null, null);
453 447
                }
454 448
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID)
455 449
                {
......
457 451
                }
458 452
                else
459 453
                {
460
                    this.SaveEvent(null, null);
454
                    this.SaveEventCallback(null, null);
461 455
                }
462 456
            }
463 457

  
KCOM/MainWindow.xaml.cs
347 347
        {
348 348
            if (e.DialogResult == true)
349 349
            {
350
                dzTopMenu.SaveEvent(null, null);
350
                dzTopMenu.SaveEventCallback(null, null);
351 351
            }
352 352
        }
353 353

  
KCOM/Views/MainMenu.xaml.cs
545 545
            var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault();
546 546
            drawingPannelRotate(pageinfo.PAGE_ANGLE);
547 547

  
548
            //}
549 548
            SetCommentPages(true);
550 549
        }
550

  
551
        /// <summary>
552
        /// start page changing
553
        ///  - save controls if page is modified
554
        ///  - starting download page image
555
        /// </summary>
556
        /// <param name="sender"></param>
557
        /// <param name="e"></param>
551 558
        private void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
552 559
        {
553
            
554
            if (ViewerDataModel.Instance.UndoDataList.Count > 0)
555
            {            
556
                this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null);
557
            }
558
            
559
            ViewerDataModel.Instance.UndoDataList.Clear();
560

  
561
            ConvertInkControlToPolygon();
562

  
563
            SelectionSet.Instance.UnSelect(this);
564
            UpdateMyMarkupList();
560
            this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null);
565 561

  
566 562
            CompareMode.IsChecked = false;
567 563
            var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? e.PageNumber + ViewerDataModel.Instance.PageBalanceNumber : e.PageNumber;
568 564

  
569

  
570 565
            #region 페이지가 벗어난 경우
571 566

  
572 567
            if (BalancePoint < 1)
KCOM/Views/TopMenu.xaml
56 56
                        <StackPanel Orientation="Horizontal">
57 57
                            <telerik:RadRibbonButton Content="Print" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/printer.png" Click="PrintEvent"/>
58 58
                            <telerik:RadRibbonButton Content="Export" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/topdf.png" Click="PrintEvent"/>
59
                            <telerik:RadRibbonButton Content="SAVE" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/diskette2.png" Click="SaveEvent"/>
59
                            <telerik:RadRibbonButton Content="SAVE" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/diskette2.png" Click="SaveEventCallback"/>
60 60
                            <Grid Margin="0,-1,0,0">
61 61
                                <Grid.ColumnDefinitions>
62 62
                                    <ColumnDefinition/>                                    
......
1258 1258
                        <StackPanel Orientation="Horizontal">
1259 1259
                            <telerik:RadRibbonButton Content="Print" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/printer.png" Click="PrintEvent"/>
1260 1260
                            <telerik:RadRibbonButton Content="Export"  Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/topdf.png" Click="PrintEvent"/>
1261
                            <telerik:RadRibbonButton x:Name="SAVE" Content="SAVE" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/diskette2.png" Click="SaveEvent"/>
1261
                            <telerik:RadRibbonButton x:Name="SAVE" Content="SAVE" Size="Large" LargeImage="/KCOM;component/Resources/Images/MenuImage_new/diskette2.png" Click="SaveEventCallback"/>
1262 1262
                            
1263 1263
                            
1264 1264
                            <!--<telerik:RadRibbonButton Content="GO"  

내보내기 Unified diff

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