개정판 f1d6841f
Fix: Cloud Control의 사이즈 변경 오류
- 새로 생성한 객체가 맨 앞으로 오도록 수정
Change-Id: I9fa0ef9a9edf9571318880e9cedf2373cb412102
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
26 | 26 |
{ |
27 | 27 |
public class MyThumb : Thumb |
28 | 28 |
{ |
29 |
public const int ZIndex = int.MaxValue; |
|
30 |
|
|
29 | 31 |
public MyThumb() |
30 | 32 |
{ |
31 | 33 |
this.Opacity = 0.6; |
... | ... | |
229 | 231 |
ArrTextCtrl.Base_TextBox.Focusable = true; |
230 | 232 |
} |
231 | 233 |
|
232 |
///Canvas.SetZIndex(objectData, 84); |
|
233 | 234 |
try |
234 | 235 |
{ |
235 | 236 |
objectData.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(objectData); |
... | ... | |
248 | 249 |
public AdornerFinal(List<CommentUserInfo> comments) : this() |
249 | 250 |
{ |
250 | 251 |
InitializeComponent(); |
251 |
//comments.ForEach(x => x.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(x)); |
|
252 | 252 |
RemoveMultipleFromCanvas(comments); |
253 | 253 |
foreach (var item in comments) |
254 | 254 |
{ |
... | ... | |
258 | 258 |
} |
259 | 259 |
try |
260 | 260 |
{ |
261 |
item.Index = ViewerDataModel.Instance.MarkupControls_USER.IndexOf(item); |
|
261 | 262 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item); |
262 | 263 |
this.ContainerContent.Children.Add(item); |
263 | 264 |
} |
... | ... | |
270 | 271 |
} |
271 | 272 |
} |
272 | 273 |
|
273 |
this.SetAdornerMember(comments); |
|
274 |
this.SetAdornerMembers(comments);
|
|
274 | 275 |
this.Focus(); |
275 | 276 |
} |
276 | 277 |
|
... | ... | |
380 | 381 |
|
381 | 382 |
if (sender is TextBox TextBox) |
382 | 383 |
{ |
383 |
if (TextBox.Text == "") //보류
|
|
384 |
if (string.IsNullOrEmpty(TextBox.Text)) //보류
|
|
384 | 385 |
{ |
385 | 386 |
this.ContainerContent.Children.Remove((sender as TextBox).Parent as MarkupToPDF.Common.CommentUserInfo); |
386 | 387 |
this.Visibility = Visibility.Collapsed; |
... | ... | |
402 | 403 |
BorderUpdate(); |
403 | 404 |
} |
404 | 405 |
|
405 |
|
|
406 |
private void ViewBoxRotate(UIElement member) |
|
407 |
{ |
|
408 |
AdornerBorder.RenderTransformOrigin = new Point(0.5, 0.5); |
|
409 |
DragThumb.RenderTransformOrigin = new Point(0.5, 0.5); |
|
410 |
AdornerBorder.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).CommentAngle }; |
|
411 |
DragThumb.RenderTransform = new RotateTransform() { Angle = (member as IViewBox).CommentAngle }; |
|
412 |
} |
|
413 |
|
|
414 | 406 |
/// <summary> |
415 | 407 |
/// UIElement를 종류에 맞게 등록시킴 |
416 | 408 |
/// </summary> |
... | ... | |
524 | 516 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member); |
525 | 517 |
} |
526 | 518 |
|
527 |
|
|
528 |
public void SetAdornerMember(List<CommentUserInfo> members) |
|
519 |
public void SetAdornerMembers(List<CommentUserInfo> members) |
|
529 | 520 |
{ |
530 | 521 |
foreach (var member in members) |
531 | 522 |
{ |
... | ... | |
877 | 868 |
pts.Add(new Point((member as IPath).PathData.Bounds.Right, (member as IPath).PathData.Bounds.Top)); |
878 | 869 |
} |
879 | 870 |
ControlType markT = this.Members.First(p => p.DrawingData == member).Drawingtype; |
880 |
double Minx = pts.Min(x => x.X); |
|
881 |
double Miny = pts.Min(x => x.Y); |
|
882 | 871 |
|
883 | 872 |
for (int i = 0; i < pts.Count; i++) |
884 | 873 |
{ |
... | ... | |
887 | 876 |
Style = (Style)this.LayoutRoot.Resources["ThumbResizeStyle"], |
888 | 877 |
}; |
889 | 878 |
|
890 |
this.Members.Last().ThumbList.Add(tm);
|
|
879 |
this.Members[this.Members.Count - 1].ThumbList.Add(tm);
|
|
891 | 880 |
|
892 | 881 |
if ((markT == ControlType.ArcLine && pts[i] == (member as ArcControl).MidPoint) || (markT == ControlType.ArcArrow && pts[i] == (member as ArrowArcControl).MiddlePoint)) |
893 | 882 |
{ |
... | ... | |
1047 | 1036 |
Canvas.SetTop(tm, pts[count].Y); |
1048 | 1037 |
if (member.GetType().Name == "ArrowTextControl" && pts[i] == (member as ArrowTextControl).MidPoint) |
1049 | 1038 |
{ |
1050 |
Canvas.SetZIndex(tm, 95); |
|
1051 |
//tm.Opacity = 0; |
|
1039 |
Canvas.SetZIndex(tm, MyThumb.ZIndex); |
|
1052 | 1040 |
tm.DragDelta += MidPoint_DragDelta; |
1053 | 1041 |
} |
1054 | 1042 |
else |
1055 | 1043 |
{ |
1056 | 1044 |
tm.DragDelta += ResizeTm_DragDelta; |
1057 |
Canvas.SetZIndex(tm, 99);
|
|
1045 |
Canvas.SetZIndex(tm, MyThumb.ZIndex);
|
|
1058 | 1046 |
} |
1059 | 1047 |
|
1060 | 1048 |
tm.DragStarted += new DragStartedEventHandler(tm_DragStarted); |
... | ... | |
1269 | 1257 |
} |
1270 | 1258 |
} |
1271 | 1259 |
|
1260 |
/// <summary> |
|
1261 |
/// 선택한 항목들 이동 시작 |
|
1262 |
/// </summary> |
|
1263 |
/// <param name="sender"></param> |
|
1264 |
/// <param name="e"></param> |
|
1272 | 1265 |
private void drag_DragStarted(object sender, DragStartedEventArgs e) |
1273 | 1266 |
{ |
1274 | 1267 |
/// save mouse down and current mouse point |
... | ... | |
1287 | 1280 |
UndoCommand.Instance.Push(EventType.Operation, comments); |
1288 | 1281 |
} |
1289 | 1282 |
|
1283 |
/// <summary> |
|
1284 |
/// 선택한 항목들 이동 종료 |
|
1285 |
/// </summary> |
|
1286 |
/// <param name="sender"></param> |
|
1287 |
/// <param name="e"></param> |
|
1290 | 1288 |
private void drag_DragCompleted(object sender, DragCompletedEventArgs e) |
1291 | 1289 |
{ |
1292 | 1290 |
DragThumb.Cursor = new Cursor(App.DefaultArrowCursorStream); |
... | ... | |
1295 | 1293 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1296 | 1294 |
} |
1297 | 1295 |
|
1296 |
/// <summary> |
|
1297 |
/// 선택한 항목들 이동 |
|
1298 |
/// </summary> |
|
1299 |
/// <param name="sender"></param> |
|
1300 |
/// <param name="e"></param> |
|
1298 | 1301 |
private void DragThumb_DragDelta(object sender, DragDeltaEventArgs e) |
1299 | 1302 |
{ |
1300 | 1303 |
double scale = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ContentScale; |
내보내기 Unified diff