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 System;
|
8 |
|
|
using System.Collections.Generic;
|
9 |
|
|
using System.Collections.ObjectModel;
|
10 |
|
|
using System.ComponentModel;
|
11 |
|
|
using System.Linq;
|
12 |
|
|
using System.Runtime.CompilerServices;
|
13 |
|
|
using System.Text;
|
14 |
|
|
using System.Windows;
|
15 |
|
|
using System.Windows.Controls;
|
16 |
|
|
using Telerik.Windows.Controls;
|
17 |
036650a0
|
humkyung
|
using MarkupToPDF.Controls.Parsing;
|
18 |
fddb48f7
|
ljiyeon
|
using Telerik.Windows.Data;
|
19 |
90a0bfa9
|
djkim
|
using System.Web;
|
20 |
3b938959
|
taeseongkim
|
using System.ServiceModel.Security;
|
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 |
5c64268e
|
taeseongkim
|
public KcomService.ServiceDeepViewClient BaseTaskClient
|
29 |
|
|
{
|
30 |
3b938959
|
taeseongkim
|
get {
|
31 |
|
|
var service = new KcomService.ServiceDeepViewClient(App._binding, App._EndPoint);
|
32 |
|
|
return service;
|
33 |
|
|
}
|
34 |
5c64268e
|
taeseongkim
|
}
|
35 |
|
|
|
36 |
787a4489
|
KangIngu
|
public ViewInfo _ViewInfo;
|
37 |
|
|
public DOCINFO _DocInfo;
|
38 |
|
|
public DOCUMENT_ITEM _DocItem;
|
39 |
|
|
public MEMBER userData;
|
40 |
be72bfd6
|
taeseongkim
|
public List<int> MarkupSortList = new List<int>();
|
41 |
787a4489
|
KangIngu
|
|
42 |
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
43 |
|
|
private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
|
44 |
|
|
{
|
45 |
|
|
if (PropertyChanged != null)
|
46 |
|
|
{
|
47 |
|
|
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
48 |
|
|
}
|
49 |
|
|
}
|
50 |
|
|
|
51 |
|
|
private Common.DocumentSet _CurrentDoc { get; set; }
|
52 |
|
|
public Common.DocumentSet CurrentDoc
|
53 |
|
|
{
|
54 |
|
|
get
|
55 |
|
|
{
|
56 |
|
|
return _CurrentDoc;
|
57 |
|
|
}
|
58 |
|
|
set
|
59 |
|
|
{
|
60 |
|
|
if (value != CurrentDoc)
|
61 |
|
|
{
|
62 |
|
|
_CurrentDoc = value;
|
63 |
|
|
NotifyPropertyChanged();
|
64 |
|
|
}
|
65 |
|
|
}
|
66 |
|
|
}
|
67 |
|
|
public void ServiceOn()
|
68 |
|
|
{
|
69 |
5c64268e
|
taeseongkim
|
//BaseTaskClient = new KcomService.ServiceDeepViewClient(App._binding, App._EndPoint);
|
70 |
29010418
|
ljiyeon
|
BaseClient = new ServiceDeepViewClient(App._binding, App._EndPoint);
|
71 |
|
|
|
72 |
787a4489
|
KangIngu
|
BaseClient.GetDocInfoCompleted += BaseClient_GetDocInfoCompleted; //문서 섬네일, 페이지크기, 마크업 정보 [3]
|
73 |
0f065e57
|
ljiyeon
|
BaseClient.GetConversionStateCompleted += BaseClient_GetConversionStateCompleted; //컨버팅의 여부 [2]
|
74 |
|
|
BaseClient.GetSystemDataCompleted += BaseClient_GetSystemDataCompleted; //시스템 정보 [1]
|
75 |
787a4489
|
KangIngu
|
BaseClient.GetDocumentItemInfoCompleted += BaseClient_GetDocumentItemInfoCompleted; // 문서 자체의 정보 [4]
|
76 |
29010418
|
ljiyeon
|
BaseClient.GetMarkupInfoItemsCompleted += BaseClient_GetMarkupInfoItemsCompleted;
|
77 |
|
|
BaseClient.GetDeptDataCompleted += BaseClient_GetDeptDataCompleted;
|
78 |
|
|
BaseClient.DeleteMarkupCompleted += BaseClient_DeleteMarkupCompleted;
|
79 |
787a4489
|
KangIngu
|
BaseClient.GetVPRevisionHistoryCompleted += BaseClient_GetVPRevisionHistoryCompleted;
|
80 |
29010418
|
ljiyeon
|
BaseClient.SetFinalPDFCompleted += BaseClient_SetFinalPDFCompleted;
|
81 |
|
|
BaseClient.GetCompareRectCompleted += BaseClient_GetCompareRectCompleted;
|
82 |
|
|
BaseClient.DeleteMarkupCompleted += BaseClient_DeleteMarkupCompleted;
|
83 |
|
|
BaseClient.DelFavoriteVPCompleted += BaseClient_DelFavoriteVPCompleted;
|
84 |
|
|
BaseClient.EditFavoriteVPCompleted += BaseClient_EditFavoriteVPCompleted;
|
85 |
992a98b4
|
KangIngu
|
}
|
86 |
|
|
|
87 |
|
|
private void BaseClient_EditFavoriteVPCompleted(object sender, EditFavoriteVPCompletedEventArgs e)
|
88 |
|
|
{
|
89 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("EditFavoriteVPCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
90 |
0f065e57
|
ljiyeon
|
|
91 |
53880c83
|
ljiyeon
|
if (e.Error == null && e.Result != false)
|
92 |
992a98b4
|
KangIngu
|
{
|
93 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetFavoriteVPAsync", App.ViewInfo.ProjectNO + "," + App.ViewInfo.UserID + "," + App.ViewInfo.DocumentItemID, 1);
|
94 |
992a98b4
|
KangIngu
|
BaseClient.GetFavoriteVPAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, App.ViewInfo.DocumentItemID);
|
95 |
|
|
}
|
96 |
|
|
else
|
97 |
|
|
{
|
98 |
|
|
DialogMessage_Alert("Unable to delete the file due to a system failure", "Warning");
|
99 |
|
|
}
|
100 |
|
|
}
|
101 |
|
|
|
102 |
|
|
private void BaseClient_DelFavoriteVPCompleted(object sender, DelFavoriteVPCompletedEventArgs e)
|
103 |
|
|
{
|
104 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("DelFavoriteVPCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
105 |
0f065e57
|
ljiyeon
|
|
106 |
53880c83
|
ljiyeon
|
if (e.Error == null && e.Result != false)
|
107 |
992a98b4
|
KangIngu
|
{
|
108 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetFavoriteVPAsync", App.ViewInfo.ProjectNO + "," + App.ViewInfo.UserID + "," + App.ViewInfo.DocumentItemID, 1);
|
109 |
992a98b4
|
KangIngu
|
BaseClient.GetFavoriteVPAsync(App.ViewInfo.ProjectNO, App.ViewInfo.UserID, App.ViewInfo.DocumentItemID);
|
110 |
|
|
}
|
111 |
|
|
else
|
112 |
|
|
{
|
113 |
|
|
DialogMessage_Alert("Unable to delete the file due to a system failure", "Warning");
|
114 |
|
|
}
|
115 |
787a4489
|
KangIngu
|
}
|
116 |
|
|
|
117 |
9294fed6
|
humkyung
|
/// <summary>
|
118 |
|
|
/// Compare 결과를 받아 화면에 표시한다
|
119 |
|
|
/// </summary>
|
120 |
|
|
/// <param name="sender"></param>
|
121 |
|
|
/// <param name="e"></param>
|
122 |
787a4489
|
KangIngu
|
private void BaseClient_GetCompareRectCompleted(object sender, GetCompareRectCompletedEventArgs e)
|
123 |
|
|
{
|
124 |
|
|
if (e.Error != null || e.Result == null)
|
125 |
|
|
{
|
126 |
9294fed6
|
humkyung
|
if (e.Error != null)
|
127 |
|
|
{
|
128 |
|
|
DialogMessage_Alert(e.Error.ToString(), "Error");
|
129 |
|
|
}
|
130 |
|
|
else
|
131 |
|
|
{
|
132 |
|
|
DialogMessage_Alert("Compare 기능을 원활히 실행하기 위한 데이터가 부족합니다", "안내");
|
133 |
|
|
}
|
134 |
787a4489
|
KangIngu
|
}
|
135 |
|
|
else
|
136 |
|
|
{
|
137 |
|
|
e.Result.ForEach(d =>
|
138 |
|
|
{
|
139 |
43d2041c
|
taeseongkim
|
d.Width = d.Width;
|
140 |
|
|
d.Height = d.Height;
|
141 |
787a4489
|
KangIngu
|
var point = MarkupToPDF.Controls.Common.MathSet.getRectMiddlePoint(d);
|
142 |
a1142a6b
|
taeseongkim
|
System.Windows.Shapes.Rectangle myEllipse = new System.Windows.Shapes.Rectangle();
|
143 |
752b18ef
|
taeseongkim
|
myEllipse.Fill = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(150, 33, 215, 119));
|
144 |
|
|
myEllipse.Opacity = 1;
|
145 |
787a4489
|
KangIngu
|
myEllipse.Width = d.Width;
|
146 |
|
|
myEllipse.Height = d.Height;
|
147 |
|
|
Canvas.SetLeft(myEllipse, d.X - ((point.X - d.X) / 2.0));
|
148 |
|
|
Canvas.SetTop(myEllipse, d.Y - ((point.Y - d.Y) / 2.0));
|
149 |
|
|
myEllipse.RenderTransformOrigin = point;
|
150 |
|
|
canvas_compareBorder.Children.Add(myEllipse);
|
151 |
|
|
});
|
152 |
43d2041c
|
taeseongkim
|
canvas_compareBorder.Visibility = Visibility.Visible;
|
153 |
752b18ef
|
taeseongkim
|
da.From = 1;
|
154 |
|
|
da.To = 0.5;
|
155 |
787a4489
|
KangIngu
|
da.Duration = new Duration(TimeSpan.FromSeconds(1));
|
156 |
|
|
da.AutoReverse = true;
|
157 |
|
|
canvas_compareBorder.BeginAnimation(OpacityProperty, da);
|
158 |
|
|
}
|
159 |
|
|
}
|
160 |
|
|
|
161 |
|
|
private void BaseClient_SetFinalPDFCompleted(object sender, SetFinalPDFCompletedEventArgs e)
|
162 |
|
|
{
|
163 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("SetFinalPDFCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
164 |
84c48033
|
djkim
|
string errormsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFError", "MSG", "최종 파일을 만드는데 문제가 발생하였습니다");
|
165 |
|
|
string successmsg = CommonLib.Common.GetAlertMessageString("SetFinalPDFSuccess", "MSG", "최종 파일 생성 중입니다. 문서관리시스템을 확인해주세요");
|
166 |
29010418
|
ljiyeon
|
if (e.Error != null || e.Result.Status == FinalStatus.Error)
|
167 |
787a4489
|
KangIngu
|
{
|
168 |
84c48033
|
djkim
|
DialogMessage_Alert(errormsg, "안내");
|
169 |
787a4489
|
KangIngu
|
}
|
170 |
|
|
else
|
171 |
|
|
{
|
172 |
84c48033
|
djkim
|
DialogMessage_Alert(successmsg, "안내");
|
173 |
787a4489
|
KangIngu
|
}
|
174 |
|
|
}
|
175 |
|
|
|
176 |
|
|
private void BaseClient_GetVPRevisionHistoryCompleted(object sender, GetVPRevisionHistoryCompletedEventArgs e)
|
177 |
|
|
{
|
178 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetVPRevisionHistoryCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result?.Count + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
179 |
0f065e57
|
ljiyeon
|
|
180 |
787a4489
|
KangIngu
|
if (e.Result != null && e.Error == null)
|
181 |
|
|
{
|
182 |
90a0bfa9
|
djkim
|
List<VPRevision> list = e.Result;
|
183 |
|
|
foreach (var item in list)
|
184 |
|
|
{
|
185 |
24ac2a04
|
taeseongkim
|
|
186 |
|
|
if (App.isExternal)
|
187 |
|
|
{
|
188 |
f35c95d8
|
taeseongkim
|
var sBaseServiceURL = CommonLib.Common.GetConfigString("ExternalOriginalFileUrl", "URL", "", App.isExternal);
|
189 |
24ac2a04
|
taeseongkim
|
|
190 |
db545833
|
taeseongkim
|
if (!string.IsNullOrWhiteSpace(item.TO_VENDOR))
|
191 |
|
|
{
|
192 |
|
|
var toUri = new Uri(HttpUtility.UrlDecode(item.TO_VENDOR));
|
193 |
|
|
item.TO_VENDOR = $"{sBaseServiceURL}{toUri.LocalPath}";
|
194 |
|
|
}
|
195 |
|
|
|
196 |
|
|
if (!string.IsNullOrWhiteSpace(item.FROM_VENDOR))
|
197 |
|
|
{
|
198 |
|
|
var fromUri = new Uri(HttpUtility.UrlDecode(item.FROM_VENDOR));
|
199 |
|
|
item.FROM_VENDOR = $"{sBaseServiceURL}{fromUri.LocalPath}";
|
200 |
|
|
}
|
201 |
24ac2a04
|
taeseongkim
|
}
|
202 |
|
|
else
|
203 |
|
|
{
|
204 |
38d69491
|
taeseongkim
|
item.TO_VENDOR = HttpUtility.UrlDecode(item.TO_VENDOR);
|
205 |
24ac2a04
|
taeseongkim
|
item.FROM_VENDOR = HttpUtility.UrlDecode(item.FROM_VENDOR);
|
206 |
38d69491
|
taeseongkim
|
item.EnsembleLink = HttpUtility.UrlDecode(item.EnsembleLink);
|
207 |
24ac2a04
|
taeseongkim
|
}
|
208 |
90a0bfa9
|
djkim
|
}
|
209 |
f0c9e80e
|
이지연
|
//int result;
|
210 |
|
|
//bool iCheck = true;
|
211 |
|
|
//foreach (var li in list)
|
212 |
|
|
//{
|
213 |
|
|
// iCheck = int.TryParse(li.GroupNo, out result);
|
214 |
|
|
// if (!iCheck)
|
215 |
|
|
// break;
|
216 |
|
|
//}
|
217 |
|
|
//if(iCheck)
|
218 |
|
|
gridViewHistory.ItemsSource = list.OrderByDescending(x => x.GroupNo); //20240611 LJY string 인거 전달드림 slip no 내림차순으로 그냥 해달라고 요청
|
219 |
|
|
//else
|
220 |
|
|
// gridViewHistory.ItemsSource = list.OrderByDescending(x => x.RevNo);
|
221 |
6c45db59
|
taeseongkim
|
|
222 |
787a4489
|
KangIngu
|
}
|
223 |
f9fb5500
|
ljiyeon
|
//TempFile.TempLoad();
|
224 |
787a4489
|
KangIngu
|
}
|
225 |
|
|
|
226 |
|
|
private void BaseClient_DeleteMarkupCompleted(object sender, DeleteMarkupCompletedEventArgs e)
|
227 |
|
|
{
|
228 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("DeleteMarkupCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
229 |
0f065e57
|
ljiyeon
|
|
230 |
d128ceb2
|
humkyung
|
foreach(var info in ViewerDataModel.Instance._markupInfoList)
|
231 |
|
|
{
|
232 |
|
|
if(info.UserID == App.ViewInfo.UserID)
|
233 |
|
|
{
|
234 |
|
|
info.userDelete = true;
|
235 |
cf1cc862
|
taeseongkim
|
info.DisplayColor = "#FFFF0000";
|
236 |
d128ceb2
|
humkyung
|
}
|
237 |
|
|
else
|
238 |
|
|
{
|
239 |
|
|
info.userDelete = false;
|
240 |
|
|
}
|
241 |
|
|
}
|
242 |
787a4489
|
KangIngu
|
}
|
243 |
|
|
|
244 |
|
|
private void BaseClient_GetDeptDataCompleted(object sender, GetDeptDataCompletedEventArgs e)
|
245 |
|
|
{
|
246 |
0585d5cc
|
taeseongkim
|
if (e.Error == null)
|
247 |
|
|
{
|
248 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetDeptDataCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result?.Count + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
249 |
0585d5cc
|
taeseongkim
|
}
|
250 |
|
|
else
|
251 |
|
|
{
|
252 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetDeptDataCompleted", "\r Error :" + e.Error, 1);
|
253 |
0585d5cc
|
taeseongkim
|
}
|
254 |
0f065e57
|
ljiyeon
|
|
255 |
787a4489
|
KangIngu
|
if (e.Result != null)
|
256 |
|
|
{
|
257 |
|
|
e.Result.Sort();
|
258 |
|
|
//cbSymbolPublic.ItemsSource = e.Result.ToList();
|
259 |
|
|
}
|
260 |
|
|
}
|
261 |
0585d5cc
|
taeseongkim
|
|
262 |
f258d884
|
humkyung
|
/// <summary>
|
263 |
|
|
/// ???
|
264 |
|
|
/// </summary>
|
265 |
29010418
|
ljiyeon
|
public MarkupInfoItem PreviewUserMarkupInfoItem { get; set; }
|
266 |
787a4489
|
KangIngu
|
|
267 |
35a96e24
|
humkyung
|
/// <summary>
|
268 |
d62c0439
|
humkyung
|
/// 문서 정보를 가져온다
|
269 |
|
|
/// </summary>
|
270 |
|
|
/// <param name="sender"></param>
|
271 |
|
|
/// <param name="e"></param>
|
272 |
eeb0a39c
|
taeseongkim
|
private async void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e)
|
273 |
d62c0439
|
humkyung
|
{
|
274 |
664ea2e1
|
taeseongkim
|
////Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
275 |
d62c0439
|
humkyung
|
|
276 |
|
|
if (e.Error != null)
|
277 |
|
|
{
|
278 |
503cb09e
|
taeseongkim
|
DialogMessage_Alert("The page cannot be displayed.", "Alert");
|
279 |
d62c0439
|
humkyung
|
}
|
280 |
5aa6a59a
|
taeseongkim
|
else if (e.Result == null)
|
281 |
d62c0439
|
humkyung
|
{
|
282 |
cdb2c0a2
|
taeseongkim
|
DialogMessage_Alert("Document information is missing.", "Alert");
|
283 |
d62c0439
|
humkyung
|
}
|
284 |
cdb2c0a2
|
taeseongkim
|
else
|
285 |
d62c0439
|
humkyung
|
{
|
286 |
fdfa126d
|
taeseongkim
|
string sFolder = _ViewInfo.DocumentItemID.All(char.IsDigit) ? (Convert.ToUInt64(_ViewInfo.DocumentItemID) / 100).ToString() : (_ViewInfo.DocumentItemID.Length >= 5 ? _ViewInfo.DocumentItemID.Substring(0, 5) : _ViewInfo.DocumentItemID);
|
287 |
45ac2822
|
taeseongkim
|
|
288 |
|
|
/// 화면의 좌측 Thumbnail의 주소
|
289 |
cdb2c0a2
|
taeseongkim
|
var MainUrl = string.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal).Replace("png", "jpg"), _ViewInfo.ProjectNO, sFolder, _ViewInfo.DocumentItemID, "{PageNo}");
|
290 |
|
|
_DocInfo = e.Result;
|
291 |
|
|
_DocInfo.ORIGINAL_FILE = HttpUtility.UrlDecode(_DocInfo.ORIGINAL_FILE);
|
292 |
|
|
foreach (var item in _DocInfo.DOCPAGE.OrderBy(order => order.PAGE_NUMBER))
|
293 |
|
|
{
|
294 |
|
|
ViewerDataModel.Instance.Document_Info.Add(item);
|
295 |
|
|
}
|
296 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID, 1);
|
297 |
cdb2c0a2
|
taeseongkim
|
CurrentDoc = new Common.DocumentSet
|
298 |
|
|
{
|
299 |
|
|
docInfo = _DocInfo,
|
300 |
|
|
Document_Id = _DocInfo.DOCUMENT_ID,
|
301 |
|
|
File_Original = _DocInfo.ORIGINAL_FILE,
|
302 |
0585d5cc
|
taeseongkim
|
|
303 |
cdb2c0a2
|
taeseongkim
|
Document_NO = _DocItem?.DOCUMENT_NO,
|
304 |
|
|
File_Result = _DocItem?.RESULT_FILE,
|
305 |
|
|
Group_No = _DocItem?.GROUP_NO,
|
306 |
26ec6226
|
taeseongkim
|
ProjectNo = _DocItem?.PROJECT_NO,
|
307 |
cdb2c0a2
|
taeseongkim
|
Revision = _DocItem?.REVISION,
|
308 |
|
|
};
|
309 |
0585d5cc
|
taeseongkim
|
|
310 |
cdb2c0a2
|
taeseongkim
|
var instanceMain = this.ParentOfType<MainWindow>();
|
311 |
|
|
string firstpage = "1";
|
312 |
|
|
string lastpage = _DocInfo.PAGE_COUNT.ToString();
|
313 |
|
|
instanceMain.dzTopMenu.tlcurrentPage.Text = firstpage;
|
314 |
|
|
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = lastpage;
|
315 |
a1e2ba68
|
taeseongkim
|
App.MarkusVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
316 |
|
|
|
317 |
|
|
string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem?.DOCUMENT_NO, _DocItem?.REVISION, App.MarkusVersion);
|
318 |
d33ef543
|
taeseongkim
|
|
319 |
cdb2c0a2
|
taeseongkim
|
instanceMain.Title = apptitle;
|
320 |
eeb0a39c
|
taeseongkim
|
|
321 |
cdb2c0a2
|
taeseongkim
|
#region 페이지 이미지를 로컬에 저장
|
322 |
|
|
string tempStoragePath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "MARKUS", System.IO.Path.GetRandomFileName());
|
323 |
eeb0a39c
|
taeseongkim
|
|
324 |
cdb2c0a2
|
taeseongkim
|
//.Replace("jpg", "png")을 붙이는 이유는 MainUrl에 확장명이 jpg로 설정한 경우가 있기 때문
|
325 |
eeb0a39c
|
taeseongkim
|
|
326 |
cdb2c0a2
|
taeseongkim
|
#endregion
|
327 |
eeb0a39c
|
taeseongkim
|
|
328 |
6a19b48d
|
taeseongkim
|
App.PageStorage = new PageManager.PageStorage(MainUrl.Replace("jpg", "png"), tempStoragePath, "png", _DocInfo.PAGE_COUNT, 1);
|
329 |
77cdac33
|
taeseongkim
|
|
330 |
2007ecaa
|
taeseongkim
|
//App.SamplePageStorage = new PageManager.PageStorage(MainUrl.Replace("png", "jpg"), tempStoragePath, "jpg", _DocInfo.PAGE_COUNT);
|
331 |
cdb2c0a2
|
taeseongkim
|
await this.pageNavigator.SetPageNaviAsync(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl);
|
332 |
|
|
}
|
333 |
54a28343
|
taeseongkim
|
}
|
334 |
d62c0439
|
humkyung
|
|
335 |
3b81b385
|
taeseongkim
|
private void pageNavigator_ThumbInitialized(object sender,EventArgs e)
|
336 |
54a28343
|
taeseongkim
|
{
|
337 |
|
|
BaseClient.GetMarkupInfoItemsAsync(_ViewInfo.ProjectNO, _DocInfo.ID);
|
338 |
d62c0439
|
humkyung
|
|
339 |
54a28343
|
taeseongkim
|
ViewerDataModel.Instance.MarkupControls_USER.Clear();
|
340 |
d62c0439
|
humkyung
|
//ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad();
|
341 |
|
|
|
342 |
9d5b4bc2
|
taeseongkim
|
/// 기존 임시파일 정리
|
343 |
6af42ff0
|
taeseongkim
|
#region 단어 검색용 파일 다운로드
|
344 |
9d5b4bc2
|
taeseongkim
|
|
345 |
2007ecaa
|
taeseongkim
|
DownloadOriginalFile();
|
346 |
6af42ff0
|
taeseongkim
|
|
347 |
|
|
#endregion
|
348 |
|
|
|
349 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetVPRevisionHistoryAsync", CurrentDoc.ProjectNo + "," + CurrentDoc.Document_NO + "," + CurrentDoc.Document_Id, 1);
|
350 |
6af42ff0
|
taeseongkim
|
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id);
|
351 |
|
|
|
352 |
d62c0439
|
humkyung
|
}
|
353 |
|
|
|
354 |
54a28343
|
taeseongkim
|
|
355 |
d62c0439
|
humkyung
|
/// <summary>
|
356 |
35a96e24
|
humkyung
|
/// get markupinfo and markupitem from database
|
357 |
a36a37c3
|
humkyung
|
/// - 1. called when document is loaded
|
358 |
|
|
/// - 2. called when user do consolidation
|
359 |
35a96e24
|
humkyung
|
/// </summary>
|
360 |
|
|
/// <param name="sender"></param>
|
361 |
|
|
/// <param name="e"></param>
|
362 |
787a4489
|
KangIngu
|
private void BaseClient_GetMarkupInfoItemsCompleted(object sender, GetMarkupInfoItemsCompletedEventArgs e)
|
363 |
|
|
{
|
364 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetMarkupInfoItemsCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result?.Count + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
365 |
0f065e57
|
ljiyeon
|
|
366 |
787a4489
|
KangIngu
|
ViewerDataModel.Instance.MarkupControls_USER.Clear();
|
367 |
|
|
ViewerDataModel.Instance.MarkupControls.Clear();
|
368 |
be72bfd6
|
taeseongkim
|
|
369 |
274cde11
|
taeseongkim
|
try
|
370 |
787a4489
|
KangIngu
|
{
|
371 |
|
|
|
372 |
274cde11
|
taeseongkim
|
if (e.Result != null)
|
373 |
d128ceb2
|
humkyung
|
{
|
374 |
274cde11
|
taeseongkim
|
ViewerDataModel.Instance._markupInfoList.Clear();
|
375 |
|
|
if (e.Result.Count > 0) ViewerDataModel.Instance.MyMarkupList.Clear();
|
376 |
be72bfd6
|
taeseongkim
|
|
377 |
274cde11
|
taeseongkim
|
foreach (var info in e.Result)
|
378 |
d128ceb2
|
humkyung
|
{
|
379 |
274cde11
|
taeseongkim
|
if (info.Depatment == null) info.Depatment = "Unknown";
|
380 |
be72bfd6
|
taeseongkim
|
|
381 |
ecf8a079
|
이지연
|
else if (info.UserID == App.ViewInfo.UserID)
|
382 |
274cde11
|
taeseongkim
|
{
|
383 |
ecf8a079
|
이지연
|
if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission) //조회모드는 delete 버튼 모두 비활성화
|
384 |
|
|
{
|
385 |
|
|
info.userDelete = false;
|
386 |
|
|
}
|
387 |
|
|
else if (!App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission && e.Result.Where(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1).Count() > 0) //Team Consolidation Mode이고 Team Consolidation Layer가 있을 경우
|
388 |
|
|
{
|
389 |
|
|
if(App.ViewInfo.NewCommentPermission && e.Result.Where(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1 && x.MarkupInfoID == info.MarkupInfoID).Count() > 0)
|
390 |
|
|
info.userDelete = true;
|
391 |
|
|
}
|
392 |
|
|
else if(App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission) //Consolidation Mode 일 때는 해당 Comment Layer의 Status가 Avoid or Consolidation인 것만 Delete 버튼 활성화
|
393 |
|
|
{
|
394 |
|
|
if(info.AvoidConsolidate == 1 || info.Consolidate == 1)
|
395 |
|
|
info.userDelete = true;
|
396 |
|
|
}
|
397 |
|
|
else
|
398 |
|
|
{
|
399 |
|
|
info.userDelete = true;
|
400 |
|
|
}
|
401 |
274cde11
|
taeseongkim
|
info.DisplayColor = "#FFFF0000";
|
402 |
|
|
}
|
403 |
|
|
else
|
404 |
|
|
{
|
405 |
|
|
info.userDelete = false;
|
406 |
|
|
}
|
407 |
d128ceb2
|
humkyung
|
|
408 |
274cde11
|
taeseongkim
|
ViewerDataModel.Instance._markupInfoList.Add(info);
|
409 |
|
|
}
|
410 |
8e5a4a6a
|
taeseongkim
|
|
411 |
274cde11
|
taeseongkim
|
var userInfoList = ViewerDataModel.Instance._markupInfoList.GroupBy(f => f.UserID).Select(f => new MarkupUserInfo { UserId = f.Key, UserName = f.First().UserName });
|
412 |
8e5a4a6a
|
taeseongkim
|
|
413 |
274cde11
|
taeseongkim
|
userInfoList.ToList().ForEach(x => ViewerDataModel.Instance._markupUserList.Add(x));
|
414 |
|
|
|
415 |
|
|
e.Result.ToList().ForEach(d =>
|
416 |
787a4489
|
KangIngu
|
{
|
417 |
274cde11
|
taeseongkim
|
if (d.MarkupList != null)
|
418 |
787a4489
|
KangIngu
|
{
|
419 |
274cde11
|
taeseongkim
|
d.MarkupList.ForEach(p =>
|
420 |
0585d5cc
|
taeseongkim
|
{
|
421 |
274cde11
|
taeseongkim
|
if (d.UserID == App.ViewInfo.UserID)
|
422 |
0585d5cc
|
taeseongkim
|
{
|
423 |
ecf8a079
|
이지연
|
if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission) //조회모드는 delete 버튼 모두 비활성화
|
424 |
|
|
{
|
425 |
|
|
d.userDelete = false;
|
426 |
|
|
}
|
427 |
|
|
else if (!App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission && e.Result.Where(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1).Count() > 0)//Team Consolidation Mode이고 Team Consolidation Layer가 있을 경우
|
428 |
|
|
{
|
429 |
|
|
if (App.ViewInfo.NewCommentPermission && e.Result.Where(x => x.UserID == App.ViewInfo.UserID && x.PartConsolidate == 1 && x.MarkupInfoID == d.MarkupInfoID).Count() > 0)
|
430 |
|
|
d.userDelete = true;
|
431 |
|
|
}
|
432 |
|
|
else if (App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission) //Consolidation Mode 일 때는 해당 Comment Layer의 Status가 Avoid or Consolidation인 것만 Delete 버튼 활성화
|
433 |
|
|
{
|
434 |
|
|
if (d.AvoidConsolidate == 1 || d.Consolidate == 1)
|
435 |
|
|
d.userDelete = true;
|
436 |
|
|
}
|
437 |
|
|
else
|
438 |
|
|
{
|
439 |
|
|
d.userDelete = true;
|
440 |
|
|
}
|
441 |
274cde11
|
taeseongkim
|
d.DisplayColor = "#FFFF0000";
|
442 |
|
|
MarkupItemEx markup = new MarkupItemEx
|
443 |
|
|
{
|
444 |
|
|
Data = p.Data,
|
445 |
|
|
Data_Type = p.Data_Type,
|
446 |
|
|
ID = p.ID,
|
447 |
|
|
IsUpdate = false,
|
448 |
|
|
MarkupInfoID = d.MarkupInfoID,
|
449 |
|
|
PageNumber = p.PageNumber,
|
450 |
|
|
Symbol_ID = p.Symbol_ID,
|
451 |
|
|
//Group_ID = p.Group_ID
|
452 |
|
|
};
|
453 |
|
|
ViewerDataModel.Instance.MyMarkupList.Add(markup);
|
454 |
|
|
}
|
455 |
|
|
else
|
456 |
0585d5cc
|
taeseongkim
|
{
|
457 |
274cde11
|
taeseongkim
|
MarkupItemEx markup = new MarkupItemEx
|
458 |
|
|
{
|
459 |
|
|
Data = p.Data,
|
460 |
|
|
Data_Type = p.Data_Type,
|
461 |
|
|
ID = p.ID,
|
462 |
|
|
IsUpdate = false,
|
463 |
|
|
MarkupInfoID = d.MarkupInfoID,
|
464 |
|
|
PageNumber = p.PageNumber,
|
465 |
|
|
Symbol_ID = p.Symbol_ID,
|
466 |
|
|
//Group_ID = p.Group_ID
|
467 |
|
|
};
|
468 |
|
|
ViewerDataModel.Instance.MarkupList_Pre.Add(markup);
|
469 |
|
|
}
|
470 |
|
|
});
|
471 |
|
|
}
|
472 |
|
|
});
|
473 |
787a4489
|
KangIngu
|
|
474 |
f258d884
|
humkyung
|
var currentUser = e.Result.Find(data => data.UserID == App.ViewInfo.UserID && data.AvoidConsolidate == 0);
|
475 |
274cde11
|
taeseongkim
|
if (currentUser == null)
|
476 |
27cf69cd
|
taeseongkim
|
{
|
477 |
274cde11
|
taeseongkim
|
/// create a new markupinfo to do comments
|
478 |
|
|
if (App.ViewInfo.NewCommentPermission)
|
479 |
27cf69cd
|
taeseongkim
|
{
|
480 |
274cde11
|
taeseongkim
|
var infoId = Commons.shortGuid();
|
481 |
|
|
PreviewUserMarkupInfoItem = new MarkupInfoItem
|
482 |
|
|
{
|
483 |
|
|
CreateTime = DateTime.Now,
|
484 |
|
|
UpdateTime = DateTime.Now,
|
485 |
|
|
Depatment = userData.DEPARTMENT,
|
486 |
|
|
DisplayColor = "#FFFF0000",
|
487 |
|
|
UserID = userData.ID,
|
488 |
|
|
UserName = userData.NAME,
|
489 |
|
|
PageCount = 1,
|
490 |
|
|
Description = "",
|
491 |
|
|
MarkupInfoID = infoId,
|
492 |
|
|
MarkupList = null,
|
493 |
|
|
MarkupVersionID = Commons.shortGuid(),
|
494 |
|
|
Consolidate = 0,
|
495 |
|
|
PartConsolidate = 0,
|
496 |
|
|
userDelete = true,
|
497 |
|
|
AvoidConsolidate = 0,
|
498 |
|
|
IsPreviewUser = false
|
499 |
|
|
};
|
500 |
|
|
|
501 |
|
|
App.Custom_ViewInfoId = infoId;
|
502 |
|
|
|
503 |
|
|
ViewerDataModel.Instance._markupInfoList.Insert(0, PreviewUserMarkupInfoItem);
|
504 |
|
|
}
|
505 |
|
|
}
|
506 |
|
|
else
|
507 |
|
|
{
|
508 |
|
|
App.Custom_ViewInfoId = currentUser.MarkupInfoID;
|
509 |
27cf69cd
|
taeseongkim
|
}
|
510 |
787a4489
|
KangIngu
|
|
511 |
752b18ef
|
taeseongkim
|
ViewerDataModel.Instance.SyncPageNumber = 1;
|
512 |
3ffd4b2d
|
humkyung
|
|
513 |
274cde11
|
taeseongkim
|
/// Consolidation 된 데이터가 최상단에 올 수 있도록 변경
|
514 |
|
|
//var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList();
|
515 |
be72bfd6
|
taeseongkim
|
|
516 |
274cde11
|
taeseongkim
|
gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
|
517 |
53deabaf
|
taeseongkim
|
|
518 |
274cde11
|
taeseongkim
|
SetCommentPages(null);
|
519 |
992a98b4
|
KangIngu
|
|
520 |
274cde11
|
taeseongkim
|
// GRIDVIEW에서 팀별 GROUPING
|
521 |
|
|
// 효성은 안함
|
522 |
1f2348b2
|
taeseongkim
|
#if (Hyosung)
|
523 |
|
|
#else
|
524 |
274cde11
|
taeseongkim
|
/// create a group descriptor
|
525 |
|
|
gridViewMarkup.GroupDescriptors.Clear();
|
526 |
|
|
GroupDescriptor descriptor = new GroupDescriptor();
|
527 |
|
|
descriptor.Member = "Depatment";
|
528 |
|
|
descriptor.DisplayContent = "DEPT";
|
529 |
|
|
//descriptor.SortDirection = ListSortDirection.Ascending;
|
530 |
|
|
gridViewMarkup.GroupDescriptors.Add(descriptor);
|
531 |
47b95004
|
taeseongkim
|
#endif
|
532 |
be72bfd6
|
taeseongkim
|
|
533 |
274cde11
|
taeseongkim
|
GridViewMarkup_Sorting(gridViewMarkup, new GridViewSortingEventArgs(gridViewMarkup.Columns[0], SortingState.None, SortingState.None));
|
534 |
be72bfd6
|
taeseongkim
|
|
535 |
f38ed998
|
humkyung
|
SelectInitialMarkupInfo();
|
536 |
53deabaf
|
taeseongkim
|
}
|
537 |
787a4489
|
KangIngu
|
}
|
538 |
274cde11
|
taeseongkim
|
catch (Exception ex)
|
539 |
|
|
{
|
540 |
|
|
App.FileLogger.Fatal(ex);
|
541 |
|
|
}
|
542 |
cf1cc862
|
taeseongkim
|
finally
|
543 |
|
|
{
|
544 |
|
|
if(!ViewerDataModel.Instance.SystemMain.dzMainMenu.btnFinalPDF.IsEnabled)
|
545 |
|
|
{
|
546 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.btnFinalPDF.IsEnabled = true;
|
547 |
|
|
}
|
548 |
6a19b48d
|
taeseongkim
|
|
549 |
|
|
if (!ViewerDataModel.Instance.SystemMain.dzMainMenu.btnConsolidate.IsEnabled)
|
550 |
|
|
{
|
551 |
|
|
ViewerDataModel.Instance.SystemMain.dzMainMenu.btnConsolidate.IsEnabled = true;
|
552 |
|
|
}
|
553 |
cf1cc862
|
taeseongkim
|
}
|
554 |
787a4489
|
KangIngu
|
}
|
555 |
|
|
|
556 |
f38ed998
|
humkyung
|
/// <summary>
|
557 |
|
|
/// 프로그램이 로딩되고 난 후 맨처음으로 MarkupInfo를 선택한다.
|
558 |
|
|
/// </summary>
|
559 |
|
|
private void SelectInitialMarkupInfo()
|
560 |
|
|
{
|
561 |
|
|
if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission)
|
562 |
|
|
{
|
563 |
|
|
#region Consolidate 항목이 있으면 Consolidate 항목만 추가
|
564 |
|
|
if (ViewerDataModel.Instance._markupInfoList.Any(x => x.Consolidate == 1 && x.AvoidConsolidate == 0))
|
565 |
|
|
{
|
566 |
|
|
var Consolidates = ViewerDataModel.Instance._markupInfoList.Where(x => x.Consolidate == 1 && x.AvoidConsolidate == 0).ToList();
|
567 |
|
|
Consolidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
|
568 |
|
|
}
|
569 |
|
|
#endregion
|
570 |
053f2163
|
humkyung
|
#region Consolidate 항목이 없을 경우에는 사용자 별로 AvoidConsolidate를 제외한 우선 순위가 높은(Team,Comment)항목들을 선택
|
571 |
f38ed998
|
humkyung
|
else
|
572 |
|
|
{
|
573 |
053f2163
|
humkyung
|
var MarkupInfoColl = ViewerDataModel.Instance._markupInfoList.Where(x => x.AvoidConsolidate == 0).ToList();
|
574 |
|
|
|
575 |
|
|
#region Team consolidate 항목 선택
|
576 |
|
|
var Candidates = MarkupInfoColl.Where(x => x.PartConsolidate == 1 && x.AvoidConsolidate == 0).ToList();
|
577 |
|
|
MarkupInfoColl.RemoveAll(x => Candidates.Exists(y => y.UserID == x.UserID));
|
578 |
|
|
#endregion
|
579 |
|
|
|
580 |
|
|
#region 추가되지 않은 사용자들을 추가
|
581 |
|
|
foreach (var item in MarkupInfoColl.Where(x => !Candidates.Exists(y => y.UserID == x.UserID)))
|
582 |
|
|
{
|
583 |
|
|
Candidates.Add(item);
|
584 |
|
|
}
|
585 |
|
|
#endregion
|
586 |
|
|
|
587 |
|
|
Candidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
|
588 |
f38ed998
|
humkyung
|
}
|
589 |
|
|
#endregion
|
590 |
|
|
}
|
591 |
|
|
else if (!App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission) /// Eng'r Comment Mode
|
592 |
|
|
{
|
593 |
|
|
var MarkupInfoColl = ViewerDataModel.Instance._markupInfoList.Where(x => x.AvoidConsolidate == 0).ToList();
|
594 |
|
|
|
595 |
|
|
#region Team consolidate 항목 선택
|
596 |
053f2163
|
humkyung
|
var Candidates = MarkupInfoColl.Where(x => x.PartConsolidate == 1 && x.AvoidConsolidate == 0).ToList();
|
597 |
|
|
MarkupInfoColl.RemoveAll(x => Candidates.Exists(y => y.UserID == x.UserID));
|
598 |
f38ed998
|
humkyung
|
#endregion
|
599 |
|
|
|
600 |
|
|
#region 추가되지 않은 사용자들을 추가
|
601 |
|
|
foreach (var item in MarkupInfoColl.Where(x => !Candidates.Exists(y => y.UserID == x.UserID)))
|
602 |
|
|
{
|
603 |
|
|
Candidates.Add(item);
|
604 |
|
|
}
|
605 |
|
|
#endregion
|
606 |
|
|
|
607 |
|
|
Candidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
|
608 |
|
|
}
|
609 |
053f2163
|
humkyung
|
else if (App.ViewInfo.CreateFinalPDFPermission) /// Orig Comment Model
|
610 |
f38ed998
|
humkyung
|
{
|
611 |
|
|
if (ViewerDataModel.Instance._markupInfoList.Any(x => x.Consolidate == 1 && x.AvoidConsolidate == 0))
|
612 |
|
|
{
|
613 |
|
|
var Consolidates = ViewerDataModel.Instance._markupInfoList.Where(x => x.Consolidate == 1 && x.AvoidConsolidate == 0).ToList();
|
614 |
|
|
Consolidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
|
615 |
|
|
}
|
616 |
053f2163
|
humkyung
|
else if (ViewerDataModel.Instance._markupInfoList.Any(x => x.PartConsolidate == 1 && x.AvoidConsolidate == 0))
|
617 |
f38ed998
|
humkyung
|
{
|
618 |
053f2163
|
humkyung
|
var MarkupInfoColl = ViewerDataModel.Instance._markupInfoList.Where(x => x.AvoidConsolidate == 0).ToList();
|
619 |
|
|
|
620 |
|
|
#region Team consolidate 항목 선택
|
621 |
|
|
var Candidates = MarkupInfoColl.Where(x => x.PartConsolidate == 1 && x.AvoidConsolidate == 0).ToList();
|
622 |
|
|
MarkupInfoColl.RemoveAll(x => Candidates.Exists(y => y.UserID == x.UserID));
|
623 |
|
|
#endregion
|
624 |
|
|
|
625 |
|
|
#region 추가되지 않은 사용자들을 추가
|
626 |
|
|
foreach (var item in MarkupInfoColl.Where(x => !Candidates.Exists(y => y.UserID == x.UserID)))
|
627 |
|
|
{
|
628 |
|
|
Candidates.Add(item);
|
629 |
|
|
}
|
630 |
|
|
#endregion
|
631 |
|
|
|
632 |
|
|
Candidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
|
633 |
f38ed998
|
humkyung
|
}
|
634 |
|
|
else
|
635 |
|
|
{
|
636 |
053f2163
|
humkyung
|
var Comments = ViewerDataModel.Instance._markupInfoList.Where(x => x.Consolidate == 0 && x.AvoidConsolidate == 0).ToList();
|
637 |
f38ed998
|
humkyung
|
Comments.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
|
638 |
|
|
}
|
639 |
|
|
}
|
640 |
|
|
|
641 |
|
|
if (!gridViewMarkup.SelectedItems.Any())
|
642 |
|
|
{
|
643 |
|
|
var SelectedItem = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.UpdateTime).FirstOrDefault();
|
644 |
|
|
|
645 |
|
|
if (PreviewUserMarkupInfoItem != null)
|
646 |
|
|
{
|
647 |
|
|
this.gridViewMarkup.SelectedItem = PreviewUserMarkupInfoItem;
|
648 |
|
|
}
|
649 |
|
|
else if (SelectedItem != null)
|
650 |
|
|
{
|
651 |
|
|
this.gridViewMarkup.SelectedItem = SelectedItem;
|
652 |
|
|
}
|
653 |
|
|
else if (ViewerDataModel.Instance._markupInfoList.Any())
|
654 |
|
|
{
|
655 |
|
|
this.gridViewMarkup.SelectedItem = ViewerDataModel.Instance._markupInfoList[0];
|
656 |
|
|
}
|
657 |
|
|
}
|
658 |
|
|
}
|
659 |
|
|
|
660 |
be72bfd6
|
taeseongkim
|
private void GridViewMarkup_Sorting(object sender, GridViewSortingEventArgs e)
|
661 |
|
|
{
|
662 |
|
|
IEnumerable<IKCOM.MarkupInfoItem> markuplist = e.DataControl.ItemsSource as IEnumerable<IKCOM.MarkupInfoItem>;
|
663 |
|
|
|
664 |
|
|
if(markuplist == null)
|
665 |
|
|
{
|
666 |
|
|
e.Cancel = true;
|
667 |
|
|
return;
|
668 |
|
|
}
|
669 |
|
|
|
670 |
|
|
if(e.NewSortingState == SortingState.None)
|
671 |
|
|
{
|
672 |
|
|
markuplist = markuplist.OrderByDescending(x => SortIndex(x))
|
673 |
|
|
.ThenBy(x => x.Depatment)
|
674 |
|
|
.ThenBy(x => x.UserID);
|
675 |
|
|
|
676 |
|
|
e.DataControl.ItemsSource = markuplist.ToList();
|
677 |
|
|
}
|
678 |
|
|
}
|
679 |
|
|
|
680 |
|
|
|
681 |
|
|
// 마크업 리스트 정렬
|
682 |
|
|
private int SortIndex(IKCOM.MarkupInfoItem markupInfoItem)
|
683 |
|
|
{
|
684 |
|
|
int result = 0;
|
685 |
|
|
|
686 |
|
|
// Consolidate은 최상단
|
687 |
|
|
if (markupInfoItem.Consolidate == 1)
|
688 |
|
|
{
|
689 |
|
|
result += 2;
|
690 |
|
|
}
|
691 |
|
|
|
692 |
|
|
/// Consolidate 다음으로 우선순위
|
693 |
|
|
if (markupInfoItem.UserID == App.ViewInfo.UserID)
|
694 |
|
|
{
|
695 |
|
|
result += 1;
|
696 |
|
|
}
|
697 |
|
|
|
698 |
|
|
return result;
|
699 |
|
|
}
|
700 |
|
|
|
701 |
|
|
|
702 |
|
|
private void GridViewMarkup_Sorted(object sender, GridViewSortedEventArgs e)
|
703 |
|
|
{
|
704 |
|
|
|
705 |
|
|
}
|
706 |
|
|
|
707 |
ac4f1e13
|
taeseongkim
|
private async void gridViewRevMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
|
708 |
787a4489
|
KangIngu
|
{
|
709 |
|
|
List<MarkupInfoItem> gridSelectionItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
|
710 |
|
|
//if (ViewerDataModel.Instance.PageBalanceNumber == 0)
|
711 |
|
|
//{
|
712 |
|
|
// ViewerDataModel.Instance.PageBalanceNumber = 1;
|
713 |
|
|
//}
|
714 |
|
|
|
715 |
752b18ef
|
taeseongkim
|
if (ViewerDataModel.Instance.SyncPageNumber == 0)
|
716 |
787a4489
|
KangIngu
|
{
|
717 |
752b18ef
|
taeseongkim
|
ViewerDataModel.Instance.SyncPageNumber = 1;
|
718 |
787a4489
|
KangIngu
|
}
|
719 |
|
|
if (e.AddedItems.Count() > 0)
|
720 |
|
|
{
|
721 |
|
|
foreach (var item in gridSelectionItem)
|
722 |
|
|
{
|
723 |
|
|
//item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageBalanceNumber).ToList().ForEach(delegate (MarkupItem markupitem)
|
724 |
|
|
//{
|
725 |
|
|
// layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
|
726 |
|
|
//});
|
727 |
ac4f1e13
|
taeseongkim
|
|
728 |
752b18ef
|
taeseongkim
|
var pageItems = item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.SyncPageNumber).ToList();
|
729 |
ac4f1e13
|
taeseongkim
|
|
730 |
|
|
foreach (var markupitem in pageItems)
|
731 |
787a4489
|
KangIngu
|
{
|
732 |
f5f788c2
|
taeseongkim
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID);
|
733 |
ac4f1e13
|
taeseongkim
|
}
|
734 |
787a4489
|
KangIngu
|
}
|
735 |
|
|
}
|
736 |
|
|
else if (e.RemovedItems.Count > 0)
|
737 |
|
|
{
|
738 |
|
|
var _infoItem = e.RemovedItems.Cast<MarkupInfoItem>().ToList();
|
739 |
|
|
|
740 |
|
|
(from A in _infoItem
|
741 |
|
|
from B in Common.ViewerDataModel.Instance.MarkupControls_Sync
|
742 |
|
|
where A.MarkupInfoID == B.MarkupInfoID
|
743 |
|
|
select B).ToList().ForEach(data =>
|
744 |
|
|
{
|
745 |
|
|
Common.ViewerDataModel.Instance.MarkupControls_Sync.Remove(data);
|
746 |
|
|
});
|
747 |
|
|
}
|
748 |
|
|
}
|
749 |
e7dd7ae8
|
humkyung
|
|
750 |
|
|
/// <summary>
|
751 |
|
|
/// 선택한 항목은 Visibility = Visible, 해제한 항목은 Visibility = Hidden 처리한다.
|
752 |
|
|
/// </summary>
|
753 |
|
|
/// <param name="sender"></param>
|
754 |
|
|
/// <param name="e"></param>
|
755 |
ac4f1e13
|
taeseongkim
|
private async void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
|
756 |
787a4489
|
KangIngu
|
{
|
757 |
3abe8d4e
|
taeseongkim
|
|
758 |
|
|
foreach (var item in e.AddedItems)
|
759 |
|
|
{
|
760 |
|
|
var cellToSelect = new GridViewCellInfo(item, this.gridViewMarkup.Columns["color"], this.gridViewMarkup);
|
761 |
|
|
|
762 |
|
|
if(cellToSelect != null)
|
763 |
|
|
{
|
764 |
|
|
|
765 |
|
|
}
|
766 |
|
|
}
|
767 |
|
|
|
768 |
2089959a
|
taeseongkim
|
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
|
769 |
|
|
|
770 |
787a4489
|
KangIngu
|
var dataSet = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
|
771 |
|
|
var dataSet_User = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
|
772 |
|
|
var resultA = (from item_Select in dataSet
|
773 |
|
|
from item_Non in dataSet_User
|
774 |
|
|
where item_Select == item_Non
|
775 |
|
|
select item_Non).ToList();
|
776 |
|
|
|
777 |
|
|
if (resultA.Count() >= 2)
|
778 |
|
|
{
|
779 |
eeb0a39c
|
taeseongkim
|
// 동일한 사용자 데이터가 두개 이상 선택됩니다. Consolidation을 선택할까요?
|
780 |
787a4489
|
KangIngu
|
RadWindow.Confirm(new DialogParameters
|
781 |
|
|
{
|
782 |
b9b01f8e
|
ljiyeon
|
Owner = Application.Current.MainWindow,
|
783 |
eeb0a39c
|
taeseongkim
|
Header = "Info",
|
784 |
|
|
Content = "Selected more than two identical user data. Do you want to select consolidation?",
|
785 |
787a4489
|
KangIngu
|
Closed = new EventHandler<WindowClosedEventArgs>((sen, ea) =>
|
786 |
|
|
{
|
787 |
90d1dee0
|
swate0609
|
if(ea.DialogResult == null)
|
788 |
|
|
{
|
789 |
|
|
return;
|
790 |
|
|
}
|
791 |
787a4489
|
KangIngu
|
if (e.AddedItems.Count() == 1)
|
792 |
|
|
{
|
793 |
|
|
MarkupInfoItem instanceItem = e.AddedItems.FirstOrDefault() as MarkupInfoItem;
|
794 |
8ab0d0b1
|
송근호
|
gridViewMarkup.SelectedItem = null;
|
795 |
787a4489
|
KangIngu
|
|
796 |
8ab0d0b1
|
송근호
|
|
797 |
787a4489
|
KangIngu
|
if (ea.DialogResult.Value)
|
798 |
|
|
{
|
799 |
8ab0d0b1
|
송근호
|
if (instanceItem.Consolidate == 1 || instanceItem.PartConsolidate == 1)
|
800 |
|
|
{
|
801 |
|
|
gridViewMarkup.SelectedItem = instanceItem;
|
802 |
|
|
}
|
803 |
|
|
else
|
804 |
|
|
{
|
805 |
|
|
//1. Consolidations이 있다면 하나 선택
|
806 |
|
|
var Consolidations = resultA.Where(item => (item.Consolidate == 1 || item.PartConsolidate == 1));
|
807 |
|
|
|
808 |
|
|
if (Consolidations.Count() > 0)
|
809 |
|
|
{
|
810 |
|
|
gridViewMarkup.SelectedItem = Consolidations.First();
|
811 |
|
|
}
|
812 |
|
|
}
|
813 |
|
|
|
814 |
787a4489
|
KangIngu
|
}
|
815 |
8ab0d0b1
|
송근호
|
else {
|
816 |
|
|
//1. Consolidations 아닌게 있다면 Change
|
817 |
|
|
var notConsolidations = resultA.Where(item => !(item.Consolidate == 1 || item.PartConsolidate == 1));
|
818 |
|
|
|
819 |
|
|
if(notConsolidations.Count() > 0) {
|
820 |
|
|
gridViewMarkup.SelectedItem = notConsolidations.First();
|
821 |
|
|
}
|
822 |
|
|
else {//1. Consolidations 아닌게 없다면 그대로
|
823 |
|
|
gridViewMarkup.SelectedItem = instanceItem;
|
824 |
|
|
}
|
825 |
|
|
|
826 |
787a4489
|
KangIngu
|
}
|
827 |
|
|
}
|
828 |
|
|
}),
|
829 |
|
|
Theme = new Windows8Theme(),
|
830 |
|
|
ModalBackground = new System.Windows.Media.SolidColorBrush { Color = System.Windows.Media.Colors.Black, Opacity = 0.6 },
|
831 |
|
|
});
|
832 |
|
|
}
|
833 |
|
|
else //파라미터로 넘어온 사용자가 걸리지 않은 경우
|
834 |
|
|
{
|
835 |
6b5d33c6
|
djkim
|
List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
|
836 |
|
|
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
|
837 |
|
|
List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
|
838 |
47b95004
|
taeseongkim
|
#region 코멘트 보기
|
839 |
d18ea2bd
|
taeseongkim
|
if (e.AddedItems.Count() > 0 && this.pageNavigator.CurrentPage != null)
|
840 |
6b5d33c6
|
djkim
|
{
|
841 |
|
|
foreach (var item in gridSelectionItem)
|
842 |
|
|
{
|
843 |
3ffd4b2d
|
humkyung
|
if (item.UserID == App.ViewInfo.UserID)
|
844 |
6b5d33c6
|
djkim
|
{
|
845 |
101da246
|
humkyung
|
var controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
846 |
|
|
if (controls.Count == 0)
|
847 |
6b5d33c6
|
djkim
|
{
|
848 |
129ca191
|
humkyung
|
var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
849 |
ac4f1e13
|
taeseongkim
|
|
850 |
6b5d33c6
|
djkim
|
foreach (var markup in instance)
|
851 |
|
|
{
|
852 |
f5f788c2
|
taeseongkim
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
|
853 |
43e1d368
|
taeseongkim
|
item.MarkupInfoID, markup.ID,STAMP_Contents:App.SystemInfo.STAMP_CONTENTS);
|
854 |
6b5d33c6
|
djkim
|
}
|
855 |
|
|
}
|
856 |
101da246
|
humkyung
|
|
857 |
|
|
controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
858 |
|
|
foreach (var control in controls)
|
859 |
6b5d33c6
|
djkim
|
{
|
860 |
d62c0439
|
humkyung
|
Logger.sendCheckLog(String.Format("=={0}", control), 1);
|
861 |
101da246
|
humkyung
|
control.Visibility = Visibility.Visible;
|
862 |
6b5d33c6
|
djkim
|
}
|
863 |
|
|
}
|
864 |
3ffd4b2d
|
humkyung
|
else
|
865 |
6b5d33c6
|
djkim
|
{
|
866 |
101da246
|
humkyung
|
var controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
867 |
|
|
if (controls.Count == 0)
|
868 |
|
|
{
|
869 |
129ca191
|
humkyung
|
var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
870 |
101da246
|
humkyung
|
foreach (var markup in instance)
|
871 |
|
|
{
|
872 |
f5f788c2
|
taeseongkim
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
|
873 |
101da246
|
humkyung
|
item.MarkupInfoID, markup.ID);
|
874 |
|
|
}
|
875 |
|
|
}
|
876 |
|
|
|
877 |
|
|
controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
878 |
|
|
foreach (var control in controls)
|
879 |
6b5d33c6
|
djkim
|
{
|
880 |
e7dd7ae8
|
humkyung
|
control.Visibility = Visibility.Visible;
|
881 |
6b5d33c6
|
djkim
|
}
|
882 |
|
|
}
|
883 |
|
|
}
|
884 |
|
|
}
|
885 |
47b95004
|
taeseongkim
|
#endregion
|
886 |
|
|
#region 코멘트 숨기기
|
887 |
6b5d33c6
|
djkim
|
else if (e.RemovedItems.Count > 0)
|
888 |
|
|
{
|
889 |
|
|
var _infoItem = e.RemovedItems.Cast<MarkupInfoItem>().ToList();
|
890 |
|
|
|
891 |
|
|
(from A in _infoItem
|
892 |
|
|
from B in Common.ViewerDataModel.Instance.MarkupControls
|
893 |
|
|
where A.MarkupInfoID == B.MarkupInfoID
|
894 |
|
|
select B).ToList().ForEach(data =>
|
895 |
|
|
{
|
896 |
b5ac6d6e
|
ljiyeon
|
data.Visibility = Visibility.Hidden;
|
897 |
6b5d33c6
|
djkim
|
});
|
898 |
|
|
|
899 |
b5ac6d6e
|
ljiyeon
|
|
900 |
6b5d33c6
|
djkim
|
var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault();
|
901 |
|
|
if (myComment != null)
|
902 |
|
|
{
|
903 |
|
|
Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem)
|
904 |
|
|
{
|
905 |
e7dd7ae8
|
humkyung
|
markupitem.Visibility = Visibility.Hidden;
|
906 |
6b5d33c6
|
djkim
|
});
|
907 |
|
|
}
|
908 |
|
|
}
|
909 |
47b95004
|
taeseongkim
|
#endregion
|
910 |
787a4489
|
KangIngu
|
}
|
911 |
|
|
}
|
912 |
|
|
|
913 |
3abe8d4e
|
taeseongkim
|
private async void gridViewMarkup_SelectedCellsChanged(object sender, Telerik.Windows.Controls.GridView.GridViewSelectedCellsChangedEventArgs e)
|
914 |
|
|
{
|
915 |
|
|
if (e.AddedCells.Count() > 0)
|
916 |
|
|
{
|
917 |
|
|
if(e.AddedCells[0].Column.Name == "color")
|
918 |
|
|
{
|
919 |
|
|
|
920 |
|
|
}
|
921 |
|
|
else
|
922 |
|
|
{
|
923 |
|
|
List<MarkupInfoItem> removeItems = new List<MarkupInfoItem>();
|
924 |
|
|
|
925 |
|
|
if (!gridViewMarkup.SelectedItems.Contains(e.AddedCells[0].Item))
|
926 |
|
|
{
|
927 |
|
|
gridViewMarkup.SelectedItems.Add(e.AddedCells[0].Item);
|
928 |
|
|
}
|
929 |
|
|
else
|
930 |
|
|
{
|
931 |
|
|
gridViewMarkup.Unselect(new[] { e.AddedCells[0].Item });
|
932 |
|
|
|
933 |
|
|
removeItems.Add(e.AddedCells[0].Item as MarkupInfoItem);
|
934 |
|
|
}
|
935 |
|
|
|
936 |
|
|
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
|
937 |
|
|
|
938 |
|
|
var dataSet = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
|
939 |
|
|
var dataSet_User = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
|
940 |
|
|
var resultA = (from item_Select in dataSet
|
941 |
|
|
from item_Non in dataSet_User
|
942 |
|
|
where item_Select == item_Non
|
943 |
|
|
select item_Non).ToList();
|
944 |
|
|
|
945 |
|
|
if (resultA.Count() >= 2)
|
946 |
|
|
{
|
947 |
|
|
// 동일한 사용자 데이터가 두개 이상 선택됩니다. Consolidation을 선택할까요?
|
948 |
|
|
RadWindow.Confirm(new DialogParameters
|
949 |
|
|
{
|
950 |
|
|
Owner = Application.Current.MainWindow,
|
951 |
|
|
Header = "Info",
|
952 |
|
|
Content = "Selected more than two identical user data. Do you want to select consolidation?",
|
953 |
|
|
Closed = new EventHandler<WindowClosedEventArgs>((sen, ea) =>
|
954 |
|
|
{
|
955 |
90d1dee0
|
swate0609
|
if (ea.DialogResult == null)
|
956 |
|
|
{
|
957 |
|
|
return;
|
958 |
|
|
}
|
959 |
3abe8d4e
|
taeseongkim
|
if (gridViewMarkup.SelectedItems.Count() == 1)
|
960 |
|
|
{
|
961 |
|
|
MarkupInfoItem instanceItem = gridViewMarkup.SelectedItems.FirstOrDefault() as MarkupInfoItem;
|
962 |
|
|
gridViewMarkup.SelectedItem = null;
|
963 |
|
|
|
964 |
|
|
|
965 |
|
|
if (ea.DialogResult.Value)
|
966 |
|
|
{
|
967 |
|
|
if (instanceItem.Consolidate == 1 || instanceItem.PartConsolidate == 1)
|
968 |
|
|
{
|
969 |
|
|
gridViewMarkup.SelectedItem = instanceItem;
|
970 |
|
|
}
|
971 |
|
|
else
|
972 |
|
|
{
|
973 |
|
|
//1. Consolidations이 있다면 하나 선택
|
974 |
|
|
var Consolidations = resultA.Where(item => (item.Consolidate == 1 || item.PartConsolidate == 1));
|
975 |
|
|
|
976 |
|
|
if (Consolidations.Count() > 0)
|
977 |
|
|
{
|
978 |
|
|
gridViewMarkup.SelectedItem = Consolidations.First();
|
979 |
|
|
}
|
980 |
|
|
}
|
981 |
|
|
|
982 |
|
|
}
|
983 |
|
|
else
|
984 |
|
|
{
|
985 |
|
|
//1. Consolidations 아닌게 있다면 Change
|
986 |
|
|
var notConsolidations = resultA.Where(item => !(item.Consolidate == 1 || item.PartConsolidate == 1));
|
987 |
|
|
|
988 |
|
|
if (notConsolidations.Count() > 0)
|
989 |
|
|
{
|
990 |
|
|
gridViewMarkup.SelectedItem = notConsolidations.First();
|
991 |
|
|
}
|
992 |
|
|
else
|
993 |
|
|
{//1. Consolidations 아닌게 없다면 그대로
|
994 |
|
|
gridViewMarkup.SelectedItem = instanceItem;
|
995 |
|
|
}
|
996 |
|
|
|
997 |
|
|
}
|
998 |
|
|
}
|
999 |
|
|
}),
|
1000 |
|
|
Theme = new Windows8Theme(),
|
1001 |
|
|
ModalBackground = new System.Windows.Media.SolidColorBrush { Color = System.Windows.Media.Colors.Black, Opacity = 0.6 },
|
1002 |
|
|
});
|
1003 |
|
|
}
|
1004 |
|
|
else //파라미터로 넘어온 사용자가 걸리지 않은 경우
|
1005 |
|
|
{
|
1006 |
|
|
List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
|
1007 |
|
|
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
|
1008 |
|
|
List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
|
1009 |
|
|
#region 코멘트 보기
|
1010 |
|
|
if (gridViewMarkup.SelectedItems.Count() > 0 && this.pageNavigator.CurrentPage != null)
|
1011 |
|
|
{
|
1012 |
|
|
foreach (var item in gridSelectionItem)
|
1013 |
|
|
{
|
1014 |
|
|
if (item.UserID == App.ViewInfo.UserID)
|
1015 |
|
|
{
|
1016 |
|
|
var controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
1017 |
|
|
if (controls.Count == 0)
|
1018 |
|
|
{
|
1019 |
|
|
var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
1020 |
|
|
|
1021 |
|
|
foreach (var markup in instance)
|
1022 |
|
|
{
|
1023 |
|
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
|
1024 |
|
|
item.MarkupInfoID, markup.ID, STAMP_Contents: App.SystemInfo.STAMP_CONTENTS);
|
1025 |
|
|
}
|
1026 |
|
|
}
|
1027 |
|
|
|
1028 |
|
|
controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
1029 |
|
|
foreach (var control in controls)
|
1030 |
|
|
{
|
1031 |
|
|
Logger.sendCheckLog(String.Format("=={0}", control), 1);
|
1032 |
|
|
control.Visibility = Visibility.Visible;
|
1033 |
|
|
}
|
1034 |
|
|
}
|
1035 |
|
|
else
|
1036 |
|
|
{
|
1037 |
|
|
var controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
1038 |
|
|
if (controls.Count == 0)
|
1039 |
|
|
{
|
1040 |
|
|
var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
1041 |
|
|
foreach (var markup in instance)
|
1042 |
|
|
{
|
1043 |
|
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
|
1044 |
|
|
item.MarkupInfoID, markup.ID);
|
1045 |
|
|
}
|
1046 |
|
|
}
|
1047 |
|
|
|
1048 |
|
|
controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
|
1049 |
|
|
foreach (var control in controls)
|
1050 |
|
|
{
|
1051 |
|
|
control.Visibility = Visibility.Visible;
|
1052 |
|
|
}
|
1053 |
|
|
}
|
1054 |
|
|
}
|
1055 |
|
|
}
|
1056 |
|
|
#endregion
|
1057 |
|
|
#region 코멘트 숨기기
|
1058 |
|
|
else if (removeItems.Count > 0)
|
1059 |
|
|
{
|
1060 |
|
|
(from A in removeItems
|
1061 |
|
|
from B in Common.ViewerDataModel.Instance.MarkupControls
|
1062 |
|
|
where A.MarkupInfoID == B.MarkupInfoID
|
1063 |
|
|
select B).ToList().ForEach(data =>
|
1064 |
|
|
{
|
1065 |
|
|
data.Visibility = Visibility.Hidden;
|
1066 |
|
|
});
|
1067 |
|
|
|
1068 |
|
|
|
1069 |
|
|
var myComment = removeItems.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault();
|
1070 |
|
|
if (myComment != null)
|
1071 |
|
|
{
|
1072 |
|
|
Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem)
|
1073 |
|
|
{
|
1074 |
|
|
markupitem.Visibility = Visibility.Hidden;
|
1075 |
|
|
});
|
1076 |
|
|
}
|
1077 |
|
|
}
|
1078 |
|
|
#endregion
|
1079 |
|
|
}
|
1080 |
|
|
}
|
1081 |
|
|
}
|
1082 |
|
|
}
|
1083 |
|
|
|
1084 |
787a4489
|
KangIngu
|
private void BaseClient_GetDocumentItemInfoCompleted(object sender, GetDocumentItemInfoCompletedEventArgs e)
|
1085 |
|
|
{
|
1086 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetDocumentItemInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result?.DOCUMENT_ID + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
1087 |
0f065e57
|
ljiyeon
|
|
1088 |
787a4489
|
KangIngu
|
if (e.Result != null)
|
1089 |
|
|
{
|
1090 |
|
|
_DocItem = e.Result;
|
1091 |
|
|
|
1092 |
|
|
if (e.Result.DOCUMENT_NO == "" && e.Result.DOCUMENT_NAME == "" && e.Result.GROUP_NO == "0")
|
1093 |
|
|
{
|
1094 |
|
|
_ViewInfo.UserID = _ViewInfo.UserID.Replace(@"DAELIM\", "");
|
1095 |
|
|
}
|
1096 |
664ea2e1
|
taeseongkim
|
////Logger.sendReqLog("GetDocInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID, 1);
|
1097 |
787a4489
|
KangIngu
|
BaseClient.GetDocInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID });
|
1098 |
|
|
}
|
1099 |
|
|
else
|
1100 |
|
|
{
|
1101 |
0585d5cc
|
taeseongkim
|
DialogMessage_Alert("Document Information Not Found.", "Error");
|
1102 |
|
|
|
1103 |
787a4489
|
KangIngu
|
BaseClient.GetCheckSystemAdminCompleted += (sen, ea) =>
|
1104 |
|
|
{
|
1105 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetCheckSystemAdminCompleted", "UserState : " + ea.UserState + "\r Result :" + ea.Result + "\r Cancelled :" + ea.Cancelled + "\r Error :" + ea.Error, 1);
|
1106 |
0f065e57
|
ljiyeon
|
|
1107 |
787a4489
|
KangIngu
|
if (ea.Error == null)
|
1108 |
|
|
{
|
1109 |
|
|
if (ea.Result)
|
1110 |
|
|
{
|
1111 |
|
|
this._ViewInfo.isAdmin = true;
|
1112 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetDocInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID, 1);
|
1113 |
787a4489
|
KangIngu
|
BaseClient.GetDocInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID });
|
1114 |
|
|
}
|
1115 |
|
|
else
|
1116 |
|
|
{
|
1117 |
|
|
//System.Windows.Forms.MessageBox.Show("해당 프로젝트에 가입되지 않은 유저입니다. 관리자에게 등록신청을 해주세요", "안내");
|
1118 |
503cb09e
|
taeseongkim
|
DialogMessage_Alert("You are not belong to this project. Please ask admin for an authority.", "Info");
|
1119 |
787a4489
|
KangIngu
|
//this.ParentOfType<MainPage>().DialogMessage_Alert("해당 프로젝트에 가입되지 않은 유저입니다. 관리자에게 등록신청을 해주세요", "안내");
|
1120 |
|
|
}
|
1121 |
|
|
|
1122 |
|
|
}
|
1123 |
|
|
else
|
1124 |
|
|
{
|
1125 |
|
|
//System.Windows.Browser.HtmlPage.Window.Invoke("close");
|
1126 |
|
|
}
|
1127 |
|
|
};
|
1128 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetCheckSystemAdminAsync", _ViewInfo.UserID, 1);
|
1129 |
787a4489
|
KangIngu
|
BaseClient.GetCheckSystemAdminAsync(this._ViewInfo.UserID);
|
1130 |
|
|
}
|
1131 |
|
|
}
|
1132 |
|
|
|
1133 |
|
|
private void BaseClient_GetSystemDataCompleted(object sender, GetSystemDataCompletedEventArgs e)
|
1134 |
|
|
{
|
1135 |
664ea2e1
|
taeseongkim
|
//Logger.sendResLog("GetSystemDataCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
|
1136 |
0f065e57
|
ljiyeon
|
|
1137 |
787a4489
|
KangIngu
|
if (e.Error == null && e.Result != null)
|
1138 |
|
|
{
|
1139 |
|
|
App.SystemInfo = e.Result;
|
1140 |
|
|
|
1141 |
|
|
//App.urlPort_DB = App.SystemInfo.HostPort;
|
1142 |
|
|
//App.urlHost_DB = App.SystemInfo.HostName;
|
1143 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetConversionStateAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID, 1);
|
1144 |
787a4489
|
KangIngu
|
BaseClient.GetConversionStateAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID });
|
1145 |
|
|
|
1146 |
|
|
//if (App.urlHost.Contains("localhost"))
|
1147 |
|
|
//{
|
1148 |
|
|
// App.urlHost = App.urlHost_DB;
|
1149 |
|
|
//}
|
1150 |
|
|
}
|
1151 |
|
|
}
|
1152 |
|
|
|
1153 |
|
|
private void BaseClient_GetConversionStateCompleted(object sender, GetConversionStateCompletedEventArgs e)
|
1154 |
|
|
{
|
1155 |
f38ed998
|
humkyung
|
if (e.Error == null && e.Result)
|
1156 |
787a4489
|
KangIngu
|
{
|
1157 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetDocumentItemInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + _ViewInfo.UserID, 1);
|
1158 |
0f065e57
|
ljiyeon
|
|
1159 |
787a4489
|
KangIngu
|
BaseClient.GetDocumentItemInfoAsync(new KCOM_BasicParam { projectNo = _ViewInfo.ProjectNO, documentID = _ViewInfo.DocumentItemID, userID = _ViewInfo.UserID });
|
1160 |
|
|
|
1161 |
992a98b4
|
KangIngu
|
if (App.ViewInfo != null && App.ViewInfo.ProjectNO != "")
|
1162 |
787a4489
|
KangIngu
|
{
|
1163 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetMember", _ViewInfo.ProjectNO + "," + _ViewInfo.UserID, 1);
|
1164 |
6c781c0c
|
djkim
|
userData = BaseClient.GetMember(App.ViewInfo.ProjectNO, App.ViewInfo.UserID);
|
1165 |
|
|
if (userData != null)
|
1166 |
787a4489
|
KangIngu
|
{
|
1167 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetDeptDataAsync", userData.DEPARTMENT, 1);
|
1168 |
6c781c0c
|
djkim
|
BaseClient.GetDeptDataAsync(userData.DEPARTMENT);
|
1169 |
787a4489
|
KangIngu
|
}
|
1170 |
6c781c0c
|
djkim
|
else
|
1171 |
|
|
{
|
1172 |
|
|
userData = new MEMBER();
|
1173 |
|
|
userData.DEPARTMENT = "ALL";
|
1174 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetDeptDataAsync", userData.DEPARTMENT, 1);
|
1175 |
6c781c0c
|
djkim
|
BaseClient.GetDeptDataAsync(userData.DEPARTMENT);
|
1176 |
29010418
|
ljiyeon
|
}
|
1177 |
787a4489
|
KangIngu
|
}
|
1178 |
|
|
}
|
1179 |
|
|
else
|
1180 |
|
|
{
|
1181 |
f38ed998
|
humkyung
|
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잠시만 기다려 주신 후 다시 열람하여 주시기 바랍니다");
|
1182 |
84c48033
|
djkim
|
DialogMessage_Alert(failedmsg, "Warning");
|
1183 |
787a4489
|
KangIngu
|
}
|
1184 |
|
|
}
|
1185 |
29010418
|
ljiyeon
|
|
1186 |
787a4489
|
KangIngu
|
public void SetView(ViewInfo info)
|
1187 |
5a6493ad
|
humkyung
|
{
|
1188 |
787a4489
|
KangIngu
|
this._ViewInfo = info;
|
1189 |
5a6493ad
|
humkyung
|
try
|
1190 |
5ded1e5a
|
djkim
|
{
|
1191 |
5a6493ad
|
humkyung
|
/// 대림의 경우 EnsembleID를 가지고 DocumentItemID를 구함
|
1192 |
|
|
/// 다른 Site를 대비하여 에러 처리함
|
1193 |
|
|
string docid = BaseClient.GetDocItemID(info.EnsembleID);
|
1194 |
|
|
if (!string.IsNullOrEmpty(docid))
|
1195 |
|
|
{
|
1196 |
|
|
this._ViewInfo.DocumentItemID = docid;
|
1197 |
|
|
}
|
1198 |
5ded1e5a
|
djkim
|
}
|
1199 |
a8aec13a
|
taeseongkim
|
catch (Exception ex)
|
1200 |
5a6493ad
|
humkyung
|
{
|
1201 |
664ea2e1
|
taeseongkim
|
|
1202 |
|
|
//App.FileLogger.Fatal(ex);
|
1203 |
5a6493ad
|
humkyung
|
}
|
1204 |
|
|
|
1205 |
664ea2e1
|
taeseongkim
|
//Logger.sendReqLog("GetSystemDataAsync", "", 1);
|
1206 |
|
|
|
1207 |
29010418
|
ljiyeon
|
BaseClient.GetSystemDataAsync();
|
1208 |
787a4489
|
KangIngu
|
}
|
1209 |
|
|
|
1210 |
992a98b4
|
KangIngu
|
public void HubSet()
|
1211 |
|
|
{
|
1212 |
|
|
// 허브 연결 구성
|
1213 |
84c48033
|
djkim
|
var hubConnection = new HubConnection(CommonLib.Common.GetConfigString("HubAddress", "URL", "", App.isExternal));
|
1214 |
992a98b4
|
KangIngu
|
IHubProxy MarkusLicenseProxy = hubConnection.CreateHubProxy("MarkusLicenseHub");
|
1215 |
|
|
|
1216 |
|
|
|
1217 |
|
|
// 허브 연결
|
1218 |
|
|
hubConnection.Start().ContinueWith(task =>
|
1219 |
|
|
{
|
1220 |
|
|
if (task.IsFaulted)
|
1221 |
|
|
{
|
1222 |
|
|
Console.WriteLine("There was an error opening the connection:{0}",
|
1223 |
|
|
task.Exception.GetBaseException());
|
1224 |
53f96e00
|
송근호
|
//throw task.Exception.GetBaseException();
|
1225 |
992a98b4
|
KangIngu
|
}
|
1226 |
|
|
else
|
1227 |
|
|
{
|
1228 |
|
|
Console.WriteLine("Connected :: " + task.Id);
|
1229 |
|
|
}
|
1230 |
|
|
|
1231 |
|
|
}).Wait();
|
1232 |
|
|
|
1233 |
|
|
|
1234 |
|
|
// [ 프로그램 시작 ]
|
1235 |
|
|
// 클라이언트에서 서버를 호출 ( 접속 시 ) : 라이센스 체크
|
1236 |
|
|
//( "method name", arg1, arg2 )
|
1237 |
|
|
//MarkusLicenseProxy.Invoke<string>("ConnectionMarkus", "H2009115", "고동균").ContinueWith(task =>
|
1238 |
|
|
//{
|
1239 |
|
|
// if (task.IsFaulted)
|
1240 |
|
|
// {
|
1241 |
|
|
// Console.WriteLine("ConnectionMarkus :: There was an error calling send: {0}", task.Exception.GetBaseException());
|
1242 |
|
|
// }
|
1243 |
|
|
// else
|
1244 |
|
|
// {
|
1245 |
|
|
// Console.WriteLine(task.Result);
|
1246 |
|
|
// }
|
1247 |
|
|
//});
|
1248 |
0af41bf0
|
djkim
|
MarkusLicenseProxy.Invoke<string>("ConnectionMarkus", App.ViewInfo.UserID,App.ViewInfo.ProjectNO).ContinueWith(task =>
|
1249 |
992a98b4
|
KangIngu
|
{
|
1250 |
|
|
if (task.IsFaulted)
|
1251 |
|
|
{
|
1252 |
|
|
Console.WriteLine("ConnectionMarkus :: There was an error calling send: {0}", task.Exception.GetBaseException());
|
1253 |
53f96e00
|
송근호
|
//throw task.Exception.GetBaseException();
|
1254 |
992a98b4
|
KangIngu
|
}
|
1255 |
|
|
else
|
1256 |
|
|
{
|
1257 |
29010418
|
ljiyeon
|
switch (task.Result)
|
1258 |
992a98b4
|
KangIngu
|
{
|
1259 |
53393bae
|
KangIngu
|
case "2":
|
1260 |
|
|
{
|
1261 |
0af41bf0
|
djkim
|
var result = MessageBox.Show("권한이 없습니다.");
|
1262 |
|
|
if (result == MessageBoxResult.OK)
|
1263 |
|
|
System.Diagnostics.Process.GetCurrentProcess().Kill();
|
1264 |
53393bae
|
KangIngu
|
}
|
1265 |
|
|
break;
|
1266 |
|
|
case "404":
|
1267 |
|
|
{
|
1268 |
0af41bf0
|
djkim
|
var result = MessageBox.Show("등록된 사용자가 아닙니다.");
|
1269 |
|
|
if(result == MessageBoxResult.OK)
|
1270 |
|
|
System.Diagnostics.Process.GetCurrentProcess().Kill();
|
1271 |
53393bae
|
KangIngu
|
}
|
1272 |
|
|
break;
|
1273 |
992a98b4
|
KangIngu
|
}
|
1274 |
|
|
}
|
1275 |
53f96e00
|
송근호
|
});
|
1276 |
992a98b4
|
KangIngu
|
|
1277 |
|
|
// 서버에서 클라이언트 호출 ( 프로그램 구동여부 ) : 라이센스 체크 후 응답 ( 반환값 : true, false )
|
1278 |
|
|
//MarkusLicenseProxy.On<bool>("IsConnection", status =>
|
1279 |
|
|
//{
|
1280 |
|
|
|
1281 |
|
|
// if (status)
|
1282 |
|
|
// {
|
1283 |
|
|
// // 프로그램 시작
|
1284 |
|
|
// Console.WriteLine("connection status : " + status);
|
1285 |
|
|
// }
|
1286 |
|
|
// else
|
1287 |
|
|
// {
|
1288 |
|
|
// // 프로그램 종료 ( signalr 접속 끊기 )
|
1289 |
|
|
// hubConnection.Stop();
|
1290 |
|
|
// }
|
1291 |
|
|
//});
|
1292 |
|
|
|
1293 |
|
|
// 공지 메세지 ( 서버에서 클라이언트 호출 )
|
1294 |
|
|
MarkusLicenseProxy.On<string>("MarkusNotification", msg =>
|
1295 |
|
|
Console.WriteLine("Noficiation Message : " + msg)
|
1296 |
|
|
);
|
1297 |
|
|
|
1298 |
|
|
|
1299 |
|
|
// 서버 메서드 호출
|
1300 |
|
|
//MarkusLicenseProxy.Invoke<string>("DoSomething", "I'm doing something!!!").Wait();
|
1301 |
|
|
|
1302 |
|
|
//Console.ReadKey();
|
1303 |
|
|
|
1304 |
|
|
//hubConnection.Stop();
|
1305 |
|
|
}
|
1306 |
787a4489
|
KangIngu
|
|
1307 |
ac4f1e13
|
taeseongkim
|
public async void MarkupUserListDisplay()
|
1308 |
1f1c566e
|
djkim
|
{
|
1309 |
|
|
List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
|
1310 |
|
|
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
|
1311 |
|
|
List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업
|
1312 |
29010418
|
ljiyeon
|
//MarkupToPDF.Controls.Parsing.LayerControl layerControl = new MarkupToPDF.Controls.Parsing.LayerControl();
|
1313 |
1f1c566e
|
djkim
|
Common.ViewerDataModel.Instance.MarkupControls_USER.Clear(); //전체 제거
|
1314 |
29010418
|
ljiyeon
|
Common.ViewerDataModel.Instance.MarkupControls.Clear(); //전체 제거
|
1315 |
f714bef8
|
djkim
|
//foreach (var item in gridSelectionItem)
|
1316 |
|
|
//{
|
1317 |
|
|
// if (item.UserID == App.ViewInfo.UserID)
|
1318 |
|
|
// {
|
1319 |
d62c0439
|
humkyung
|
// ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
1320 |
f714bef8
|
djkim
|
// {
|
1321 |
|
|
// layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID);
|
1322 |
|
|
// });
|
1323 |
|
|
// }
|
1324 |
|
|
// else
|
1325 |
|
|
// {
|
1326 |
|
|
// ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
1327 |
|
|
// {
|
1328 |
|
|
// layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
|
1329 |
|
|
// });
|
1330 |
|
|
// }
|
1331 |
|
|
//}
|
1332 |
29010418
|
ljiyeon
|
(from A in gridSelectionItem
|
1333 |
|
|
from B in Common.ViewerDataModel.Instance.MarkupControls_USER
|
1334 |
|
|
where A.MarkupInfoID == B.MarkupInfoID
|
1335 |
|
|
select B).ToList().ForEach(data =>
|
1336 |
|
|
{
|
1337 |
|
|
Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(data);
|
1338 |
|
|
});
|
1339 |
1f1c566e
|
djkim
|
(from A in gridSelectionItem
|
1340 |
|
|
from B in Common.ViewerDataModel.Instance.MarkupControls
|
1341 |
|
|
where A.MarkupInfoID == B.MarkupInfoID
|
1342 |
|
|
select B).ToList().ForEach(data =>
|
1343 |
|
|
{
|
1344 |
|
|
Common.ViewerDataModel.Instance.MarkupControls.Remove(data);
|
1345 |
|
|
});
|
1346 |
|
|
|
1347 |
|
|
foreach (var item in gridSelectionItem)
|
1348 |
|
|
{
|
1349 |
ac4f1e13
|
taeseongkim
|
|
1350 |
1f1c566e
|
djkim
|
if (item.UserID == App.ViewInfo.UserID)
|
1351 |
|
|
{
|
1352 |
ac4f1e13
|
taeseongkim
|
var markupItems = ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList();
|
1353 |
|
|
|
1354 |
|
|
foreach (var markupitem in markupItems)
|
1355 |
1f1c566e
|
djkim
|
{
|
1356 |
f5f788c2
|
taeseongkim
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
|
1357 |
ac4f1e13
|
taeseongkim
|
item.MarkupInfoID, markupitem.ID);
|
1358 |
|
|
}
|
1359 |
1f1c566e
|
djkim
|
}
|
1360 |
|
|
else
|
1361 |
|
|
{
|
1362 |
ac4f1e13
|
taeseongkim
|
var markupItems = ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList();
|
1363 |
|
|
|
1364 |
|
|
foreach (var markupitem in markupItems)
|
1365 |
1f1c566e
|
djkim
|
{
|
1366 |
f5f788c2
|
taeseongkim
|
await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID);
|
1367 |
ac4f1e13
|
taeseongkim
|
}
|
1368 |
1f1c566e
|
djkim
|
}
|
1369 |
|
|
}
|
1370 |
|
|
}
|
1371 |
787a4489
|
KangIngu
|
}
|
1372 |
|
|
} |