개정판 d62c0439
issue #923: remove undo after selecting item, fixed multi selection logic
Change-Id: Id2a6e63336747aeaf3337218f5e2e3b35fba5dfa
KCOM/Services/BaseServices.cs | ||
---|---|---|
195 | 195 |
public MarkupInfoItem PreviewUserMarkupInfoItem { get; set; } |
196 | 196 |
|
197 | 197 |
/// <summary> |
198 |
/// 문서 정보를 가져온다 |
|
199 |
/// </summary> |
|
200 |
/// <param name="sender"></param> |
|
201 |
/// <param name="e"></param> |
|
202 |
private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e) |
|
203 |
{ |
|
204 |
Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1); |
|
205 |
|
|
206 |
if (e.Error != null) |
|
207 |
{ |
|
208 |
DialogMessage_Alert("페이지정보를 가져올 수 없습니다.", "Alert"); |
|
209 |
return; |
|
210 |
} |
|
211 |
|
|
212 |
var MainUrl = DeepZoomUrl.Replace("{baseUrl}", App.SystemInfo.HostName); |
|
213 |
MainUrl = MainUrl.Replace("{TileSourcePath}", _ViewInfo.ProjectNO + "_Tile"); |
|
214 |
MainUrl = MainUrl.Replace("{ItemsPath}", (Convert.ToInt64(_ViewInfo.DocumentItemID) / 100).ToString()); |
|
215 |
MainUrl = MainUrl.Replace("{SharepointItemID}", _ViewInfo.DocumentItemID); |
|
216 |
MainUrl = MainUrl.Replace(@"http://http://", @"http://"); |
|
217 |
|
|
218 |
_DocInfo = e.Result; |
|
219 |
foreach (var item in _DocInfo.DOCPAGE.OrderBy(order => order.PAGE_NUMBER)) |
|
220 |
{ |
|
221 |
ViewerDataModel.Instance.Document_Info.Add(item); |
|
222 |
} |
|
223 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID, 1); |
|
224 |
BaseClient.GetMarkupInfoItemsAsync(_ViewInfo.ProjectNO, _DocInfo.ID); |
|
225 |
CurrentDoc = new Common.DocumentSet |
|
226 |
{ |
|
227 |
docInfo = _DocInfo, |
|
228 |
Document_Id = _DocInfo.DOCUMENT_ID, |
|
229 |
Document_NO = _DocItem.DOCUMENT_NO, |
|
230 |
File_Original = _DocInfo.ORIGINAL_FILE, |
|
231 |
File_Result = _DocItem.RESULT_FILE, |
|
232 |
Group_No = _DocItem.GROUP_NO, |
|
233 |
ProjectNo = _DocItem.PROJECT_NO, |
|
234 |
Revision = _DocItem.REVISION, |
|
235 |
}; |
|
236 |
var instanceMain = this.ParentOfType<MainWindow>(); |
|
237 |
instanceMain.dzTopMenu.tlcurrentPage.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
238 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
239 |
string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem.DOCUMENT_NO, _DocItem.REVISION, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()); |
|
240 |
instanceMain.TitleText.Text = apptitle; |
|
241 |
instanceMain.Title = apptitle; |
|
242 |
this.pageNavigator.SetPageNavi(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl); |
|
243 |
|
|
244 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
|
245 |
|
|
246 |
//ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad(); |
|
247 |
|
|
248 |
Logger.sendReqLog("GetVPRevisionHistoryAsync", CurrentDoc.ProjectNo + "," + CurrentDoc.Document_NO + "," + CurrentDoc.Document_Id, 1); |
|
249 |
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id); |
|
250 |
} |
|
251 |
|
|
252 |
/// <summary> |
|
198 | 253 |
/// get markupinfo and markupitem from database |
199 | 254 |
/// </summary> |
200 | 255 |
/// <param name="sender"></param> |
... | ... | |
211 | 266 |
var pureItem = e.Result; |
212 | 267 |
if (pureItem.Count > 0) |
213 | 268 |
{ |
214 |
ViewerDataModel.Instance.MarkupList_USER.Clear();
|
|
269 |
ViewerDataModel.Instance.MyMarkupList.Clear();
|
|
215 | 270 |
} |
216 | 271 |
|
217 | 272 |
foreach(var info in e.Result) |
... | ... | |
246 | 301 |
Symbol_ID = p.Symbol_ID, |
247 | 302 |
Group_ID = p.Group_ID |
248 | 303 |
}; |
249 |
ViewerDataModel.Instance.MarkupList_USER.Add(markup);
|
|
304 |
ViewerDataModel.Instance.MyMarkupList.Add(markup);
|
|
250 | 305 |
|
251 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, d.DisplayColor, "",
|
|
306 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, d.DisplayColor, "",
|
|
252 | 307 |
d.MarkupInfoID, markup.ID); |
253 | 308 |
control.Visibility = Visibility.Hidden; |
254 | 309 |
} |
... | ... | |
267 | 322 |
}; |
268 | 323 |
ViewerDataModel.Instance.MarkupList_Pre.Add(markup); |
269 | 324 |
|
270 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, d.DisplayColor, "",
|
|
325 |
var control = MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, d.DisplayColor, "",
|
|
271 | 326 |
d.MarkupInfoID, markup.ID); |
272 | 327 |
control.Visibility = Visibility.Hidden; |
273 | 328 |
} |
... | ... | |
407 | 462 |
} |
408 | 463 |
else //파라미터로 넘어온 사용자가 걸리지 않은 경우 |
409 | 464 |
{ |
410 |
EmptyControlCheck(); |
|
411 | 465 |
List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업 |
412 | 466 |
List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업 |
413 | 467 |
List<MarkupInfoItem> gridNonSelectionItem = gridItem.Except(gridSelectionItem).ToList(); //선택 되지 않은 마크업 |
... | ... | |
421 | 475 |
var controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList(); |
422 | 476 |
if (controls.Count == 0) |
423 | 477 |
{ |
424 |
var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
|
478 |
var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
|
|
425 | 479 |
foreach (var markup in instance) |
426 | 480 |
{ |
427 | 481 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", |
... | ... | |
432 | 486 |
controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList(); |
433 | 487 |
foreach (var control in controls) |
434 | 488 |
{ |
489 |
Logger.sendCheckLog(String.Format("=={0}", control), 1); |
|
435 | 490 |
control.Visibility = Visibility.Visible; |
436 | 491 |
} |
437 | 492 |
} |
... | ... | |
474 | 529 |
var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault(); |
475 | 530 |
if (myComment != null) |
476 | 531 |
{ |
477 |
ChangeCommentReact(); |
|
478 |
|
|
479 | 532 |
Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem) |
480 | 533 |
{ |
481 | 534 |
markupitem.Visibility = Visibility.Hidden; |
482 | 535 |
}); |
483 |
|
|
484 |
|
|
485 | 536 |
} |
486 | 537 |
} |
487 | 538 |
#endregion |
... | ... | |
596 | 647 |
} |
597 | 648 |
} |
598 | 649 |
|
599 |
/// <summary> |
|
600 |
/// 문서 정보를 가져온다 |
|
601 |
/// </summary> |
|
602 |
/// <param name="sender"></param> |
|
603 |
/// <param name="e"></param> |
|
604 |
private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e) |
|
605 |
{ |
|
606 |
Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1); |
|
607 |
|
|
608 |
if (e.Error != null) |
|
609 |
{ |
|
610 |
DialogMessage_Alert("페이지정보를 가져올 수 없습니다.", "Alert"); |
|
611 |
return; |
|
612 |
} |
|
613 |
|
|
614 |
var MainUrl = DeepZoomUrl.Replace("{baseUrl}", App.SystemInfo.HostName); |
|
615 |
MainUrl = MainUrl.Replace("{TileSourcePath}", _ViewInfo.ProjectNO + "_Tile"); |
|
616 |
MainUrl = MainUrl.Replace("{ItemsPath}", (Convert.ToInt64(_ViewInfo.DocumentItemID) / 100).ToString()); |
|
617 |
MainUrl = MainUrl.Replace("{SharepointItemID}", _ViewInfo.DocumentItemID); |
|
618 |
MainUrl = MainUrl.Replace(@"http://http://", @"http://"); |
|
619 |
|
|
620 |
_DocInfo = e.Result; |
|
621 |
foreach (var item in _DocInfo.DOCPAGE.OrderBy(order => order.PAGE_NUMBER)) |
|
622 |
{ |
|
623 |
ViewerDataModel.Instance.Document_Info.Add(item); |
|
624 |
} |
|
625 |
Logger.sendReqLog("GetMarkupInfoItemsAsync", _ViewInfo.ProjectNO + "," + _DocInfo.ID, 1); |
|
626 |
BaseClient.GetMarkupInfoItemsAsync(_ViewInfo.ProjectNO, _DocInfo.ID); |
|
627 |
CurrentDoc = new Common.DocumentSet |
|
628 |
{ |
|
629 |
docInfo = _DocInfo, |
|
630 |
Document_Id = _DocInfo.DOCUMENT_ID, |
|
631 |
Document_NO = _DocItem.DOCUMENT_NO, |
|
632 |
File_Original = _DocInfo.ORIGINAL_FILE, |
|
633 |
File_Result = _DocItem.RESULT_FILE, |
|
634 |
Group_No = _DocItem.GROUP_NO, |
|
635 |
ProjectNo = _DocItem.PROJECT_NO, |
|
636 |
Revision = _DocItem.REVISION, |
|
637 |
}; |
|
638 |
var instanceMain = this.ParentOfType<MainWindow>(); |
|
639 |
instanceMain.dzTopMenu.tlcurrentPage.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
640 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = _DocInfo.PAGE_COUNT.ToString(); |
|
641 |
string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem.DOCUMENT_NO, _DocItem.REVISION, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()); |
|
642 |
instanceMain.TitleText.Text = apptitle; |
|
643 |
instanceMain.Title = apptitle; |
|
644 |
this.pageNavigator.SetPageNavi(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl); |
|
645 |
|
|
646 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
|
647 |
|
|
648 |
//ViewerDataModel.Instance.SystemMain.dzMainMenu.TempLoad(); |
|
649 |
|
|
650 |
Logger.sendReqLog("GetVPRevisionHistoryAsync", CurrentDoc.ProjectNo + "," + CurrentDoc.Document_NO + "," + CurrentDoc.Document_Id, 1); |
|
651 |
BaseClient.GetVPRevisionHistoryAsync(CurrentDoc.ProjectNo, CurrentDoc.Document_NO, CurrentDoc.Document_Id); |
|
652 |
} |
|
650 |
|
|
653 | 651 |
|
654 | 652 |
|
655 | 653 |
public void SetView(ViewInfo info) |
... | ... | |
769 | 767 |
//{ |
770 | 768 |
// if (item.UserID == App.ViewInfo.UserID) |
771 | 769 |
// { |
772 |
// ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
770 |
// ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
773 | 771 |
// { |
774 | 772 |
// layerControl.markupParseEx(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markupitem.ID); |
775 | 773 |
// }); |
... | ... | |
801 | 799 |
{ |
802 | 800 |
if (item.UserID == App.ViewInfo.UserID) |
803 | 801 |
{ |
804 |
ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
802 |
ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
|
|
805 | 803 |
{ |
806 | 804 |
MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", |
807 | 805 |
item.MarkupInfoID, markupitem.ID); |
내보내기 Unified diff