프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Services / BaseServices.cs @ 5ded1e5a

이력 | 보기 | 이력해설 | 다운로드 (41.5 KB)

1 787a4489 KangIngu
using Microsoft.AspNet.SignalR.Client;
2
using IKCOM;
3
using KCOM.Common;
4
using KCOM.ServiceDeepView;
5
using KCOMDataModel.DataModel;
6
using Newtonsoft.Json;
7
using RestSharp;
8
using System;
9
using System.Collections.Generic;
10
using System.Collections.ObjectModel;
11
using System.ComponentModel;
12
using System.Linq;
13
using System.Runtime.CompilerServices;
14
using System.Text;
15
using System.Windows;
16
using System.Windows.Controls;
17
using Telerik.Windows.Controls;
18 036650a0 humkyung
using MarkupToPDF.Controls.Parsing;
19 fddb48f7 ljiyeon
using Telerik.Windows.Data;
20 90a0bfa9 djkim
using System.Web;
21 787a4489 KangIngu
22
namespace KCOM.Views
23
{
24
    public partial class MainMenu : UserControl, INotifyPropertyChanged
25 29010418 ljiyeon
    {
26 eb5cdefc djkim
        //const string DeepZoomUrl = @"http://{baseUrl}/TileSource/{TileSourcePath}/{ItemsPath}/{SharepointItemID}/{PageNo}.jpg";
27 787a4489 KangIngu
        public ServiceDeepViewClient BaseClient;
28
        public ViewInfo _ViewInfo;
29
        public DOCINFO _DocInfo;
30
        public DOCUMENT_ITEM _DocItem;
31
        public MEMBER userData;
32
33
        public event PropertyChangedEventHandler PropertyChanged;
34
        private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
35
        {
36
            if (PropertyChanged != null)
37
            {
38
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
39
            }
40
        }
41
42
        private Common.DocumentSet _CurrentDoc { get; set; }
43
        public Common.DocumentSet CurrentDoc
44
        {
45
            get
46
            {
47
                return _CurrentDoc;
48
            }
49
            set
50
            {
51
                if (value != CurrentDoc)
52
                {
53
                    _CurrentDoc = value;
54
                    NotifyPropertyChanged();
55
                }
56
            }
57
        }
58
        public void ServiceOn()
59
        {
60 29010418 ljiyeon
            BaseClient = new ServiceDeepViewClient(App._binding, App._EndPoint);
61
62 787a4489 KangIngu
            BaseClient.GetDocInfoCompleted += BaseClient_GetDocInfoCompleted; //문서 섬네일, 페이지크기, 마크업 정보 [3]
63 0f065e57 ljiyeon
            BaseClient.GetConversionStateCompleted += BaseClient_GetConversionStateCompleted;  //컨버팅의 여부 [2] 
64
            BaseClient.GetSystemDataCompleted += BaseClient_GetSystemDataCompleted; //시스템 정보 [1] 
65 787a4489 KangIngu
            BaseClient.GetDocumentItemInfoCompleted += BaseClient_GetDocumentItemInfoCompleted; // 문서 자체의 정보 [4]
66 29010418 ljiyeon
            BaseClient.GetMarkupInfoItemsCompleted += BaseClient_GetMarkupInfoItemsCompleted;
67
            BaseClient.GetDeptDataCompleted += BaseClient_GetDeptDataCompleted;
68
            BaseClient.DeleteMarkupCompleted += BaseClient_DeleteMarkupCompleted;
69 787a4489 KangIngu
            BaseClient.GetVPRevisionHistoryCompleted += BaseClient_GetVPRevisionHistoryCompleted;
70 29010418 ljiyeon
            BaseClient.SetFinalPDFCompleted += BaseClient_SetFinalPDFCompleted;
71
            BaseClient.GetCompareRectCompleted += BaseClient_GetCompareRectCompleted;
72
            BaseClient.DeleteMarkupCompleted += BaseClient_DeleteMarkupCompleted;
73
            BaseClient.DelFavoriteVPCompleted += BaseClient_DelFavoriteVPCompleted;
74
            BaseClient.EditFavoriteVPCompleted += BaseClient_EditFavoriteVPCompleted;
75 992a98b4 KangIngu
        }
76
77 29010418 ljiyeon
78 992a98b4 KangIngu
79
        private void BaseClient_EditFavoriteVPCompleted(object sender, EditFavoriteVPCompletedEventArgs e)
80
        {
81 0f065e57 ljiyeon
            Logger.sendResLog("EditFavoriteVPCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
82
            
83 53880c83 ljiyeon
            if (e.Error == null && e.Result != false)
84 992a98b4 KangIngu
            {
85 0f065e57 ljiyeon
                Logger.sendReqLog("GetFavoriteVPAsync", App.ViewInfo.ProjectNO + "," + App.ViewInfo.UserID + "," + App.ViewInfo.DocumentItemID, 1);
86 992a98b4 KangIngu
                BaseClient.GetFavoriteVPAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, App.ViewInfo.DocumentItemID);
87
            }
88
            else
89
            {
90
                DialogMessage_Alert("Unable to delete the file due to a system failure", "Warning");
91
            }
92
        }
93
94
        private void BaseClient_DelFavoriteVPCompleted(object sender, DelFavoriteVPCompletedEventArgs e)
95
        {
96 0f065e57 ljiyeon
            Logger.sendResLog("DelFavoriteVPCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
97
98 53880c83 ljiyeon
            if (e.Error == null && e.Result != false)
99 992a98b4 KangIngu
            {
100 0f065e57 ljiyeon
                Logger.sendReqLog("GetFavoriteVPAsync", App.ViewInfo.ProjectNO + "," + App.ViewInfo.UserID + "," + App.ViewInfo.DocumentItemID, 1);
101 992a98b4 KangIngu
                BaseClient.GetFavoriteVPAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, App.ViewInfo.DocumentItemID);
102
            }
103
            else
104
            {
105
                DialogMessage_Alert("Unable to delete the file due to a system failure", "Warning");
106
            }
107 787a4489 KangIngu
        }
108
109 992a98b4 KangIngu
110 787a4489 KangIngu
        private void BaseClient_GetCompareRectCompleted(object sender, GetCompareRectCompletedEventArgs e)
111
        {
112 0f065e57 ljiyeon
            Logger.sendResLog("GetCompareRectCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
113
114 787a4489 KangIngu
            if (e.Error != null || e.Result == null)
115
            {
116
                DialogMessage_Alert("Compare 기능을 원활히 실행하기 위한 데이터가 부족합니다", "안내");
117
            }
118
            else
119
            {
120
                e.Result.ForEach(d =>
121
                {
122
                    d.Width = d.Width * 3;
123
                    d.Height = d.Height * 3;
124
                    var point = MarkupToPDF.Controls.Common.MathSet.getRectMiddlePoint(d);
125
                    System.Windows.Shapes.Ellipse myEllipse = new System.Windows.Shapes.Ellipse();
126
                    myEllipse.Fill = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Red);
127
                    myEllipse.Opacity = 1;
128
                    myEllipse.Width = d.Width;
129
                    myEllipse.Height = d.Height;
130
                    Canvas.SetLeft(myEllipse, d.X - ((point.X - d.X) / 2.0));
131
                    Canvas.SetTop(myEllipse, d.Y - ((point.Y - d.Y) / 2.0));
132
                    myEllipse.RenderTransformOrigin = point;
133
                    canvas_compareBorder.Children.Add(myEllipse);
134
                });
135
136
                da.From = 0.8;
137
                da.To = 0;
138
                da.Duration = new Duration(TimeSpan.FromSeconds(1));
139
                da.AutoReverse = true;
140
                canvas_compareBorder.BeginAnimation(OpacityProperty, da);
141
            }
142
        }
143
144
        private void BaseClient_SetFinalPDFCompleted(object sender, SetFinalPDFCompletedEventArgs e)
145
        {
146 0f065e57 ljiyeon
            Logger.sendResLog("SetFinalPDFCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
147 84c48033 djkim
            string errormsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFError", "MSG", "최종 파일을 만드는데 문제가 발생하였습니다");
148
            string successmsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFSuccess", "MSG", "최종 파일 생성 중입니다. 문서관리시스템을 확인해주세요");
149 29010418 ljiyeon
            if (e.Error != null || e.Result.Status == FinalStatus.Error)
150 787a4489 KangIngu
            {
151 84c48033 djkim
                DialogMessage_Alert(errormsg, "안내");
152 787a4489 KangIngu
            }
153
            else
154
            {
155 84c48033 djkim
                DialogMessage_Alert(successmsg, "안내");
156 787a4489 KangIngu
            }
157
        }
158
159
        private void BaseClient_GetVPRevisionHistoryCompleted(object sender, GetVPRevisionHistoryCompletedEventArgs e)
160
        {
161 0f065e57 ljiyeon
            Logger.sendResLog("GetVPRevisionHistoryCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
162
163 787a4489 KangIngu
            if (e.Result != null && e.Error == null)
164
            {
165 90a0bfa9 djkim
                List<VPRevision> list = e.Result;
166
                foreach (var item in list)
167
                {
168
                    item.FROM_VENDOR = HttpUtility.UrlDecode(item.FROM_VENDOR);
169
                }
170
                gridViewHistory.ItemsSource = list;
171
172 787a4489 KangIngu
            }
173 f9fb5500 ljiyeon
            //TempFile.TempLoad();
174 787a4489 KangIngu
        }
175
176
        private void BaseClient_DeleteMarkupCompleted(object sender, DeleteMarkupCompletedEventArgs e)
177
        {
178 0f065e57 ljiyeon
            Logger.sendResLog("DeleteMarkupCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
179
180 d128ceb2 humkyung
            foreach(var info in ViewerDataModel.Instance._markupInfoList)
181
            {
182
                if(info.UserID == App.ViewInfo.UserID)
183
                {
184
                    info.userDelete = true;
185
                    info.DisplayColor = "FFFF0000";
186
                }
187
                else
188
                {
189
                    info.userDelete = false;
190
                }
191
            }
192 787a4489 KangIngu
        }
193
194
        private void BaseClient_GetDeptDataCompleted(object sender, GetDeptDataCompletedEventArgs e)
195
        {
196 0f065e57 ljiyeon
            Logger.sendResLog("GetDeptDataCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
197
198 787a4489 KangIngu
            if (e.Result != null)
199
            {
200
                e.Result.Sort();
201
                //cbSymbolPublic.ItemsSource = e.Result.ToList();
202
            }
203
        }
204 29010418 ljiyeon
        public MarkupInfoItem PreviewUserMarkupInfoItem { get; set; }
205 787a4489 KangIngu
206 35a96e24 humkyung
        /// <summary>
207 d62c0439 humkyung
        /// 문서 정보를 가져온다
208
        /// </summary>
209
        /// <param name="sender"></param>
210
        /// <param name="e"></param>
211
        private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e)
212
        {
213
            Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
214
215
            if (e.Error != null)
216
            {
217
                DialogMessage_Alert("페이지정보를 가져올 수 없습니다.", "Alert");
218
                return;
219
            }
220
221 ff01c725 humkyung
            string sFolder = _ViewInfo.DocumentItemID.All(char.IsDigit) ? (Convert.ToUInt32(_ViewInfo.DocumentItemID) / 100).ToString() : (_ViewInfo.DocumentItemID.Length >= 5 ? _ViewInfo.DocumentItemID.Substring(0, 5) : _ViewInfo.DocumentItemID);
222
            var MainUrl = string.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal).Replace("png","jpg"), _ViewInfo.ProjectNO, sFolder, _ViewInfo.DocumentItemID, "{PageNo}");
223 d62c0439 humkyung
            _DocInfo = e.Result;
224 90a0bfa9 djkim
            _DocInfo.ORIGINAL_FILE = HttpUtility.UrlDecode(_DocInfo.ORIGINAL_FILE);
225 d62c0439 humkyung
            foreach (var item in _DocInfo.DOCPAGE.OrderBy(order => order.PAGE_NUMBER))
226
            {
227
                ViewerDataModel.Instance.Document_Info.Add(item);
228
            }
229
            Logger.sendReqLog("GetMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID, 1);
230
            BaseClient.GetMarkupInfoItemsAsync(_ViewInfo.ProjectNO, _DocInfo.ID);
231
            CurrentDoc = new Common.DocumentSet
232
            {
233
                docInfo = _DocInfo,
234
                Document_Id = _DocInfo.DOCUMENT_ID,
235
                Document_NO = _DocItem.DOCUMENT_NO,
236
                File_Original = _DocInfo.ORIGINAL_FILE,
237
                File_Result = _DocItem.RESULT_FILE,
238
                Group_No = _DocItem.GROUP_NO,
239
                ProjectNo = _DocItem.PROJECT_NO,
240
                Revision = _DocItem.REVISION,
241
            };
242
            var instanceMain = this.ParentOfType<MainWindow>();
243 944be2fa djkim
            string firstpage = "1";
244
            string lastpage = _DocInfo.PAGE_COUNT.ToString();
245
            instanceMain.dzTopMenu.tlcurrentPage.Text = firstpage;
246
            instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = lastpage;
247 d62c0439 humkyung
            string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem.DOCUMENT_NO, _DocItem.REVISION, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
248
            instanceMain.TitleText.Text = apptitle;
249
            instanceMain.Title = apptitle;
250
            this.pageNavigator.SetPageNavi(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl);
251
252
            ViewerDataModel.Instance.MarkupControls_USER.Clear();
253
254
            //ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad();
255
256
            Logger.sendReqLog("GetVPRevisionHistoryAsync", CurrentDoc.ProjectNo + "," + CurrentDoc.Document_NO + "," + CurrentDoc.Document_Id, 1);
257 944be2fa djkim
            BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id);            
258 d62c0439 humkyung
        }
259
260
        /// <summary>
261 35a96e24 humkyung
        /// get markupinfo and markupitem from database
262 a36a37c3 humkyung
        ///  - 1. called when document is loaded
263
        ///  - 2. called when user do consolidation
264 35a96e24 humkyung
        /// </summary>
265
        /// <param name="sender"></param>
266
        /// <param name="e"></param>
267 787a4489 KangIngu
        private void BaseClient_GetMarkupInfoItemsCompleted(object sender, GetMarkupInfoItemsCompletedEventArgs e)
268
        {
269 0f065e57 ljiyeon
            Logger.sendResLog("GetMarkupInfoItemsCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
270
271 787a4489 KangIngu
            ViewerDataModel.Instance.MarkupControls_USER.Clear();
272
            ViewerDataModel.Instance.MarkupControls.Clear();
273
            if (e.Result != null)
274
            {
275 d128ceb2 humkyung
                ViewerDataModel.Instance._markupInfoList.Clear();
276 3ffd4b2d humkyung
                if (e.Result.Count > 0) ViewerDataModel.Instance.MyMarkupList.Clear();
277 787a4489 KangIngu
278 d128ceb2 humkyung
                foreach(var info in e.Result)
279
                {
280
                    if (info.UserID == App.ViewInfo.UserID)
281
                    {
282
                        info.userDelete = true;
283
                        info.DisplayColor = "#FFFF0000";
284
                    }
285
                    else
286
                    {
287
                        info.userDelete = false;
288
                    }
289
                    ViewerDataModel.Instance._markupInfoList.Add(info);
290
                }
291
292 a36a37c3 humkyung
                e.Result.ToList().ForEach(d => d.MarkupList.ForEach(p =>
293 787a4489 KangIngu
                {
294 29010418 ljiyeon
                    if (d.UserID == App.ViewInfo.UserID)
295 787a4489 KangIngu
                    {
296
                        d.userDelete = true;
297
                        d.DisplayColor = "#FFFF0000";
298
299 35a96e24 humkyung
                        MarkupItemEx markup = new MarkupItemEx
300 787a4489 KangIngu
                        {
301
                            Data = p.Data,
302
                            Data_Type = p.Data_Type,
303
                            ID = p.ID,
304
                            IsUpdate = false,
305
                            MarkupInfoID = d.MarkupInfoID,
306
                            PageNumber = p.PageNumber,
307 c8e9b3e4 ljiyeon
                            Symbol_ID = p.Symbol_ID,
308 c0977e97 djkim
                            //Group_ID = p.Group_ID
309 35a96e24 humkyung
                        };
310 d62c0439 humkyung
                        ViewerDataModel.Instance.MyMarkupList.Add(markup);
311 787a4489 KangIngu
                    }
312
                    else
313
                    {
314 35a96e24 humkyung
                        MarkupItemEx markup = new MarkupItemEx
315 787a4489 KangIngu
                        {
316
                            Data = p.Data,
317
                            Data_Type = p.Data_Type,
318
                            ID = p.ID,
319
                            IsUpdate = false,
320
                            MarkupInfoID = d.MarkupInfoID,
321
                            PageNumber = p.PageNumber,
322 c8e9b3e4 ljiyeon
                            Symbol_ID = p.Symbol_ID,
323 c0977e97 djkim
                            //Group_ID = p.Group_ID
324 35a96e24 humkyung
                        };
325
                        ViewerDataModel.Instance.MarkupList_Pre.Add(markup);
326 787a4489 KangIngu
                    }
327
                }));
328
329 a36a37c3 humkyung
                var currentUser = e.Result.Where(data => data.UserID == App.ViewInfo.UserID && data.AvoidConsolidate == 0).FirstOrDefault();
330 787a4489 KangIngu
                if (currentUser == null)
331
                {
332 a36a37c3 humkyung
                    /// create a new markupinfo to do comments
333 24678e06 humkyung
                    var infoId = Commons.shortGuid();
334 787a4489 KangIngu
                    PreviewUserMarkupInfoItem = new MarkupInfoItem
335
                    {
336
                        CreateTime = DateTime.Now,
337 073f6118 djkim
                        UpdateTime = DateTime.Now,
338 787a4489 KangIngu
                        Depatment = userData.DEPARTMENT,
339
                        DisplayColor = "#FFFF0000",
340
                        UserID = userData.ID,
341
                        UserName = userData.NAME,
342
                        PageCount = 1,
343
                        Description = "",
344
                        MarkupInfoID = infoId,
345
                        MarkupList = null,
346 24678e06 humkyung
                        MarkupVersionID = Commons.shortGuid(),
347 787a4489 KangIngu
                        Consolidate = 0,
348
                        PartConsolidate = 0,
349
                        userDelete = true,
350
                        AvoidConsolidate = 0,
351 8129f2a5 ljiyeon
                        IsPreviewUser = false
352 787a4489 KangIngu
                    };
353
354
                    App.Custom_ViewInfoId = infoId;
355 8129f2a5 ljiyeon
356
                    ViewerDataModel.Instance._markupInfoList.Insert(0, PreviewUserMarkupInfoItem);
357 787a4489 KangIngu
                }
358
                else
359
                {
360
                    App.Custom_ViewInfoId = currentUser.MarkupInfoID;
361
                }
362
363 a36a37c3 humkyung
                foreach(var info in e.Result)
364 d128ceb2 humkyung
                {
365
                    if (info.UserID == App.ViewInfo.UserID) info.DisplayColor = "#FFFF0000";
366
                }
367 787a4489 KangIngu
368 3ffd4b2d humkyung
                ViewerDataModel.Instance.PageNumber = 1;
369
370 a36a37c3 humkyung
                /// Consolidation 된 데이터가 최상단에 올 수 있도록 변경
371 35a96e24 humkyung
                var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList();
372 787a4489 KangIngu
                markupItem.ForEach(data =>
373
                {
374 35a96e24 humkyung
                    if (data.Depatment == null) data.Depatment = "Unknown";
375 787a4489 KangIngu
                });
376
                gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
377 29010418 ljiyeon
                SetCommentPages();
378 992a98b4 KangIngu
379 a36a37c3 humkyung
                var SelectedItem = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.UpdateTime).FirstOrDefault();
380
                this.gridViewMarkup.SelectedItem = (PreviewUserMarkupInfoItem != null) ? PreviewUserMarkupInfoItem : SelectedItem;
381 073f6118 djkim
                
382 a36a37c3 humkyung
                /// create a group descriptor
383 fddb48f7 ljiyeon
                gridViewMarkup.GroupDescriptors.Clear();
384
                GroupDescriptor descriptor = new GroupDescriptor();
385
                descriptor.Member = "Depatment";
386
                descriptor.DisplayContent = "DEPT";
387 dd0f7089 djkim
                //descriptor.SortDirection = ListSortDirection.Ascending;
388 fddb48f7 ljiyeon
                gridViewMarkup.GroupDescriptors.Add(descriptor);
389 a36a37c3 humkyung
                /// up to here
390 787a4489 KangIngu
            }
391
        }
392
393
        private void gridViewRevMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
394
        {
395
            List<MarkupInfoItem> gridSelectionItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
396
            //if (ViewerDataModel.Instance.PageBalanceNumber == 0)
397
            //{
398
            //    ViewerDataModel.Instance.PageBalanceNumber = 1;
399
            //}
400
401
            if (ViewerDataModel.Instance.PageNumber == 0)
402
            {
403
                ViewerDataModel.Instance.PageNumber = 1;
404
            }
405
            if (e.AddedItems.Count() > 0)
406
            {
407
                foreach (var item in gridSelectionItem)
408
                {
409
                    //item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageBalanceNumber).ToList().ForEach(delegate (MarkupItem markupitem)
410
                    //{
411
                    //    layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
412
                    //});
413
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
414
                    {
415 661b7416 humkyung
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
416 787a4489 KangIngu
                    });
417
                }
418
            }
419
            else if (e.RemovedItems.Count > 0)
420
            {
421
                var _infoItem = e.RemovedItems.Cast<MarkupInfoItem>().ToList();
422
423
                (from A in _infoItem
424
                 from B in Common.ViewerDataModel.Instance.MarkupControls_Sync
425
                 where A.MarkupInfoID == B.MarkupInfoID
426
                 select B).ToList().ForEach(data =>
427
                 {
428
                     Common.ViewerDataModel.Instance.MarkupControls_Sync.Remove(data);
429
                 });
430
            }
431
        }
432 e7dd7ae8 humkyung
433
        /// <summary>
434
        /// 선택한 항목은 Visibility = Visible, 해제한 항목은 Visibility = Hidden 처리한다.
435
        /// </summary>
436
        /// <param name="sender"></param>
437
        /// <param name="e"></param>
438 787a4489 KangIngu
        private void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
439
        {
440
            var dataSet = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
441
            var dataSet_User = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
442
            var resultA = (from item_Select in dataSet
443
                           from item_Non in dataSet_User
444
                           where item_Select == item_Non
445
                           select item_Non).ToList();
446
447
            if (resultA.Count() >= 2)
448
            {
449
                RadWindow.Confirm(new DialogParameters
450
                {
451 b9b01f8e ljiyeon
                    Owner = Application.Current.MainWindow,
452 787a4489 KangIngu
                    Header = "안내",
453
                    Content = "동일한 사용자 데이터가 두개 이상 선택됩니다. Consolidation을 선택할까요?",
454
                    Closed = new EventHandler<WindowClosedEventArgs>((sen, ea) =>
455
                    {
456
                        if (e.AddedItems.Count() == 1)
457
                        {
458
                            MarkupInfoItem instanceItem = e.AddedItems.FirstOrDefault() as MarkupInfoItem;
459 8ab0d0b1 송근호
                            gridViewMarkup.SelectedItem = null;
460 787a4489 KangIngu
461 8ab0d0b1 송근호
                        
462 787a4489 KangIngu
                            if (ea.DialogResult.Value)
463
                            {
464 8ab0d0b1 송근호
                                if (instanceItem.Consolidate == 1 || instanceItem.PartConsolidate == 1)
465
                                {
466
                                    gridViewMarkup.SelectedItem = instanceItem;
467
                                }
468
                                else
469
                                {
470
                                    //1. Consolidations이 있다면 하나 선택
471
                                    var Consolidations = resultA.Where(item => (item.Consolidate == 1 || item.PartConsolidate == 1));
472
473
                                    if (Consolidations.Count() > 0)
474
                                    {
475
                                        gridViewMarkup.SelectedItem = Consolidations.First();
476
                                    }
477
                                }
478
                              
479 787a4489 KangIngu
                            }
480 8ab0d0b1 송근호
                            else {
481
                                //1. Consolidations 아닌게 있다면 Change
482
                                var notConsolidations = resultA.Where(item => !(item.Consolidate == 1 || item.PartConsolidate == 1));
483
484
                                if(notConsolidations.Count() > 0) {
485
                                    gridViewMarkup.SelectedItem = notConsolidations.First();
486
                                }
487
                                else {//1. Consolidations 아닌게 없다면 그대로
488
                                    gridViewMarkup.SelectedItem = instanceItem;
489
                                }
490
                                
491 787a4489 KangIngu
                            }
492
                        }
493
                    }),
494
                    Theme = new Windows8Theme(),
495
                    ModalBackground = new System.Windows.Media.SolidColorBrush { Color = System.Windows.Media.Colors.Black, Opacity = 0.6 },
496
                });
497
            }
498
            else //파라미터로 넘어온 사용자가 걸리지 않은 경우
499
            {
500 6b5d33c6 djkim
                List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
501
                List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
502
                List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
503
                #region 코멘트 보기
504
                if (e.AddedItems.Count() > 0)
505
                {
506
                    foreach (var item in gridSelectionItem)
507
                    {
508 3ffd4b2d humkyung
                        if (item.UserID == App.ViewInfo.UserID)
509 6b5d33c6 djkim
                        {
510 101da246 humkyung
                            var controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
511
                            if (controls.Count == 0)
512 6b5d33c6 djkim
                            {
513 129ca191 humkyung
                                var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
514 6b5d33c6 djkim
                                foreach (var markup in instance)
515
                                {
516 661b7416 humkyung
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
517
                                        item.MarkupInfoID, markup.ID);
518 6b5d33c6 djkim
                                }
519
                            }
520 101da246 humkyung
521
                            controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
522
                            foreach (var control in controls)
523 6b5d33c6 djkim
                            {
524 d62c0439 humkyung
                                Logger.sendCheckLog(String.Format("=={0}", control), 1);
525 101da246 humkyung
                                control.Visibility = Visibility.Visible;
526 6b5d33c6 djkim
                            }
527
                        }
528 3ffd4b2d humkyung
                        else
529 6b5d33c6 djkim
                        {
530 101da246 humkyung
                            var controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
531
                            if (controls.Count == 0)
532
                            {
533 129ca191 humkyung
                                var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
534 101da246 humkyung
                                foreach (var markup in instance)
535
                                {
536
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "",
537
                                        item.MarkupInfoID, markup.ID);
538
                                }
539
                            }
540
541
                            controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
542
                            foreach (var control in controls)
543 6b5d33c6 djkim
                            {
544 e7dd7ae8 humkyung
                                control.Visibility = Visibility.Visible;
545 6b5d33c6 djkim
                            }
546
                        }
547
                    }
548
                }
549
                #endregion
550
                #region 코멘트 숨기기
551
                else if (e.RemovedItems.Count > 0)
552
                {
553
                    var _infoItem = e.RemovedItems.Cast<MarkupInfoItem>().ToList();
554
555
                    (from A in _infoItem
556
                     from B in Common.ViewerDataModel.Instance.MarkupControls
557
                     where A.MarkupInfoID == B.MarkupInfoID
558
                     select B).ToList().ForEach(data =>
559
                     {
560 b5ac6d6e ljiyeon
                         data.Visibility = Visibility.Hidden;                         
561 6b5d33c6 djkim
                     });
562
563 b5ac6d6e ljiyeon
564 6b5d33c6 djkim
                    var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault();
565
                    if (myComment != null)
566
                    {
567
                        Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem)
568
                        {
569 e7dd7ae8 humkyung
                            markupitem.Visibility = Visibility.Hidden;
570 6b5d33c6 djkim
                        });
571
                    }
572
                }
573
                #endregion
574 787a4489 KangIngu
            }
575
        }
576
577
        private void BaseClient_GetDocumentItemInfoCompleted(object sender, GetDocumentItemInfoCompletedEventArgs e)
578
        {
579 0f065e57 ljiyeon
            Logger.sendResLog("GetDocumentItemInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
580
581 787a4489 KangIngu
            if (e.Result != null)
582
            {
583
                _DocItem = e.Result;
584
585
                if (e.Result.DOCUMENT_NO == "" && e.Result.DOCUMENT_NAME == "" && e.Result.GROUP_NO == "0")
586
                {
587
                    //장원
588
                    _ViewInfo.UserID = _ViewInfo.UserID.Replace(@"DAELIM\", "");
589
                }
590 29010418 ljiyeon
                Logger.sendReqLog("GetDocInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID, 1);
591 787a4489 KangIngu
                BaseClient.GetDocInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID });
592
            }
593
            else
594
            {
595
                BaseClient.GetCheckSystemAdminCompleted += (sen, ea) =>
596
                {
597 0f065e57 ljiyeon
                    Logger.sendResLog("GetCheckSystemAdminCompleted", "UserState : " + ea.UserState + "\r Result :" + ea.Result + "\r Cancelled :" + ea.Cancelled + "\r Error :" + ea.Error, 1);
598
599 787a4489 KangIngu
                    if (ea.Error == null)
600
                    {
601
                        if (ea.Result)
602
                        {
603
                            this._ViewInfo.isAdmin = true;
604 0f065e57 ljiyeon
                            Logger.sendReqLog("GetDocInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID, 1);
605 787a4489 KangIngu
                            BaseClient.GetDocInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID });
606
                        }
607
                        else
608
                        {
609
                            //System.Windows.Forms.MessageBox.Show("해당 프로젝트에 가입되지 않은 유저입니다. 관리자에게 등록신청을 해주세요", "안내");
610
                            DialogMessage_Alert("해당 프로젝트에 가입되지 않은 유저입니다. 관리자에게 등록신청을 해주세요", "안내");
611
                            //this.ParentOfType<MainPage>().DialogMessage_Alert("해당 프로젝트에 가입되지 않은 유저입니다. 관리자에게 등록신청을 해주세요", "안내");
612
                        }
613
614
                    }
615
                    else
616
                    {
617
                        //System.Windows.Browser.HtmlPage.Window.Invoke("close");
618
                    }
619
                };
620 0f065e57 ljiyeon
                Logger.sendReqLog("GetCheckSystemAdminAsync", _ViewInfo.UserID, 1);
621 787a4489 KangIngu
                BaseClient.GetCheckSystemAdminAsync(this._ViewInfo.UserID);
622
            }
623
        }
624
625
        private void BaseClient_GetSystemDataCompleted(object sender, GetSystemDataCompletedEventArgs e)
626
        {
627 0f065e57 ljiyeon
            Logger.sendResLog("GetSystemDataCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
628
629 787a4489 KangIngu
            if (e.Error == null && e.Result != null)
630
            {
631
                App.SystemInfo = e.Result;
632
633
                //App.urlPort_DB = App.SystemInfo.HostPort;
634
                //App.urlHost_DB = App.SystemInfo.HostName;
635 0f065e57 ljiyeon
                Logger.sendReqLog("GetConversionStateAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID, 1);
636 787a4489 KangIngu
                BaseClient.GetConversionStateAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID });
637
638
                //if (App.urlHost.Contains("localhost"))
639
                //{
640
                //    App.urlHost = App.urlHost_DB;
641
                //}
642
            }
643
        }
644
645
        private void BaseClient_GetConversionStateCompleted(object sender, GetConversionStateCompletedEventArgs e)
646
        {
647 84c48033 djkim
            
648 0f065e57 ljiyeon
            Logger.sendResLog("GetConversionStateCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
649 84c48033 djkim
            string failedmsg = CommonLib.Common.GetAlertMessageString("GetConversionStateFailed", "MSG", "Too Many V/P Files are uploading instantaneously, This V/P file can not be open now. Please feel free to re-open wait a moment again!\n\n현재 일시적으로 많은 양의 V/P가 등록되고 있어 이 문서를 열람할 수 없습니다.\n잠시만 기다려 주신 후 다시 열람하여 주시기 바랍니다");
650 53880c83 ljiyeon
            if (e.Error == null && e.Result == true)
651 787a4489 KangIngu
            {
652 0f065e57 ljiyeon
                Logger.sendReqLog("GetDocumentItemInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + _ViewInfo.UserID, 1);
653
654 787a4489 KangIngu
                BaseClient.GetDocumentItemInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID, userID = _ViewInfo.UserID });
655
656 992a98b4 KangIngu
                if (App.ViewInfo != null && App.ViewInfo.ProjectNO != "")
657 787a4489 KangIngu
                {
658 0f065e57 ljiyeon
                    Logger.sendReqLog("GetMember", _ViewInfo.ProjectNO + "," + _ViewInfo.UserID, 1);
659 6c781c0c djkim
                    userData = BaseClient.GetMember(App.ViewInfo.ProjectNO, App.ViewInfo.UserID);
660
                    if (userData != null)
661 787a4489 KangIngu
                    {
662 0f065e57 ljiyeon
                        Logger.sendReqLog("GetDeptDataAsync", userData.DEPARTMENT, 1);
663 6c781c0c djkim
                        BaseClient.GetDeptDataAsync(userData.DEPARTMENT);
664 787a4489 KangIngu
                    }
665 6c781c0c djkim
                    else
666
                    {
667
                        userData = new MEMBER();
668
                        userData.DEPARTMENT = "ALL";
669 0f065e57 ljiyeon
                        Logger.sendReqLog("GetDeptDataAsync", userData.DEPARTMENT, 1);
670 6c781c0c djkim
                        BaseClient.GetDeptDataAsync(userData.DEPARTMENT);
671 29010418 ljiyeon
                    }
672 787a4489 KangIngu
                }
673
            }
674
            else
675
            {
676 84c48033 djkim
                
677
                DialogMessage_Alert(failedmsg, "Warning");
678 787a4489 KangIngu
            }
679
        }
680 29010418 ljiyeon
681 d62c0439 humkyung
        
682 787a4489 KangIngu
683
684
        public void SetView(ViewInfo info)
685 5ded1e5a djkim
        {            
686
            string docid = BaseClient.GetDocItemID(info.EnsembleID);
687 787a4489 KangIngu
            this._ViewInfo = info;
688 5ded1e5a djkim
            if (!string.IsNullOrEmpty(docid))
689
            {
690
                this._ViewInfo.DocumentItemID = docid;
691
            }
692
            Logger.sendReqLog("GetSystemDataAsync", "", 1);
693 29010418 ljiyeon
            BaseClient.GetSystemDataAsync();
694 787a4489 KangIngu
        }
695
696 992a98b4 KangIngu
        public void HubSet()
697
        {
698
            // 허브 연결 구성
699 84c48033 djkim
            var hubConnection = new HubConnection(CommonLib.Common.GetConfigString("HubAddress", "URL", "", App.isExternal));
700 992a98b4 KangIngu
            IHubProxy MarkusLicenseProxy = hubConnection.CreateHubProxy("MarkusLicenseHub");
701
702
703
            // 허브 연결 
704
            hubConnection.Start().ContinueWith(task =>
705
            {
706
                if (task.IsFaulted)
707
                {
708
                    Console.WriteLine("There was an error opening the connection:{0}",
709
                                      task.Exception.GetBaseException());
710 53f96e00 송근호
                    //throw task.Exception.GetBaseException();
711 992a98b4 KangIngu
                }
712
                else
713
                {
714
                    Console.WriteLine("Connected :: " + task.Id);
715
                }
716
717
            }).Wait();
718
719
720
            // [ 프로그램 시작 ]
721
            // 클라이언트에서 서버를 호출 ( 접속 시 )  : 라이센스 체크
722
            //( "method name", arg1, arg2 )
723
            //MarkusLicenseProxy.Invoke<string>("ConnectionMarkus", "H2009115", "고동균").ContinueWith(task =>
724
            //{
725
            //    if (task.IsFaulted)
726
            //    {
727
            //        Console.WriteLine("ConnectionMarkus :: There was an error calling send: {0}", task.Exception.GetBaseException());
728
            //    }
729
            //    else
730
            //    {
731
            //        Console.WriteLine(task.Result);
732
            //    }
733
            //});
734 0af41bf0 djkim
            MarkusLicenseProxy.Invoke<string>("ConnectionMarkus", App.ViewInfo.UserID,App.ViewInfo.ProjectNO).ContinueWith(task =>
735 992a98b4 KangIngu
            {
736
                if (task.IsFaulted)
737
                {
738
                    Console.WriteLine("ConnectionMarkus :: There was an error calling send: {0}", task.Exception.GetBaseException());
739 53f96e00 송근호
                    //throw task.Exception.GetBaseException();
740 992a98b4 KangIngu
                }
741
                else
742
                {
743 29010418 ljiyeon
                    switch (task.Result)
744 992a98b4 KangIngu
                    {
745 53393bae KangIngu
                        case "2":
746
                            {
747 0af41bf0 djkim
                                var result = MessageBox.Show("권한이 없습니다.");
748
                                if (result == MessageBoxResult.OK)
749
                                    System.Diagnostics.Process.GetCurrentProcess().Kill();
750 53393bae KangIngu
                            }
751
                            break;
752
                        case "404":
753
                            {
754 0af41bf0 djkim
                                var result = MessageBox.Show("등록된 사용자가 아닙니다.");
755
                                if(result == MessageBoxResult.OK)
756
                                    System.Diagnostics.Process.GetCurrentProcess().Kill();
757 53393bae KangIngu
                            }
758
                            break;
759 992a98b4 KangIngu
                    }
760
                }
761 53f96e00 송근호
            });
762 992a98b4 KangIngu
763
            // 서버에서 클라이언트 호출 ( 프로그램 구동여부 ) : 라이센스 체크 후 응답 ( 반환값 : true, false ) 
764
            //MarkusLicenseProxy.On<bool>("IsConnection", status =>
765
            //{
766
767
            //    if (status)
768
            //    {
769
            //        // 프로그램 시작 
770
            //        Console.WriteLine("connection status : " + status);
771
            //    }
772
            //    else
773
            //    {
774
            //        // 프로그램 종료 ( signalr 접속 끊기 )  
775
            //        hubConnection.Stop();
776
            //    }
777
            //});
778
779
            // 공지 메세지 ( 서버에서 클라이언트 호출 ) 
780
            MarkusLicenseProxy.On<string>("MarkusNotification", msg =>
781
                Console.WriteLine("Noficiation Message : " + msg)
782
            );
783
784
785
            // 서버 메서드 호출 
786
            //MarkusLicenseProxy.Invoke<string>("DoSomething", "I'm doing something!!!").Wait();
787
788
            //Console.ReadKey();
789
790
            //hubConnection.Stop();
791
        }
792 787a4489 KangIngu
793 1f1c566e djkim
        public void MarkupUserListDisplay()
794
        {
795
            List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
796
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
797
            List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
798 29010418 ljiyeon
                                                                                                     //MarkupToPDF.Controls.Parsing.LayerControl layerControl = new MarkupToPDF.Controls.Parsing.LayerControl();
799 1f1c566e djkim
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();  //전체 제거
800 29010418 ljiyeon
            Common.ViewerDataModel.Instance.MarkupControls.Clear();  //전체 제거
801 f714bef8 djkim
            //foreach (var item in gridSelectionItem)
802
            //{
803
            //    if (item.UserID == App.ViewInfo.UserID)
804
            //    {
805 d62c0439 humkyung
            //        ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
806 f714bef8 djkim
            //        {
807
            //            layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
808
            //        });
809
            //    }
810
            //    else
811
            //    {
812
            //        ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
813
            //        {
814
            //            layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
815
            //        });
816
            //    }
817
            //}
818 29010418 ljiyeon
                (from A in gridSelectionItem
819
                 from B in Common.ViewerDataModel.Instance.MarkupControls_USER
820
                 where A.MarkupInfoID == B.MarkupInfoID
821
                 select B).ToList().ForEach(data =>
822
                 {
823
                     Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(data);
824
                 });
825 1f1c566e djkim
            (from A in gridSelectionItem
826
             from B in Common.ViewerDataModel.Instance.MarkupControls
827
             where A.MarkupInfoID == B.MarkupInfoID
828
             select B).ToList().ForEach(data =>
829
             {
830
                 Common.ViewerDataModel.Instance.MarkupControls.Remove(data);
831
             });
832
833
            foreach (var item in gridSelectionItem)
834
            {
835
                if (item.UserID == App.ViewInfo.UserID)
836
                {
837 d62c0439 humkyung
                    ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
838 1f1c566e djkim
                    {
839 661b7416 humkyung
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
840
                            item.MarkupInfoID, markupitem.ID);
841 1f1c566e djkim
                    });
842
                }
843
                else
844
                {
845
                    ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
846
                    {
847 661b7416 humkyung
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
848 1f1c566e djkim
                    });
849
                }
850
            }
851
        }
852 787a4489 KangIngu
    }
853
}
클립보드 이미지 추가 (최대 크기: 500 MB)