개정판 902faaea
nuget 정리
Change-Id: I8fee2c9138a11bd4b441c0e29dd75d67ea2f63d9
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
13 | 13 |
using System.Collections.Generic; |
14 | 14 |
using System.Diagnostics; |
15 | 15 |
using System.Linq; |
16 |
using System.Reactive.Linq; |
|
17 | 16 |
using System.Text; |
18 | 17 |
using System.Threading.Tasks; |
19 | 18 |
using System.Windows; |
... | ... | |
346 | 345 |
SetAdornerMember(objectData as CommentUserInfo); |
347 | 346 |
this.Focus(); |
348 | 347 |
} |
348 |
|
|
349 |
private void TextControlLostFocus(object sender,RoutedEventArgs e) |
|
350 |
{ |
|
351 |
TextCompensation = false; |
|
352 |
BorderUpdate(); |
|
353 |
|
|
354 |
if (sender is TextBox) |
|
355 |
{ |
|
356 |
if ((sender as TextBox).Text == "") //보류 |
|
357 |
{ |
|
358 |
this.ContainerContent.Children.Remove((sender as TextBox).Parent as MarkupToPDF.Common.CommentUserInfo); |
|
359 |
this.Visibility = Visibility.Collapsed; |
|
360 |
} |
|
361 |
} |
|
362 |
} |
|
363 |
|
|
364 |
private void TextControlPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
|
365 |
{ |
|
366 |
if (sender is TextBox) |
|
367 |
{ |
|
368 |
TextCompensation = true; |
|
369 |
BorderUpdate(); |
|
370 |
((sender as TextBox).Parent as TextControl).Base_TextBlock.TextDecorations = ((sender as TextBox).Parent as TextControl).UnderLine; |
|
371 |
} |
|
372 |
} |
|
373 |
|
|
374 |
private void TextControlSelectionChanged(object sender, RoutedEventArgs e) |
|
375 |
{ |
|
376 |
BorderUpdate(); |
|
377 |
} |
|
378 |
|
|
349 | 379 |
/// <summary> |
350 | 380 |
/// UIElement를 종류에 맞게 등록시킴 |
351 | 381 |
/// </summary> |
... | ... | |
384 | 414 |
}); |
385 | 415 |
(member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
386 | 416 |
AngleValue = (member as ArrowTextControl).CommentAngle; |
387 |
Observable.FromEventPattern(((ArrowTextControl)member).Base_TextBox, "LostFocus").Subscribe(a => |
|
388 |
{ |
|
389 |
TextCompensation = false; |
|
390 |
BorderUpdate(); |
|
391 |
if ((a.Sender as TextBox).Text == "") //보류 |
|
392 |
{ |
|
393 |
this.ContainerContent.Children.Remove(member); |
|
394 |
this.Visibility = Visibility.Collapsed; |
|
395 |
} |
|
396 |
}); |
|
417 |
|
|
418 |
((ArrowTextControl)member).Base_TextBox.LostFocus += TextControlLostFocus; |
|
419 |
|
|
420 |
//Observable.FromEventPattern(((ArrowTextControl)member).Base_TextBox, "LostFocus").Subscribe(a => |
|
421 |
//{ |
|
422 |
// TextCompensation = false; |
|
423 |
// BorderUpdate(); |
|
424 |
// if ((a.Sender as TextBox).Text == "") //보류 |
|
425 |
// { |
|
426 |
// this.ContainerContent.Children.Remove(member); |
|
427 |
// this.Visibility = Visibility.Collapsed; |
|
428 |
// } |
|
429 |
//}); |
|
397 | 430 |
break; |
398 | 431 |
case "ImgControl": |
399 | 432 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = member.ControlType, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
... | ... | |
448 | 481 |
//CenterX = middle.X, |
449 | 482 |
//CenterY = middle.Y, |
450 | 483 |
}; |
451 |
Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
|
452 |
{ |
|
453 |
TextCompensation = true; |
|
454 |
BorderUpdate(); |
|
455 |
((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; |
|
456 |
}); |
|
457 |
Observable.FromEventPattern(((TextControl)member).Base_TextBox, "LostFocus").Subscribe(a => |
|
458 |
{ |
|
459 |
TextCompensation = false; |
|
460 |
BorderUpdate(); |
|
461 |
if ((a.Sender as TextBox).Text == "") //보류 |
|
462 |
{ |
|
463 |
this.ContainerContent.Children.Remove(member); |
|
464 |
this.Visibility = Visibility.Collapsed; |
|
465 |
} |
|
484 |
//Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
|
485 |
//{ |
|
486 |
// TextCompensation = true; |
|
487 |
// BorderUpdate(); |
|
488 |
// ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; |
|
489 |
//}); |
|
466 | 490 |
|
467 |
//((TextControl)member).UnEditingMode(); |
|
468 |
//((TextControl)member).Base_TextBlock.Visibility = Visibility.Collapsed; |
|
469 |
//((TextControl)member).Base_Border.Visibility = Visibility.Collapsed; |
|
470 |
//((TextControl)member).Base_TextPath.Visibility = Visibility.Collapsed; |
|
471 |
}); |
|
491 |
//Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
|
492 |
//{ |
|
493 |
// TextCompensation = true; |
|
494 |
// BorderUpdate(); |
|
495 |
// ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; |
|
496 |
//}); |
|
497 |
|
|
498 |
((TextControl)member).PropertyChanged += TextControlPropertyChanged; |
|
499 |
((TextControl)member).Base_TextBox.LostFocus += TextControlLostFocus; |
|
500 |
|
|
501 |
//Observable.FromEventPattern(((TextControl)member).Base_TextBox, "LostFocus").Subscribe(a => |
|
502 |
//{ |
|
503 |
// TextCompensation = false; |
|
504 |
// BorderUpdate(); |
|
505 |
// if ((a.Sender as TextBox).Text == "") //보류 |
|
506 |
// { |
|
507 |
// this.ContainerContent.Children.Remove(member); |
|
508 |
// this.Visibility = Visibility.Collapsed; |
|
509 |
// } |
|
510 |
|
|
511 |
// //((TextControl)member).UnEditingMode(); |
|
512 |
// //((TextControl)member).Base_TextBlock.Visibility = Visibility.Collapsed; |
|
513 |
// //((TextControl)member).Base_Border.Visibility = Visibility.Collapsed; |
|
514 |
// //((TextControl)member).Base_TextPath.Visibility = Visibility.Collapsed; |
|
515 |
//}); |
|
472 | 516 |
break; |
473 | 517 |
default: |
474 | 518 |
break; |
... | ... | |
562 | 606 |
break; |
563 | 607 |
case "TextControl": |
564 | 608 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
565 |
Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
|
566 |
{ |
|
567 |
BorderUpdate(); |
|
568 |
try |
|
569 |
{ |
|
570 |
((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; |
|
571 |
} |
|
572 |
catch (Exception) |
|
573 |
{ |
|
574 | 609 |
|
575 |
} |
|
576 |
|
|
577 |
}); |
|
578 |
Observable.FromEventPattern(((TextControl)member).Base_TextBox, "SelectionChanged").Subscribe(a => |
|
579 |
{ |
|
580 |
BorderUpdate(); |
|
581 |
}); |
|
610 |
(member as TextControl).PropertyChanged += TextControlPropertyChanged; |
|
611 |
(member as TextControl).Base_TextBox.SelectionChanged += TextControlSelectionChanged; |
|
612 |
|
|
613 |
//Observable.FromEventPattern(((TextControl)member).Base_TextBox, "SelectionChanged").Subscribe(a => |
|
614 |
//{ |
|
615 |
// BorderUpdate(); |
|
616 |
//}); |
|
617 |
//Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a => |
|
618 |
//{ |
|
619 |
// BorderUpdate(); |
|
620 |
// try |
|
621 |
// { |
|
622 |
// ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; |
|
623 |
// } |
|
624 |
// catch (Exception) |
|
625 |
// { |
|
626 |
|
|
627 |
// } |
|
628 |
|
|
629 |
//}); |
|
630 |
//Observable.FromEventPattern(((TextControl)member).Base_TextBox, "SelectionChanged").Subscribe(a => |
|
631 |
//{ |
|
632 |
// BorderUpdate(); |
|
633 |
//}); |
|
582 | 634 |
break; |
583 | 635 |
case "InsideWhiteControl": |
584 | 636 |
this.Members.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.InsideWhite, ThumbList = new List<MyThumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID }); |
... | ... | |
613 | 665 |
BorderUpdate(); |
614 | 666 |
} |
615 | 667 |
|
668 |
|
|
616 | 669 |
/// <summary> |
617 | 670 |
/// Border 를 갱신 |
618 | 671 |
/// </summary> |
... | ... | |
649 | 702 |
Point startP = (currentControl as IPath).StartPoint; |
650 | 703 |
Point endP = (currentControl as IPath).EndPoint; |
651 | 704 |
|
652 |
ViewerDataModel.Instance.Angle = MathSet.returnAngle(startP, ref endP, ViewerDataModel.Instance.IsPressShift); |
|
705 |
// ViewerDataModel.Instance.Angle = MathSet.returnAngle(startP, ref endP, ViewerDataModel.Instance.IsPressShift); |
|
706 |
|
|
707 |
// 컨트롤의 angle변환시 상단 anglecontrol에 출력 |
|
708 |
ViewerDataModel.Instance.Angle = (currentControl as CommentUserInfo).CommentAngle; |
|
653 | 709 |
|
654 | 710 |
if (item.DrawingData.GetType().Name == "TextControl") |
655 | 711 |
{ |
... | ... | |
1158 | 1214 |
|
1159 | 1215 |
private void drag_DragCompleted(object sender, DragCompletedEventArgs e) |
1160 | 1216 |
{ |
1161 |
DragThumb.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
|
|
1217 |
DragThumb.Cursor = new Cursor(App.DefaultArrowCursorStream);
|
|
1162 | 1218 |
|
1163 | 1219 |
var comments = (from drawing in this.Members |
1164 | 1220 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
... | ... | |
1387 | 1443 |
|
1388 | 1444 |
private void rotate_DragCompleted(object sender, DragCompletedEventArgs e) |
1389 | 1445 |
{ |
1390 |
rotateTop.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
|
|
1446 |
rotateTop.Cursor = new Cursor(App.DefaultArrowCursorStream);
|
|
1391 | 1447 |
|
1392 | 1448 |
var comments = (from drawing in this.Members |
1393 | 1449 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
내보내기 Unified diff