개정판 0b75c341
PEMSS의 정합성 코멘트는 제외하고 Export 되도록 수정
Change-Id: I289cc872cf12b9d43fb415d0381271acca61f00a
KCOM/ViewModel/RequirementViewModel.cs | ||
---|---|---|
74 | 74 |
} |
75 | 75 |
} |
76 | 76 |
} |
77 |
|
|
77 |
|
|
78 |
#region UI에 대한 이벤트 |
|
78 | 79 |
|
79 | 80 |
public AsyncCommand RefreshCommand => new AsyncCommand(()=> OnGetRequirementDataAsync()); |
80 | 81 |
|
... | ... | |
84 | 85 |
|
85 | 86 |
public RelayCommand SelectedVPCommentCommand => new RelayCommand(x => OnSelectedVPCommentCommand(x)); |
86 | 87 |
|
88 |
#endregion |
|
87 | 89 |
|
88 | 90 |
#region 초기화 및 종료 이벤트 |
89 | 91 |
|
... | ... | |
98 | 100 |
|
99 | 101 |
OnGetRequirementDataAsync().ConfigureAwait(false); |
100 | 102 |
} |
101 |
catch (Exception EX)
|
|
103 |
catch (Exception ex)
|
|
102 | 104 |
{ |
103 | 105 |
|
104 | 106 |
throw; |
... | ... | |
118 | 120 |
#endregion |
119 | 121 |
|
120 | 122 |
#region Command |
121 |
private async Task OnGetRequirementDataAsync() |
|
123 |
private async Task OnGetRequirementDataAsync(bool IsInit = true)
|
|
122 | 124 |
{ |
123 | 125 |
var result = await pemssServiceClient.GetrequirementListAsync(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID); |
124 | 126 |
|
125 |
requirementList.Clear(); |
|
126 |
result.ForEach(x => |
|
127 |
if (IsInit) |
|
128 |
{ |
|
129 |
requirementList.Clear(); |
|
130 |
} |
|
131 |
|
|
132 |
result.ForEach(newItem => |
|
127 | 133 |
{ |
128 |
x.IsExpanded = true; |
|
129 |
x.IsExpandable = false; |
|
130 |
RequirementList.Add(x); |
|
134 |
newItem.IsExpanded = true; |
|
135 |
newItem.IsExpandable = false; |
|
136 |
|
|
137 |
if (IsInit) |
|
138 |
{ |
|
139 |
RequirementList.Add(newItem); |
|
140 |
} |
|
141 |
else |
|
142 |
{ |
|
143 |
RequirementList.UpdateWhere(changeitem => CollectionExtensions.ChangeValues(changeitem, newItem), x => x.mdId == newItem.mdId); |
|
144 |
} |
|
131 | 145 |
}); |
132 | 146 |
} |
133 | 147 |
|
... | ... | |
258 | 272 |
rect = Rect.Union(rect,instance.ItemRect); |
259 | 273 |
|
260 | 274 |
} |
261 |
|
|
275 |
|
|
262 | 276 |
SelectionSet.Instance.SelectItemByRect(rect, main); |
263 |
//rect.Scale(4, 4); |
|
277 |
|
|
278 |
|
|
279 |
//var matrix = new System.Windows.Media.Matrix(); |
|
280 |
////var CenterPoint = VectorExtentions.Rotate(new Point(centerX, centerY), Common.ViewerDataModel.Instance.Angle, |
|
281 |
//// new Point(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2)); |
|
282 |
|
|
283 |
////matrix.RotateAt(Common.ViewerDataModel.Instance.Angle, Common.ViewerDataModel.Instance.ImageViewWidth/2, Common.ViewerDataModel.Instance.ImageViewHeight/2); |
|
284 |
|
|
285 |
//matrix.Rotate(Common.ViewerDataModel.Instance.Angle); |
|
286 |
////if (Math.Abs(Common.ViewerDataModel.Instance.Angle) == 90) |
|
287 |
////{ |
|
288 |
//// matrix.Translate(Common.ViewerDataModel.Instance.ImageViewHeight, Common.ViewerDataModel.Instance.ImageViewWidth); |
|
289 |
////} |
|
290 |
|
|
291 |
//rect.Transform(matrix); |
|
264 | 292 |
|
265 | 293 |
main.zoomAndPanControl.ZoomTo(rect); |
266 |
// main.zoomAndPanControl.ZoomAboutPoint(main.zoomAndPanControl.ContentScale - 0.2, contentZoomCenter); |
|
294 |
|
|
295 |
double centerX = rect.Left + rect.Width / 2; |
|
296 |
double centerY = rect.Top + rect.Height / 2; |
|
297 |
|
|
298 |
main.zoomAndPanControl.ZoomAboutPoint(main.zoomAndPanControl.ContentScale/3, new Point(centerX, centerY)); |
|
267 | 299 |
} |
268 | 300 |
catch (Exception ex) |
269 | 301 |
{ |
... | ... | |
272 | 304 |
} |
273 | 305 |
} |
274 | 306 |
|
275 |
private void OnVpCommentSelectCommand(object x) |
|
276 |
{ |
|
277 |
throw new NotImplementedException(); |
|
278 |
} |
|
279 |
|
|
280 |
|
|
281 | 307 |
private VpCommant selectedComment; |
282 | 308 |
|
283 | 309 |
private async void OnDelVPCommentWindowClosed(object sender, WindowClosedEventArgs e) |
... | ... | |
303 | 329 |
//MessageBox.Show("삭제 오류"); |
304 | 330 |
} |
305 | 331 |
|
306 |
await OnGetRequirementDataAsync(); |
|
332 |
await OnGetRequirementDataAsync(false);
|
|
307 | 333 |
} |
308 | 334 |
} |
309 | 335 |
|
... | ... | |
337 | 363 |
|
338 | 364 |
var result = await pemssServiceClient.SetRequirementCommentAsync(projectNo,docId,mdId,markupId,commentOnMarkup,condition,userId); |
339 | 365 |
|
340 |
await OnGetRequirementDataAsync(); |
|
366 |
await OnGetRequirementDataAsync(false);
|
|
341 | 367 |
} |
342 | 368 |
} |
343 | 369 |
|
내보내기 Unified diff