프로젝트

일반

사용자정보

개정판 b42dd24d

IDb42dd24ddb89ae3b28024ec36780f58abfd055db
상위 a1e2ba68
하위 bae83c92

김태성이(가) 3년 이상 전에 추가함

finalPDF 수정

Change-Id: Ic1c091379dcc59c6c7a0f42f275a4d57a9239229

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
25 25
using System.ComponentModel;
26 26
using System.Web;
27 27
using Markus.Fonts;
28
using System.Threading.Tasks;
28 29

  
29 30
namespace KCOM.Views
30 31
{
......
338 339
        ///  - unselect and update my markup list
339 340
        /// <param name="sender"></param>
340 341
        /// <param name="e"></param>
341
        public void _SaveEvent(object sender, RoutedEventArgs e)
342
        public bool _SaveEvent(object sender, RoutedEventArgs e)
342 343
        {
344
            bool result = false;
345

  
343 346
            var mainMenu = this.ParentOfType<MainWindow>().dzMainMenu;
344 347
            try
345 348
            {
......
366 369
                            if (!ViewerDataModel.Instance.IsConsolidate && (sender != null))
367 370
                            {
368 371
                                this.ParentOfType<MainWindow>().DialogMessage_Alert("Save is complete.", "Info");
372
                                
369 373
                            }
374

  
375
                            result = true;
370 376
                        }
371 377
                    }
372 378
                }
......
395 401
                }
396 402
                */
397 403
            }
404

  
405
            return result;
398 406
        }
399 407

  
400 408
        /// <summary>
401 409
        /// call save command
402 410
        /// </summary>
403 411
        /// <param name="menu"></param>
404
		private void ExecuteSaveCommand(MainMenu menu)
412
		public void ExecuteSaveCommand2(MainMenu menu)
405 413
        {
406 414
            if (menu.pageNavigator.CurrentPage != null)
407 415
            {
......
443 451
            }
444 452
        }
445 453

  
454
        public async Task<bool> ExecuteSaveCommand(MainMenu menu)
455
        {
456
            bool result = false;
457

  
458
            if (menu.pageNavigator.CurrentPage != null)
459
            {
460
                SaveCommand.Instance.Project_No = App.ViewInfo.ProjectNO;
461
                SaveCommand.Instance.document_id = App.ViewInfo.DocumentItemID;
462
                SaveCommand.Instance.user_id = App.ViewInfo.UserID;
463
                SaveCommand.Instance.page_no = menu.pageNavigator.CurrentPage.PageNumber;
464

  
465
                try
466
                {
467
                    if (ViewerDataModel.Instance.UndoDataList.Count > 0)
468
                    {
469
                        List<IKCOM.MarkupInfoItem> SelectedMarkupInfos = new List<IKCOM.MarkupInfoItem>();
470
                        foreach (var item in menu.gridViewMarkup.SelectedItems)
471
                        {
472
                            if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
473
                            {
474
                                SelectedMarkupInfos.Add(item as IKCOM.MarkupInfoItem);
475
                            }
476
                        }
477

  
478
                        result = await SaveCommand.Instance.Execute(SelectedMarkupInfos);
479
                    }
480
                    else
481
                    {
482
                        result = true;
483
                    }
484

  
485
                    if (ViewerDataModel.Instance.RotationDocs.Count > 0)
486
                    {
487
                        SaveCommand.Instance.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
488
                    }
489
                }
490
                catch (Exception ex)
491
                {
492
                    this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert(string.Format("세이브 실패:{0}", ex.Message), "Alert");
493
                    throw ex;
494
                }
495
            }
496
            else
497
            {
498
                System.Diagnostics.Debug.WriteLine("ExecuteSaveCommand Error - pageNavigator.CurrentPage null");
499
            }
500

  
501
            return result;
502
        }
503

  
446 504
        //강인구 추가
447 505
        public void Print_Start(string Type)
448 506
        {

내보내기 Unified diff

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