개정판 77cdac33
벽산 수정 후 백업
Change-Id: I8e3eb48f615478a49efa0ab4014a8ef17d273d0a
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
315 | 315 |
filename = System.IO.Path.GetFileName(this._DocInfo.ORIGINAL_FILE); |
316 | 316 |
} |
317 | 317 |
|
318 |
string sFolder = sDocumentID.All(char.IsDigit) ? (Convert.ToUInt32(sDocumentID) / 100).ToString() : (sDocumentID.Length >= 5 ? sDocumentID.Substring(0, 5) : sDocumentID); |
|
319 |
if (userData.COMPANY != "EXT") |
|
318 |
var directUri = CommonLib.Common.GetConfigString("DocumentDownloadPath", "url", ""); |
|
319 |
|
|
320 |
if (!string.IsNullOrWhiteSpace(directUri)) |
|
320 | 321 |
{ |
321 |
uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, sFolder, sDocumentID, filename);
|
|
322 |
uri = string.Format(directUri, filename);
|
|
322 | 323 |
} |
323 | 324 |
else |
324 | 325 |
{ |
325 |
uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, sDocumentID, filename); |
|
326 |
string sFolder = sDocumentID.All(char.IsDigit) ? (Convert.ToUInt32(sDocumentID) / 100).ToString() : (sDocumentID.Length >= 5 ? sDocumentID.Substring(0, 5) : sDocumentID); |
|
327 |
if (userData.COMPANY != "EXT") |
|
328 |
{ |
|
329 |
uri = String.Format(CommonLib.Common.GetConfigString("mainServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, sFolder, sDocumentID, filename); |
|
330 |
} |
|
331 |
else |
|
332 |
{ |
|
333 |
uri = String.Format(CommonLib.Common.GetConfigString("subServerImageWebPath", "URL", "", App.isExternal), _ViewInfo.ProjectNO, sDocumentID, filename); |
|
334 |
} |
|
335 |
uri = uri.Replace(".png", ""); |
|
326 | 336 |
} |
327 |
uri = uri.Replace(".png", ""); |
|
337 |
|
|
328 | 338 |
return uri; |
329 | 339 |
} |
330 | 340 |
|
... | ... | |
510 | 520 |
{ |
511 | 521 |
#region 임시파일 다운로드 |
512 | 522 |
instnaceFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "MARKUS", System.IO.Path.GetRandomFileName().Split('.')[0] + ".pdf"); |
513 |
downloadurl = GetOriginalPDFURL(); |
|
523 |
|
|
524 |
var directUri = CommonLib.Common.GetConfigString("DocumentDownloadPath", "url", ""); |
|
525 |
bool isRestDownload = false; |
|
526 |
|
|
527 |
if (!string.IsNullOrWhiteSpace(directUri)) |
|
528 |
{ |
|
529 |
isRestDownload = true; |
|
530 |
filename = System.IO.Path.GetFileName(this._DocInfo.ORIGINAL_FILE); |
|
531 |
|
|
532 |
downloadurl = string.Format(directUri, filename); |
|
533 |
} |
|
534 |
else |
|
535 |
{ |
|
536 |
downloadurl = GetOriginalPDFURL(); |
|
537 |
} |
|
514 | 538 |
|
515 | 539 |
ViewerDataModel.Instance.OriginalTempFile = instnaceFile; |
516 | 540 |
|
... | ... | |
519 | 543 |
wcfServer.IpcFileDownloadReceived += WcfServer_IpcFileDownloadReceived; |
520 | 544 |
wcfServer.Start(); |
521 | 545 |
|
522 |
DownloadProcess.FileDownloader(endpoint, ViewerDataModel.Instance.IsAdmin, downloadurl, instnaceFile); |
|
546 |
DownloadProcess.FileDownloader(endpoint, ViewerDataModel.Instance.IsAdmin, downloadurl, instnaceFile, isRestDownload);
|
|
523 | 547 |
#endregion |
524 | 548 |
} |
525 | 549 |
|
... | ... | |
1099 | 1123 |
control.Visibility = Visibility.Hidden; |
1100 | 1124 |
} |
1101 | 1125 |
} |
1102 |
|
|
1103 | 1126 |
}; |
1104 | 1127 |
/// up to here |
1105 | 1128 |
|
... | ... | |
4555 | 4578 |
inkBoard.Strokes.Add(stroke); |
4556 | 4579 |
} |
4557 | 4580 |
|
4558 |
private void btnConsolidate_Click(object sender, RoutedEventArgs e) |
|
4581 |
private async void btnConsolidate_Click(object sender, RoutedEventArgs e)
|
|
4559 | 4582 |
{ |
4560 | 4583 |
//SelectionSet.Instance.UnSelect(this.ParentOfType<MainWindow>().dzMainMenu); |
4561 | 4584 |
//// update mylist and gridview |
... | ... | |
4567 | 4590 |
//{ |
4568 | 4591 |
btnFinalPDF.IsEnabled = false; |
4569 | 4592 |
|
4570 |
ConsolidationMethod(); |
|
4593 |
await ConsolidationMethod();
|
|
4571 | 4594 |
//} |
4572 | 4595 |
//else |
4573 | 4596 |
//{ |
... | ... | |
4578 | 4601 |
/// <summary> |
4579 | 4602 |
/// execute TeamConsolidationCommand |
4580 | 4603 |
/// </summary> |
4581 |
public void TeamConsolidationMethod() |
|
4604 |
public void TeamConsolidationMethod2()
|
|
4582 | 4605 |
{ |
4583 |
this.UpdateMyMarkupList(); |
|
4584 | 4606 |
if (this.gridViewMarkup.SelectedItems.Count == 0) |
4585 | 4607 |
{ |
4586 | 4608 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Please select at least one user", "Alert"); |
4587 | 4609 |
} |
4588 | 4610 |
else |
4589 | 4611 |
{ |
4590 |
ViewerDataModel.Instance.IsConsolidate = true; |
|
4591 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); |
|
4592 | 4612 |
|
4613 |
ViewerDataModel.Instance.IsConsolidate = true; |
|
4614 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
|
4615 |
// update mylist and gridview |
|
4616 |
|
|
4617 |
Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.ExecuteSaveCommand(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
|
4618 |
//this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); |
|
4619 |
ViewerDataModel.Instance.IsConsolidate = false; |
|
4620 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.UpdateMyMarkupList(); |
|
4593 | 4621 |
foreach (MarkupInfoItem item in this.gridViewMarkup.SelectedItems) |
4594 | 4622 |
{ |
4595 | 4623 |
if (!this.userData.DEPARTMENT.Equals(item.Depatment)) |
... | ... | |
4603 | 4631 |
{ |
4604 | 4632 |
MarkupInfoList.Add(item); |
4605 | 4633 |
} |
4634 |
|
|
4606 | 4635 |
TeamConsolidateCommand.Instance.Execute(MarkupInfoList); |
4607 | 4636 |
} |
4608 | 4637 |
} |
4609 |
|
|
4610 |
public bool ConsolidationMethod() |
|
4638 |
public async void TeamConsolidationMethod() |
|
4611 | 4639 |
{ |
4612 | 4640 |
bool result = false; |
4613 | 4641 |
|
... | ... | |
4617 | 4645 |
} |
4618 | 4646 |
else |
4619 | 4647 |
{ |
4620 |
List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>(); |
|
4621 |
foreach (var item in this.gridViewMarkup.SelectedItems) |
|
4648 |
foreach (MarkupInfoItem item in this.gridViewMarkup.SelectedItems) |
|
4649 |
{ |
|
4650 |
if (!this.userData.DEPARTMENT.Equals(item.Depatment)) |
|
4651 |
{ |
|
4652 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Please select at your department", "Alert"); |
|
4653 |
} |
|
4654 |
} |
|
4655 |
|
|
4656 |
var isSave = await this.ParentOfType<MainWindow>().dzTopMenu.SaveEventAsync(); |
|
4657 |
|
|
4658 |
if (isSave) |
|
4622 | 4659 |
{ |
4623 |
MySelectItem.Add(item as IKCOM.MarkupInfoItem); |
|
4660 |
var token = ViewerDataModel.Instance.NewCancellationToken(); |
|
4661 |
|
|
4662 |
await MarkupLoadAsync(pageNavigator.CurrentPage.PageNumber, ViewerDataModel.Instance.PageAngle, token); |
|
4663 |
|
|
4664 |
List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>(); |
|
4665 |
foreach (var item in this.gridViewMarkup.SelectedItems) |
|
4666 |
{ |
|
4667 |
MySelectItem.Add(item as IKCOM.MarkupInfoItem); |
|
4668 |
} |
|
4669 |
|
|
4670 |
TeamConsolidateCommand.Instance.Execute(MySelectItem); |
|
4671 |
result = true; |
|
4624 | 4672 |
} |
4625 |
int iPageNo = Convert.ToInt32(this.ParentOfType<MainWindow>().dzTopMenu.tlcurrentPage.Text); |
|
4673 |
} |
|
4674 |
} |
|
4675 |
|
|
4676 |
public async Task<bool> ConsolidationMethod() |
|
4677 |
{ |
|
4678 |
bool result = false; |
|
4626 | 4679 |
|
4627 |
result = ConsolidateCommand.Instance.Execute(MySelectItem, iPageNo); |
|
4680 |
if (this.gridViewMarkup.SelectedItems.Count == 0) |
|
4681 |
{ |
|
4682 |
this.ParentOfType<MainWindow>().DialogMessage_Alert("Please select at least one user", "Alert"); |
|
4683 |
} |
|
4684 |
else |
|
4685 |
{ |
|
4686 |
var isSave = await this.ParentOfType<MainWindow>().dzTopMenu.SaveEventAsync(); |
|
4687 |
|
|
4688 |
if (isSave) |
|
4689 |
{ |
|
4690 |
var token = ViewerDataModel.Instance.NewCancellationToken(); |
|
4691 |
await MarkupLoadAsync(pageNavigator.CurrentPage.PageNumber, ViewerDataModel.Instance.PageAngle, token); |
|
4692 |
|
|
4693 |
List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>(); |
|
4694 |
foreach (var item in this.gridViewMarkup.SelectedItems) |
|
4695 |
{ |
|
4696 |
MySelectItem.Add(item as IKCOM.MarkupInfoItem); |
|
4697 |
} |
|
4698 |
int iPageNo = Convert.ToInt32(this.ParentOfType<MainWindow>().dzTopMenu.tlcurrentPage.Text); |
|
4699 |
|
|
4700 |
result = ConsolidateCommand.Instance.Execute(MySelectItem, iPageNo); |
|
4701 |
} |
|
4628 | 4702 |
} |
4629 | 4703 |
|
4630 | 4704 |
return result; |
... | ... | |
4753 | 4827 |
|
4754 | 4828 |
Mouse.SetCursor(Cursors.Wait); |
4755 | 4829 |
|
4756 |
bool result = ConsolidationMethod(); |
|
4830 |
bool result = await ConsolidationMethod();
|
|
4757 | 4831 |
|
4758 |
System.Threading.Thread.Sleep(600);
|
|
4832 |
System.Threading.Thread.Sleep(500);
|
|
4759 | 4833 |
|
4760 | 4834 |
if (result) |
4761 | 4835 |
{ |
내보내기 Unified diff