992 |
992 |
}
|
993 |
993 |
}
|
994 |
994 |
}
|
|
995 |
|
|
996 |
/// ArrowTextControl text box 화면 출력
|
995 |
997 |
if (member.GetType().Name == "ArrowTextControl" && list[i] == list.Last())
|
996 |
998 |
{
|
997 |
999 |
tm.Style = (Style)this.LayoutRoot.Resources["ThumbTextStyle"];
|
... | ... | |
1077 |
1079 |
double newHorizontalChange = e.HorizontalChange;
|
1078 |
1080 |
double newVerticalChange = e.VerticalChange;
|
1079 |
1081 |
|
1080 |
|
if (reSizePoint != new Point(0, 0))
|
1081 |
|
{
|
|
1082 |
//if (reSizePoint != new Point(0, 0))
|
|
1083 |
//{
|
1082 |
1084 |
//Point setPoint = Mouse.GetPosition(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanCanvas);
|
1083 |
1085 |
|
1084 |
|
Point setPoint = new Point(GetPosition(thumb).X, GetPosition(thumb).Y);
|
|
1086 |
Point setPoint = GetPosition(thumb);
|
1085 |
1087 |
|
1086 |
1088 |
//System.Diagnostics.Debug.WriteLine($"1. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y} Change Value : {newHorizontalChange},{newVerticalChange}");
|
1087 |
1089 |
|
1088 |
|
thumb.Translate(newHorizontalChange, newVerticalChange, this.AngleValue);
|
1089 |
|
|
1090 |
1090 |
AdornerMember control = CurrentAdornerMember(thumb);
|
1091 |
|
|
1092 |
1091 |
var commentInfo = (control.DrawingData) as CommentUserInfo;
|
1093 |
1092 |
|
1094 |
|
// 페이지회전에 따른 화살표텍스트 박스의 이동 수정
|
1095 |
|
var newpoint = MathHelper.RotatePoint(new Point(newHorizontalChange, newVerticalChange), new Point(), commentInfo.VisualPageAngle);
|
1096 |
|
var thumbPoint = MathHelper.RotatePoint(new Point(thumb.RenderSize.Width, thumb.RenderSize.Height), new Point(), commentInfo.VisualPageAngle);
|
|
1093 |
double ratatePointAngle = 0;
|
1097 |
1094 |
|
1098 |
|
if ((setPoint.X + newpoint.X) < 0 || (setPoint.X + Math.Abs(thumbPoint.X) + newpoint.X) - ViewerDataModel.Instance.ImageViewWidth > 0)
|
|
1095 |
if (commentInfo is ArrowTextControl)
|
1099 |
1096 |
{
|
1100 |
|
newpoint.X = 0;
|
1101 |
|
}
|
|
1097 |
var textControl = (commentInfo as ArrowTextControl);
|
1102 |
1098 |
|
1103 |
|
if (setPoint.Y + newpoint.Y < 0 || (setPoint.Y + Math.Abs(thumbPoint.Y) + newpoint.Y) - ViewerDataModel.Instance.ImageViewHeight > 0)
|
1104 |
|
{
|
1105 |
|
newpoint.Y = 0;
|
|
1099 |
if (textControl.EndPoint == MathSet.getNearPoint(textControl.PointSet, setPoint)) //(textControl.MidPoint == MathSet.getNearPoint(textControl.PointSet,setPoint) ||
|
|
1100 |
|
|
1101 |
{
|
|
1102 |
textControl.CommentAngle = 0;
|
|
1103 |
this.AngleValue = 0;
|
|
1104 |
ratatePointAngle = commentInfo.VisualPageAngle;
|
|
1105 |
}
|
|
1106 |
else
|
|
1107 |
{
|
|
1108 |
Point tempPoint = textControl.EndPoint;
|
|
1109 |
textControl.OnCreatingMouseMove(tempPoint, ViewerDataModel.Instance.IsPressShift);
|
|
1110 |
//textControl.CommentAngle = commentInfo.VisualPageAngle + MathSet.returnAngle(textControl.StartPoint, ref tempPoint, ViewerDataModel.Instance.IsPressShift);
|
|
1111 |
this.AngleValue = textControl.CommentAngle;
|
|
1112 |
commentInfo.CommentAngle = this.AngleValue;
|
|
1113 |
}
|
|
1114 |
//CommentAngle = MathSet.returnAngle(this.StartPoint, ref tempPoint, bAxisLocked);
|
1106 |
1115 |
}
|
|
1116 |
System.Diagnostics.Debug.WriteLine("## Angle : " + this.AngleValue + " ##");
|
|
1117 |
thumb.Translate(newHorizontalChange, newVerticalChange, this.AngleValue);
|
|
1118 |
|
|
1119 |
// 페이지회전에 따른 화살표텍스트 박스의 이동 수정
|
|
1120 |
var newpoint = MathHelper.RotatePoint(new Point(newHorizontalChange, newVerticalChange), new Point(), ratatePointAngle);// commentInfo.VisualPageAngle);
|
|
1121 |
|
|
1122 |
Point thumbPoint = MathHelper.RotatePoint(setPoint, new Point(), ratatePointAngle);// commentInfo.VisualPageAngle);
|
|
1123 |
|
|
1124 |
//thumbPoint.X = Math.Abs(thumbPoint.X);
|
|
1125 |
//thumbPoint.Y = Math.Abs(thumbPoint.Y);
|
|
1126 |
|
|
1127 |
//if ((setPoint.X + newpoint.X) < 0 || (Math.Abs(thumbPoint.X) + newpoint.X) - ViewerDataModel.Instance.ImageViewWidth > 0)
|
|
1128 |
//{
|
|
1129 |
// newpoint.X = 0;
|
|
1130 |
//}
|
|
1131 |
|
|
1132 |
//if (setPoint.Y + newpoint.Y < 0 || (Math.Abs(thumbPoint.Y) + newpoint.Y) - ViewerDataModel.Instance.ImageViewHeight > 0)
|
|
1133 |
//{
|
|
1134 |
// newpoint.Y = 0;
|
|
1135 |
//}
|
1107 |
1136 |
|
1108 |
1137 |
commentInfo.OnMoveCtrlPoint(setPoint, newpoint.X, newpoint.Y, ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift);
|
1109 |
1138 |
|
... | ... | |
1114 |
1143 |
this.BorderUpdate();
|
1115 |
1144 |
|
1116 |
1145 |
//System.Diagnostics.Debug.WriteLine($"5. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
|
1117 |
|
}
|
|
1146 |
//}
|
1118 |
1147 |
}
|
1119 |
1148 |
|
1120 |
1149 |
private AdornerMember CurrentAdornerMember(MyThumb thumb)
|
... | ... | |
1265 |
1294 |
try
|
1266 |
1295 |
{
|
1267 |
1296 |
DragThumb.Cursor = Cursors.SizeAll;
|
1268 |
|
//System.Diagnostics.Debug.WriteLine($"TransItem : {horzChange}, {vertChange}");
|
1269 |
|
//System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : {e.HorizontalChange}, {e.VerticalChange}");
|
|
1297 |
System.Diagnostics.Debug.WriteLine($"TransItem : {horzChange}, {vertChange}");
|
|
1298 |
System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : {e.HorizontalChange}, {e.VerticalChange}");
|
1270 |
1299 |
|
1271 |
1300 |
|
1272 |
|
//var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect();
|
1273 |
|
|
1274 |
|
//var rect = (this.ContainerContent.FindChildByType<CommentUserInfo>() as CommentUserInfo).ItemRect; //this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel);
|
1275 |
|
|
1276 |
|
//var rotationRect = MathHelper.RotateRect(rect,new Point(mainRect.Width/2, mainRect.Height/2), ViewerDataModel.Instance.PageAngle);
|
|
1301 |
var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect();
|
1277 |
1302 |
|
1278 |
|
//if(ViewerDataModel.Instance.PageAngle == 270 || ViewerDataModel.Instance.PageAngle == 90)
|
|
1303 |
//if (ViewerDataModel.Instance.PageAngle == 270 || ViewerDataModel.Instance.PageAngle == 90)
|
1279 |
1304 |
//{
|
1280 |
|
// mainRect = new Rect(0,0, mainRect.Height, mainRect.Width);
|
|
1305 |
// mainRect = new Rect(0, 0, mainRect.Height, mainRect.Width);
|
1281 |
1306 |
//}
|
1282 |
1307 |
|
1283 |
|
//var moveDirection = mainRect.Movement(rotationRect);
|
|
1308 |
mainRect = MathHelper.RotateRect(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect(), new Point(mainRect.Width / 2, mainRect.Height / 2), ViewerDataModel.Instance.PageAngle);
|
|
1309 |
|
|
1310 |
var rect = (this.ContainerContent.FindChildByType<CommentUserInfo>() as CommentUserInfo).ItemRect; //this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel);
|
|
1311 |
|
|
1312 |
var rotationRect = MathHelper.RotateRect(rect, new Point(mainRect.Width / 2, mainRect.Height / 2), ViewerDataModel.Instance.PageAngle);
|
|
1313 |
|
|
1314 |
var moveDirection = mainRect.Movement(rotationRect);
|
1284 |
1315 |
|
1285 |
|
//System.Diagnostics.Debug.WriteLine($"horzChange: {horzChange} , vertChange:{vertChange}");
|
1286 |
|
////System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : Top:{rect.Top}, Left:{rect.Left}, Right:{rect.Right}, Bottom:{rect.Bottom} ,BottomLeft : {rect.BottomLeft} BottomRight : {rect.BottomRight}");
|
|
1316 |
System.Diagnostics.Debug.WriteLine($"horzChange: {horzChange} , vertChange:{vertChange}");
|
|
1317 |
//System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : Top:{rect.Top}, Left:{rect.Left}, Right:{rect.Right}, Bottom:{rect.Bottom} ,BottomLeft : {rect.BottomLeft} BottomRight : {rect.BottomRight}");
|
1287 |
1318 |
|
1288 |
|
//if (!mainRect.Contains(rotationRect) && Math.Abs(horzChange) > 0)
|
|
1319 |
//if (Math.Abs(horzChange) > 0)
|
1289 |
1320 |
//{
|
1290 |
1321 |
// if ((horzChange < 0 && !moveDirection.Left) || (horzChange > 0 && !moveDirection.Right))
|
1291 |
1322 |
// {
|
... | ... | |
1296 |
1327 |
// }
|
1297 |
1328 |
//}
|
1298 |
1329 |
|
1299 |
|
//if (!mainRect.Contains(rotationRect) && Math.Abs(vertChange) > 0)
|
|
1330 |
//if (Math.Abs(vertChange) > 0)
|
1300 |
1331 |
//{
|
1301 |
1332 |
// if ((vertChange < 0 && !moveDirection.Up) || (vertChange > 0 && !moveDirection.Down))
|
1302 |
1333 |
// {
|
... | ... | |
1354 |
1385 |
|
1355 |
1386 |
private void resize_MouseMove(object sender, MouseEventArgs e)
|
1356 |
1387 |
{
|
1357 |
|
reSizePoint = e.GetPosition(this);
|
|
1388 |
//reSizePoint = e.GetPosition(this);
|
1358 |
1389 |
}
|
1359 |
1390 |
|
1360 |
1391 |
/// <summary>
|