개정판 a20d338f
issue #000: TempFile 폴더 변경, UriCheck Delete
Change-Id: I9c76ad959c9232ccd54a16d28d162acc5afb3b6a
KCOM/Common/TempFile.cs | ||
---|---|---|
36 | 36 |
|
37 | 37 |
MarkupToPDF.Controls.Parsing.LayerControl layerControl = new MarkupToPDF.Controls.Parsing.LayerControl(); |
38 | 38 |
|
39 |
public static string PathString = AppDomain.CurrentDomain.BaseDirectory + "Temp"; |
|
40 |
public static string FilePath = PathString + "\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
|
39 |
//public static string PathString = AppDomain.CurrentDomain.BaseDirectory + "Temp"; |
|
40 |
public static string PathString = Path.GetTempPath() + "\\MARKUS"; |
|
41 |
public static string FilePath = PathString + "\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
|
41 | 42 |
|
42 |
internal void WriteTemp(List<MainMenu.TempDt> tempDtList) |
|
43 |
internal static void WriteTemp(List<MainMenu.TempDt> tempDtList)
|
|
43 | 44 |
{ |
44 | 45 |
if (tempDtList.Count > 0) |
45 | 46 |
{ |
... | ... | |
213 | 214 |
xmlDoc = null; |
214 | 215 |
} |
215 | 216 |
|
216 |
public void Remove() |
|
217 |
public static void Remove()
|
|
217 | 218 |
{ |
218 | 219 |
FileInfo fileDel = new FileInfo(FilePath); |
219 | 220 |
if (fileDel.Exists) |
... | ... | |
222 | 223 |
} |
223 | 224 |
} |
224 | 225 |
|
225 |
internal void DelTemp(string CommentID, string PageNumber) //Control 삭제시 |
|
226 |
internal static void DelTemp(string CommentID, string PageNumber) //Control 삭제시
|
|
226 | 227 |
{ |
227 | 228 |
if ((System.IO.File.Exists(FilePath)) == false) |
228 | 229 |
{ |
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
31 | 31 |
//강인구 추가 |
32 | 32 |
MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn(); |
33 | 33 |
|
34 |
//임시파일관련 |
|
35 |
TempFile temp = new TempFile(); |
|
36 | 34 |
|
37 | 35 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
38 | 36 |
{ |
... | ... | |
524 | 522 |
} |
525 | 523 |
|
526 | 524 |
//저장완료후 임시파일 삭제 |
527 |
temp.Remove();
|
|
525 |
TempFile.Remove();
|
|
528 | 526 |
} |
529 | 527 |
} |
530 | 528 |
break; |
... | ... | |
605 | 603 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
606 | 604 |
|
607 | 605 |
//임시파일에서도 삭제한다. |
608 |
temp.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
606 |
TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
609 | 607 |
|
610 | 608 |
//adornerSet.Add((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo)); |
611 | 609 |
|
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
35 | 35 |
MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn(); |
36 | 36 |
MarkupToPDF.Controls.Parsing.LayerControl layer = new MarkupToPDF.Controls.Parsing.LayerControl(); |
37 | 37 |
|
38 |
//임시파일 |
|
39 |
TempFile temp = new TempFile(); |
|
40 | 38 |
/// <summary> |
41 | 39 |
/// TaskBar에 메시지를 입력합니다 |
42 | 40 |
/// </summary> |
... | ... | |
3024 | 3022 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
3025 | 3023 |
|
3026 | 3024 |
//임시파일에서도 삭제한다. |
3027 |
temp.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
3025 |
TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
3028 | 3026 |
|
3029 | 3027 |
} |
3030 | 3028 |
} |
KCOM/Events/Save.cs | ||
---|---|---|
90 | 90 |
|
91 | 91 |
} |
92 | 92 |
|
93 |
//임시파일관련 |
|
94 |
TempFile temp = new TempFile(); |
|
93 |
|
|
95 | 94 |
//마크업 저장하기 |
96 | 95 |
public void MarkupSave(MarkupInfoItem UserState) |
97 | 96 |
{ |
... | ... | |
117 | 116 |
Logger.sendReqLog("GetMarkupDataListperPage: ", UserState + "," + Project_No + "," + document_id + "," + user_id + "," + ml_markupdata, 1); |
118 | 117 |
Logger.sendResLog("GetMarkupDataListperPage", Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveMarkupData(UserState, Project_No, document_id, user_id, ml_markupdata).ToString(), 1); |
119 | 118 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.SaveMarkupData(UserState, Project_No, document_id, user_id, ml_markupdata); |
120 |
temp.Remove(); //임시파일삭제
|
|
119 |
TempFile.Remove(); //임시파일삭제
|
|
121 | 120 |
} |
122 | 121 |
catch (Exception) |
123 | 122 |
{ |
KCOM/KCOM.csproj | ||
---|---|---|
324 | 324 |
<DependentUpon>ConversationView.xaml</DependentUpon> |
325 | 325 |
</Compile> |
326 | 326 |
<Compile Include="Messenger\MessageBase.cs" /> |
327 |
<Compile Include="UriCheck.cs" /> |
|
328 | 327 |
<Compile Include="Web References\Get_FinalImage\Reference.cs"> |
329 | 328 |
<AutoGen>True</AutoGen> |
330 | 329 |
<DesignTime>True</DesignTime> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
320 | 320 |
ComingNewBieEnd = false; |
321 | 321 |
ViewerDataModel.Instance.MarkupList_USER.Remove(a); |
322 | 322 |
//임시파일에서도 삭제 |
323 |
temp.DelTemp(a.ID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
323 |
TempFile.DelTemp(a.ID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
324 | 324 |
}); |
325 | 325 |
|
326 | 326 |
gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList; |
... | ... | |
489 | 489 |
} |
490 | 490 |
} |
491 | 491 |
|
492 |
temp.WriteTemp(tempDtList);
|
|
492 |
TempFile.WriteTemp(tempDtList);
|
|
493 | 493 |
tempDtList.Clear(); |
494 | 494 |
} |
495 | 495 |
} |
... | ... | |
509 | 509 |
} |
510 | 510 |
|
511 | 511 |
List<TempLoadData> tempLoadData = new List<TempLoadData>(); |
512 |
public string FilePath = AppDomain.CurrentDomain.BaseDirectory + "Temp\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
|
512 |
//public string FilePath = AppDomain.CurrentDomain.BaseDirectory + "Temp\\" + ; |
|
513 |
public static string PathString = System.IO.Path.GetTempPath() + "\\MARKUS\\" + App.ViewInfo.DocumentItemID + ".tmp"; |
|
513 | 514 |
|
514 | 515 |
public void TempLoad() |
515 | 516 |
{ |
... | ... | |
558 | 559 |
} |
559 | 560 |
else //파일 삭제 |
560 | 561 |
{ |
561 |
temp.Remove();
|
|
562 |
TempFile.Remove();
|
|
562 | 563 |
} |
563 | 564 |
} |
564 | 565 |
} |
... | ... | |
5465 | 5466 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
5466 | 5467 |
|
5467 | 5468 |
//임시파일에서도 삭제한다. |
5468 |
temp.DelTemp((control as MarkupToPDF.Common.CommentUserInfo).CommentID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
5469 |
TempFile.DelTemp((control as MarkupToPDF.Common.CommentUserInfo).CommentID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
|
|
5469 | 5470 |
|
5470 | 5471 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
5471 | 5472 |
{ |
내보내기 Unified diff