개정판 6707a5c7
issue #680 temp file save add
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
9 | 9 |
using System.Windows.Controls; |
10 | 10 |
using System.Windows.Input; |
11 | 11 |
using Telerik.Windows.Controls; |
12 |
using static KCOM.Views.MainMenu; |
|
12 | 13 |
|
13 | 14 |
namespace KCOM |
14 | 15 |
{ |
... | ... | |
25 | 26 |
//강인구 추가 |
26 | 27 |
MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn(); |
27 | 28 |
|
29 |
//임시파일관련 |
|
30 |
TempFile temp = new TempFile(); |
|
31 |
|
|
28 | 32 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
29 | 33 |
{ |
30 | 34 |
|
... | ... | |
205 | 209 |
if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData)) |
206 | 210 |
{ |
207 | 211 |
markupReturn = layer.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID); |
208 |
MarkupData += "|OR|" + markupReturn.ConvertData; |
|
212 |
MarkupData += "|OR|" + markupReturn.ConvertData;
|
|
209 | 213 |
} |
210 | 214 |
} |
211 | 215 |
Clipboard.SetText(MarkupData); |
... | ... | |
214 | 218 |
this.dzMainMenu.SelectLayer.Children.Clear(); |
215 | 219 |
} |
216 | 220 |
} |
221 |
|
|
217 | 222 |
} |
218 | 223 |
break; |
219 | 224 |
#endregion |
... | ... | |
287 | 292 |
//붙여 넣을때 원본 컨트롤과 겹치지 않도록 설정 |
288 | 293 |
//Canvas.SetLeft(final, 50); |
289 | 294 |
//Canvas.SetTop(final, 50); |
295 |
|
|
290 | 296 |
} |
291 | 297 |
//외부 이미지 붙여넣기 |
292 | 298 |
else if (Clipboard.GetImage() != null) |
... | ... | |
302 | 308 |
Markup_List = new List<Multi_Undo_data>() |
303 | 309 |
}; |
304 | 310 |
|
305 |
|
|
306 | 311 |
string temppath = System.IO.Path.GetTempPath(); |
307 | 312 |
//string filename = KCOM.Events.Save.shortCommentKey(); |
308 | 313 |
string filename = KCOM.Events.Save.shortFileKey(); |
... | ... | |
341 | 346 |
IntPtr hBitmap = bmp.GetHbitmap(); |
342 | 347 |
System.Windows.Media.ImageSource WpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions()); |
343 | 348 |
Image img = new Image(); |
344 |
img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(filename)); |
|
345 |
|
|
349 |
img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(filename)); |
|
346 | 350 |
|
347 |
|
|
348 |
|
|
349 |
|
|
350 | 351 |
var currentControl = new MarkupToPDF.Controls.Etc.ImgControl |
351 | 352 |
{ |
352 | 353 |
PointSet = new List<Point>(), |
... | ... | |
387 | 388 |
double realPointX = this.dzMainMenu.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2); |
388 | 389 |
double realPointY = this.dzMainMenu.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2); |
389 | 390 |
final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(realPointX, realPointY)); |
390 |
|
|
391 |
|
|
391 |
|
|
392 | 392 |
#region 주석 |
393 | 393 |
|
394 | 394 |
//주석 |
... | ... | |
443 | 443 |
//this.dzMainMenu.SelectLayer.Children.Add(final); |
444 | 444 |
#endregion |
445 | 445 |
|
446 |
|
|
447 | 446 |
} |
448 | 447 |
} |
448 |
|
|
449 | 449 |
} |
450 | 450 |
break; |
451 | 451 |
#endregion |
... | ... | |
462 | 462 |
//this.dzTopMenu.SaveEvent(null, null); |
463 | 463 |
|
464 | 464 |
this.dzTopMenu.SaveEvent(new object(), null); |
465 |
} |
|
465 |
|
|
466 |
//저장완료후 임시파일 삭제 |
|
467 |
temp.Remove(); |
|
468 |
} |
|
466 | 469 |
} |
467 | 470 |
break; |
468 | 471 |
#endregion |
... | ... | |
484 | 487 |
if (ViewerDataModel.Instance.IsPressCtrl) |
485 | 488 |
{ |
486 | 489 |
this.dzMainMenu.Undo(); |
487 |
} |
|
490 |
}
|
|
488 | 491 |
} |
489 | 492 |
break; |
490 | 493 |
#endregion |
... | ... | |
541 | 544 |
|
542 | 545 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_); |
543 | 546 |
|
544 |
//adornerSet.Add((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo)); |
|
547 |
//임시파일에서도 삭제한다. |
|
548 |
temp.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
|
549 |
|
|
550 |
//adornerSet.Add((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo)); |
|
551 |
|
|
545 | 552 |
} |
546 | 553 |
} |
547 | 554 |
} |
548 | 555 |
|
549 | 556 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
550 | 557 |
{ |
551 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
558 |
ViewerDataModel.Instance.UndoDataList.Remove(i);
|
|
552 | 559 |
}); |
553 | 560 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
561 |
|
|
562 |
|
|
554 | 563 |
} |
555 | 564 |
} |
556 | 565 |
|
557 |
this.dzMainMenu.SelectLayer.Children.Clear(); |
|
566 |
this.dzMainMenu.SelectLayer.Children.Clear();
|
|
558 | 567 |
} |
559 | 568 |
break; |
560 | 569 |
#endregion |
내보내기 Unified diff