개정판 a6272c57
issue #923: add ICommentUserInfo interface
Change-Id: Id0b65251436a5aa647eef78026dfad90d3ca64ab
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
929 | 929 |
{ |
930 | 930 |
return HitTestResultBehavior.Stop; |
931 | 931 |
} |
932 |
//IntersectionDetail intersectionDetail = |
|
933 |
//((GeometryHitTestResult)result).IntersectionDetail; |
|
934 |
//switch (intersectionDetail) |
|
935 |
//{ |
|
936 |
// case IntersectionDetail.FullyContains: |
|
937 |
// // Add the hit test result to the list: |
|
938 |
// hitList.Add((CommentUserInfo)result.VisualHit); |
|
939 |
// return HitTestResultBehavior.Continue; |
|
940 |
// case IntersectionDetail.Intersects: |
|
941 |
// // Set the behavior to return visuals at all z-order levels: |
|
942 |
// return HitTestResultBehavior.Continue; |
|
943 |
// case IntersectionDetail.FullyInside: |
|
944 |
// // Set the behavior to return visuals at all z-order levels: |
|
945 |
// return HitTestResultBehavior.Continue; |
|
946 |
// default: |
|
947 |
// return HitTestResultBehavior.Stop; |
|
948 |
//} |
|
949 | 932 |
} |
950 | 933 |
} |
951 | 934 |
return HitTestResultBehavior.Continue; |
... | ... | |
1231 | 1214 |
case (ControlType.Coordinate): |
1232 | 1215 |
{ |
1233 | 1216 |
var control = currentControl as CoordinateControl; |
1234 |
|
|
1235 | 1217 |
if (control != null) |
1236 | 1218 |
{ |
1237 |
if (move.mousemode == MouseMode.Drawing) |
|
1238 |
{ |
|
1239 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1240 |
} |
|
1241 |
else |
|
1242 |
{ |
|
1243 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1244 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1245 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1246 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1247 |
|
|
1248 |
|
|
1249 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1250 |
{ |
|
1251 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1252 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1253 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1254 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1255 |
} |
|
1256 |
|
|
1257 |
control.PointSet = new List<Point> |
|
1258 |
{ |
|
1259 |
control.StartPoint, |
|
1260 |
control.LeftBottomPoint, |
|
1261 |
control.EndPoint, |
|
1262 |
control.TopRightPoint, |
|
1263 |
}; |
|
1264 |
control.updateControl(); |
|
1265 |
} |
|
1266 |
|
|
1267 |
//강인구 추가 |
|
1268 |
control.ControlType = controlType; |
|
1219 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1269 | 1220 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1270 | 1221 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1271 |
// control.Paint = PaintSet.Fill; |
|
1272 | 1222 |
} |
1273 | 1223 |
} |
1274 | 1224 |
break; |
1275 | 1225 |
case (ControlType.InsideWhite): |
1276 | 1226 |
{ |
1277 | 1227 |
var control = currentControl as InsideWhiteControl; |
1278 |
|
|
1279 | 1228 |
if (control != null) |
1280 | 1229 |
{ |
1281 |
if (move.mousemode == MouseMode.Drawing) |
|
1282 |
{ |
|
1283 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1284 |
} |
|
1285 |
else |
|
1286 |
{ |
|
1287 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1288 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1289 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1290 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1291 |
|
|
1292 |
|
|
1293 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1294 |
{ |
|
1295 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1296 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1297 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1298 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1299 |
} |
|
1300 |
|
|
1301 |
control.PointSet = new List<Point> |
|
1302 |
{ |
|
1303 |
control.StartPoint, |
|
1304 |
control.LeftBottomPoint, |
|
1305 |
control.EndPoint, |
|
1306 |
control.TopRightPoint, |
|
1307 |
}; |
|
1308 |
control.updateControl(); |
|
1309 |
} |
|
1310 |
|
|
1311 |
//강인구 추가 |
|
1312 |
control.ControlType = controlType; |
|
1230 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1313 | 1231 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1314 | 1232 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1315 | 1233 |
control.Paint = PaintSet.Fill; |
1316 | 1234 |
} |
1317 | 1235 |
} |
1318 | 1236 |
break; |
1319 |
case (ControlType.OverlapWhite):
|
|
1237 |
case ControlType.OverlapWhite:
|
|
1320 | 1238 |
{ |
1321 | 1239 |
var control = currentControl as OverlapWhiteControl; |
1322 |
|
|
1323 | 1240 |
if (control != null) |
1324 | 1241 |
{ |
1325 |
if (move.mousemode == MouseMode.Drawing) |
|
1326 |
{ |
|
1327 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1328 |
} |
|
1329 |
else |
|
1330 |
{ |
|
1331 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1332 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1333 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1334 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1335 |
|
|
1336 |
|
|
1337 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1338 |
{ |
|
1339 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1340 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1341 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1342 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1343 |
} |
|
1344 |
|
|
1345 |
control.PointSet = new List<Point> |
|
1346 |
{ |
|
1347 |
control.StartPoint, |
|
1348 |
control.LeftBottomPoint, |
|
1349 |
control.EndPoint, |
|
1350 |
control.TopRightPoint, |
|
1351 |
}; |
|
1352 |
control.updateControl(); |
|
1353 |
} |
|
1354 |
|
|
1355 |
//강인구 추가 |
|
1356 |
control.ControlType = controlType; |
|
1242 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1357 | 1243 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1358 | 1244 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1359 | 1245 |
control.Paint = PaintSet.Fill; |
1360 | 1246 |
} |
1361 | 1247 |
} |
1362 | 1248 |
break; |
1363 |
case (ControlType.ClipWhite):
|
|
1249 |
case ControlType.ClipWhite:
|
|
1364 | 1250 |
{ |
1365 | 1251 |
var control = currentControl as ClipWhiteControl; |
1366 |
|
|
1367 | 1252 |
if (control != null) |
1368 | 1253 |
{ |
1369 |
if (move.mousemode == MouseMode.Drawing) |
|
1370 |
{ |
|
1371 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1372 |
} |
|
1373 |
else |
|
1374 |
{ |
|
1375 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1376 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1377 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1378 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1379 |
|
|
1380 |
|
|
1381 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1382 |
{ |
|
1383 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1384 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1385 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1386 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1387 |
} |
|
1388 |
|
|
1389 |
control.PointSet = new List<Point> |
|
1390 |
{ |
|
1391 |
control.StartPoint, |
|
1392 |
control.LeftBottomPoint, |
|
1393 |
control.EndPoint, |
|
1394 |
control.TopRightPoint, |
|
1395 |
}; |
|
1396 |
control.updateControl(); |
|
1397 |
} |
|
1398 |
|
|
1399 |
//강인구 추가 |
|
1400 |
control.ControlType = controlType; |
|
1254 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1401 | 1255 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1402 | 1256 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1403 | 1257 |
control.Paint = PaintSet.Fill; |
1404 | 1258 |
} |
1405 | 1259 |
} |
1406 | 1260 |
break; |
1407 |
case ControlType.Rectangle: |
|
1408 |
{ |
|
1409 |
var control = currentControl as RectangleControl; |
|
1410 |
|
|
1411 |
if (control != null) |
|
1412 |
{ |
|
1413 |
if (move.mousemode == MouseMode.Drawing) |
|
1414 |
{ |
|
1415 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1416 |
} |
|
1417 |
else |
|
1418 |
{ |
|
1419 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1420 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1421 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1422 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1423 |
|
|
1424 |
|
|
1425 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1426 |
{ |
|
1427 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1428 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1429 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1430 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1431 |
} |
|
1432 |
|
|
1433 |
control.PointSet = new List<Point> |
|
1434 |
{ |
|
1435 |
control.StartPoint, |
|
1436 |
control.LeftBottomPoint, |
|
1437 |
control.EndPoint, |
|
1438 |
control.TopRightPoint, |
|
1439 |
}; |
|
1440 |
control.updateControl(); |
|
1441 |
} |
|
1442 |
|
|
1443 |
//강인구 추가 |
|
1444 |
control.ControlType = controlType; |
|
1445 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
|
1446 |
control.Paint = ViewerDataModel.Instance.paintSet; |
|
1447 |
} |
|
1448 |
} |
|
1449 |
break; |
|
1450 |
|
|
1451 | 1261 |
case ControlType.RectCloud: |
1452 | 1262 |
{ |
1453 | 1263 |
var control = currentControl as RectCloudControl; |
1454 |
|
|
1455 | 1264 |
if (control != null) |
1456 | 1265 |
{ |
1457 |
if (move.mousemode == MouseMode.Drawing) |
|
1458 |
{ |
|
1459 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1460 |
} |
|
1461 |
else |
|
1462 |
{ |
|
1463 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1464 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1465 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1466 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1467 |
|
|
1468 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1469 |
{ |
|
1470 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1471 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1472 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1473 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1474 |
} |
|
1475 |
|
|
1476 |
control.PointSet = new List<Point> |
|
1477 |
{ |
|
1478 |
control.StartPoint, |
|
1479 |
control.LeftBottomPoint, |
|
1480 |
control.EndPoint, |
|
1481 |
control.TopRightPoint, |
|
1482 |
}; |
|
1483 |
} |
|
1484 |
|
|
1266 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1485 | 1267 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1486 | 1268 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1487 | 1269 |
} |
1488 | 1270 |
} |
1489 | 1271 |
break; |
1490 |
|
|
1491 | 1272 |
case ControlType.SingleLine: |
1492 |
{ |
|
1493 |
var control = currentControl as LineControl; |
|
1494 |
if (control != null) |
|
1495 |
{ |
|
1496 |
control.LineStyleSet = LineStyleSet.SingleLine; |
|
1497 |
control.ControlType = controlType; |
|
1498 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1499 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1500 |
Point tempPoint = control.EndPoint; |
|
1501 |
|
|
1502 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1503 |
{ |
|
1504 |
//var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1505 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1506 |
control.EndPoint = tempPoint; |
|
1507 |
} |
|
1508 |
else |
|
1509 |
{ |
|
1510 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1511 |
} |
|
1512 |
|
|
1513 |
control.PointSet = new List<Point> |
|
1514 |
{ |
|
1515 |
control.StartPoint, |
|
1516 |
control.EndPoint, |
|
1517 |
}; |
|
1518 |
|
|
1519 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
|
1520 |
} |
|
1521 |
|
|
1522 |
} |
|
1523 |
break; |
|
1524 |
|
|
1525 | 1273 |
case ControlType.CancelLine: |
1526 |
{ |
|
1527 |
var control = currentControl as LineControl; |
|
1528 |
if (control != null) |
|
1529 |
{ |
|
1530 |
control.LineStyleSet = LineStyleSet.CancelLine; |
|
1531 |
//control.LineStyle = LineControl.LineStyleSet.MultiLine; |
|
1532 |
control.ControlType = controlType; |
|
1533 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1534 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1535 |
Point tempPoint = control.EndPoint; |
|
1536 |
|
|
1537 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1538 |
{ |
|
1539 |
//var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1540 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1541 |
control.EndPoint = tempPoint; |
|
1542 |
} |
|
1543 |
else |
|
1544 |
{ |
|
1545 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1546 |
} |
|
1547 |
|
|
1548 |
|
|
1549 |
control.PointSet = new List<Point> |
|
1550 |
{ |
|
1551 |
control.StartPoint, |
|
1552 |
control.EndPoint, |
|
1553 |
}; |
|
1554 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
|
1555 |
} |
|
1556 |
|
|
1557 |
|
|
1558 |
} |
|
1559 |
break; |
|
1560 |
|
|
1561 | 1274 |
case ControlType.ArrowLine: |
1562 |
{ |
|
1563 |
var control = currentControl as LineControl; |
|
1564 |
if (control != null) |
|
1565 |
{ |
|
1566 |
control.LineStyleSet = LineStyleSet.ArrowLine; |
|
1567 |
control.ControlType = controlType; |
|
1568 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1569 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1570 |
Point tempPoint = control.EndPoint; |
|
1571 |
|
|
1572 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1573 |
{ |
|
1574 |
//var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1575 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1576 |
control.EndPoint = tempPoint; |
|
1577 |
} |
|
1578 |
else |
|
1579 |
{ |
|
1580 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1581 |
} |
|
1582 |
|
|
1583 |
|
|
1584 |
control.PointSet = new List<Point> |
|
1585 |
{ |
|
1586 |
control.StartPoint, |
|
1587 |
control.EndPoint, |
|
1588 |
}; |
|
1589 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
|
1590 |
} |
|
1591 |
} |
|
1592 |
break; |
|
1593 |
|
|
1594 | 1275 |
case ControlType.TwinLine: |
1595 |
{ |
|
1596 |
var control = currentControl as LineControl; |
|
1597 |
if (control != null) |
|
1598 |
{ |
|
1599 |
control.LineStyleSet = LineStyleSet.TwinLine; |
|
1600 |
control.ControlType = controlType; |
|
1601 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1602 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1603 |
Point tempPoint = control.EndPoint; |
|
1604 |
|
|
1605 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1606 |
{ |
|
1607 |
//var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1608 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1609 |
control.EndPoint = tempPoint; |
|
1610 |
} |
|
1611 |
else |
|
1612 |
{ |
|
1613 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1614 |
} |
|
1615 |
|
|
1616 |
|
|
1617 |
control.PointSet = new List<Point> |
|
1618 |
{ |
|
1619 |
control.StartPoint, |
|
1620 |
control.EndPoint, |
|
1621 |
}; |
|
1622 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
|
1623 |
} |
|
1624 |
} |
|
1625 |
break; |
|
1626 |
|
|
1627 | 1276 |
case ControlType.DimLine: |
1628 | 1277 |
{ |
1629 | 1278 |
var control = currentControl as LineControl; |
1630 | 1279 |
if (control != null) |
1631 | 1280 |
{ |
1632 |
control.LineStyleSet = LineStyleSet.DimLine; |
|
1633 |
control.ControlType = controlType; |
|
1634 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1635 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1636 |
Point tempPoint = control.EndPoint; |
|
1637 |
|
|
1638 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1639 |
{ |
|
1640 |
//var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1641 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1642 |
control.EndPoint = tempPoint; |
|
1643 |
} |
|
1644 |
else |
|
1645 |
{ |
|
1646 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1647 |
} |
|
1648 |
|
|
1649 |
control.PointSet = new List<Point> |
|
1650 |
{ |
|
1651 |
control.StartPoint, |
|
1652 |
control.EndPoint, |
|
1653 |
}; |
|
1281 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1654 | 1282 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1655 | 1283 |
} |
1656 | 1284 |
} |
... | ... | |
1661 | 1289 |
var control = currentControl as ArcControl; |
1662 | 1290 |
if (control != null) |
1663 | 1291 |
{ |
1664 |
control.isTransOn = false; |
|
1665 |
control.ControlType = controlType; |
|
1666 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1667 |
control.MidPoint = new Point(0, 0); |
|
1668 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1669 |
Point tempPoint = control.EndPoint; |
|
1670 |
|
|
1671 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1672 |
{ |
|
1673 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1674 |
control.EndPoint = tempPoint; |
|
1675 |
} |
|
1676 |
else |
|
1677 |
{ |
|
1678 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1679 |
} |
|
1680 |
|
|
1681 |
|
|
1682 |
control.PointSet = new List<Point> |
|
1683 |
{ |
|
1684 |
control.StartPoint, |
|
1685 |
control.MidPoint, |
|
1686 |
control.EndPoint, |
|
1687 |
}; |
|
1292 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1688 | 1293 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1689 | 1294 |
} |
1690 | 1295 |
} |
... | ... | |
1695 | 1300 |
var control = currentControl as ArrowArcControl; |
1696 | 1301 |
if (control != null) |
1697 | 1302 |
{ |
1698 |
control.isTransOn = false; |
|
1699 |
control.ControlType = controlType; |
|
1700 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1701 |
control.MidPoint = new Point(0, 0); |
|
1702 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1703 |
Point tempPoint = control.EndPoint; |
|
1704 |
|
|
1705 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1706 |
{ |
|
1707 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1708 |
control.EndPoint = tempPoint; |
|
1709 |
} |
|
1710 |
else |
|
1711 |
{ |
|
1712 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1713 |
} |
|
1714 |
|
|
1715 |
|
|
1716 |
control.PointSet = new List<Point> |
|
1717 |
{ |
|
1718 |
control.StartPoint, |
|
1719 |
control.MidPoint, |
|
1720 |
control.EndPoint, |
|
1721 |
}; |
|
1303 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1722 | 1304 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1723 | 1305 |
} |
1724 | 1306 |
} |
... | ... | |
1729 | 1311 |
var control = currentControl as ArrowControl_Multi; |
1730 | 1312 |
if (control != null) |
1731 | 1313 |
{ |
1732 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1733 |
Point tempPoint = control.EndPoint; |
|
1734 |
if (control.MiddlePoint == new Point(0, 0)) |
|
1735 |
{ |
|
1736 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1737 |
{ |
|
1738 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1739 |
//var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1740 |
control.EndPoint = tempPoint; |
|
1741 |
} |
|
1742 |
else |
|
1743 |
{ |
|
1744 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1745 |
} |
|
1746 |
} |
|
1747 |
else |
|
1748 |
{ |
|
1749 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1750 |
{ |
|
1751 |
//var AngleValue = MathSet.returnAngleString(control.MiddlePoint, ref tempPoint, true); |
|
1752 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.MiddlePoint, ref tempPoint, true); |
|
1753 |
control.EndPoint = tempPoint; |
|
1754 |
} |
|
1755 |
else |
|
1756 |
{ |
|
1757 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.MiddlePoint, ref tempPoint, false); |
|
1758 |
} |
|
1759 |
|
|
1760 |
} |
|
1761 |
|
|
1762 |
control.PointSet = new List<Point> |
|
1763 |
{ |
|
1764 |
control.StartPoint, |
|
1765 |
control.MiddlePoint, |
|
1766 |
control.EndPoint, |
|
1767 |
}; |
|
1314 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1768 | 1315 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1769 | 1316 |
} |
1770 | 1317 |
} |
... | ... | |
1772 | 1319 |
|
1773 | 1320 |
case ControlType.Circle: |
1774 | 1321 |
{ |
1775 |
var control = currentControl as CircleControl; |
|
1776 |
|
|
1777 |
if (control != null) |
|
1322 |
if (currentControl != null) |
|
1778 | 1323 |
{ |
1779 |
if (move.mousemode == MouseMode.Drawing) |
|
1780 |
{ |
|
1781 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1782 |
} |
|
1783 |
else |
|
1784 |
{ |
|
1785 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1786 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1787 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1788 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1789 |
|
|
1790 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1791 |
{ |
|
1792 |
Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint); |
|
1793 |
control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y); |
|
1794 |
control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y); |
|
1795 |
control.EndPoint = new Point(setpoint.X, setpoint.Y); |
|
1796 |
} |
|
1797 |
|
|
1798 |
control.PointSet = new List<Point> |
|
1799 |
{ |
|
1800 |
control.StartPoint, |
|
1801 |
control.LeftBottomPoint, |
|
1802 |
control.EndPoint, |
|
1803 |
control.TopRightPoint, |
|
1804 |
}; |
|
1805 |
} |
|
1806 |
|
|
1807 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
|
1808 |
control.Paint = ViewerDataModel.Instance.paintSet; |
|
1809 |
|
|
1324 |
currentControl.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1325 |
(currentControl as CircleControl).DashSize = ViewerDataModel.Instance.DashSize; |
|
1326 |
(currentControl as CircleControl).Paint = ViewerDataModel.Instance.paintSet; |
|
1810 | 1327 |
} |
1811 | 1328 |
} |
1812 | 1329 |
break; |
... | ... | |
1814 | 1331 |
case ControlType.PolygonCloud: |
1815 | 1332 |
{ |
1816 | 1333 |
var control = currentControl as CloudControl; |
1817 |
|
|
1818 | 1334 |
if (control != null) |
1819 | 1335 |
{ |
1820 |
control.isTransOn = true; |
|
1821 |
control.PointSet.RemoveAt(control.PointSet.Count - 1); |
|
1822 |
|
|
1823 |
control.PointSet.Add(currentCanvasDrawingMouseMovePoint); |
|
1824 |
|
|
1825 |
control.SetCloud(); |
|
1826 |
//강인구 추가 |
|
1336 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1827 | 1337 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1828 | 1338 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1829 | 1339 |
} |
... | ... | |
1833 | 1343 |
case ControlType.Triangle: |
1834 | 1344 |
{ |
1835 | 1345 |
var control = currentControl as TriControl; |
1836 |
|
|
1837 | 1346 |
if (control != null) |
1838 | 1347 |
{ |
1839 |
if (move.mousemode == MouseMode.Drawing) |
|
1840 |
{ |
|
1841 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
1842 |
} |
|
1843 |
else |
|
1844 |
{ |
|
1845 |
control.Paint = ViewerDataModel.Instance.paintSet; |
|
1846 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1847 |
|
|
1848 |
if (ViewerDataModel.Instance.checkAxis) |
|
1849 |
{ |
|
1850 |
Point tempPoint = control.EndPoint; |
|
1851 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1852 |
control.EndPoint = tempPoint; |
|
1853 |
} |
|
1854 |
|
|
1855 |
|
|
1856 |
if (ViewerDataModel.Instance.IsPressShift) |
|
1857 |
{ |
|
1858 |
List<Point> Points = GetRegularTrianglePoints(control.StartPoint, control.EndPoint); |
|
1859 |
if (2 == Points.Count()) |
|
1860 |
{ |
|
1861 |
control.MidPoint = Points[0]; |
|
1862 |
control.EndPoint = Points[1]; |
|
1863 |
} |
|
1864 |
} |
|
1865 |
|
|
1866 |
control.PointSet = new List<Point> |
|
1867 |
{ |
|
1868 |
control.StartPoint, |
|
1869 |
control.MidPoint, |
|
1870 |
control.EndPoint, |
|
1871 |
}; |
|
1872 |
} |
|
1873 |
|
|
1348 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1874 | 1349 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1875 | 1350 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1876 | 1351 |
} |
... | ... | |
1880 | 1355 |
case ControlType.ImgControl: |
1881 | 1356 |
{ |
1882 | 1357 |
var control = currentControl as ImgControl; |
1883 |
|
|
1884 | 1358 |
if (control != null) |
1885 | 1359 |
{ |
1886 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1887 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1888 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1889 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1890 |
|
|
1891 |
control.PointSet = new List<Point> |
|
1892 |
{ |
|
1893 |
control.StartPoint, |
|
1894 |
control.LeftBottomPoint, |
|
1895 |
control.EndPoint, |
|
1896 |
control.TopRightPoint, |
|
1897 |
}; |
|
1360 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1898 | 1361 |
} |
1899 | 1362 |
} |
1900 | 1363 |
break; |
... | ... | |
1902 | 1365 |
case ControlType.Date: |
1903 | 1366 |
{ |
1904 | 1367 |
var control = currentControl as DateControl; |
1905 |
|
|
1906 | 1368 |
if (control != null) |
1907 | 1369 |
{ |
1908 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
1909 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1910 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
1911 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
1912 |
//control.Text = DateTime.Now.ToString("yyyy-MM-dd"); |
|
1913 |
|
|
1914 |
control.PointSet = new List<Point> |
|
1915 |
{ |
|
1916 |
control.StartPoint, |
|
1917 |
control.LeftBottomPoint, |
|
1918 |
control.EndPoint, |
|
1919 |
control.TopRightPoint, |
|
1920 |
}; |
|
1370 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1921 | 1371 |
} |
1922 | 1372 |
} |
1923 | 1373 |
break; |
1924 | 1374 |
|
1925 | 1375 |
case ControlType.ArrowTextControl: |
1926 |
{ |
|
1927 |
var control = currentControl as ArrowTextControl; |
|
1928 |
|
|
1929 |
if (control != null) |
|
1930 |
{ |
|
1931 |
control.EndPoint = currentCanvasDrawingMouseMovePoint; |
|
1932 |
Point tempPoint = control.EndPoint; |
|
1933 |
|
|
1934 |
control.MidPoint = new Point(control.EndPoint.X - 100, control.EndPoint.Y - 100); |
|
1935 |
|
|
1936 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1937 |
{ |
|
1938 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1939 |
control.EndPoint = tempPoint; |
|
1940 |
} |
|
1941 |
else |
|
1942 |
{ |
|
1943 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1944 |
} |
|
1945 |
control.MidPoint = MathSet.getMiddlePoint(control.StartPoint, control.EndPoint); |
|
1946 |
|
|
1947 |
control.PointSet = new List<Point> |
|
1948 |
{ |
|
1949 |
control.StartPoint, |
|
1950 |
control.MidPoint, |
|
1951 |
control.EndPoint, |
|
1952 |
}; |
|
1953 |
} |
|
1954 |
} |
|
1955 |
break; |
|
1956 |
|
|
1957 | 1376 |
case ControlType.ArrowTransTextControl: |
1958 |
{ |
|
1959 |
var control = currentControl as ArrowTextControl; |
|
1960 |
|
|
1961 |
if (control != null) |
|
1962 |
{ |
|
1963 |
control.EndPoint = currentCanvasDrawingMouseMovePoint; |
|
1964 |
Point tempPoint = control.EndPoint; |
|
1965 |
//control.MidPoint = currentCanvasDrawingMouseMovePoint; |
|
1966 |
|
|
1967 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1968 |
{ |
|
1969 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1970 |
control.EndPoint = tempPoint; |
|
1971 |
} |
|
1972 |
else |
|
1973 |
{ |
|
1974 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
1975 |
} |
|
1976 |
control.MidPoint = MathSet.getMiddlePoint(control.StartPoint, control.EndPoint); |
|
1977 |
control.isFixed = true; |
|
1978 |
|
|
1979 |
control.PointSet = new List<Point> |
|
1980 |
{ |
|
1981 |
control.StartPoint, |
|
1982 |
control.MidPoint, |
|
1983 |
control.EndPoint, |
|
1984 |
}; |
|
1985 |
} |
|
1986 |
} |
|
1987 |
break; |
|
1988 |
|
|
1989 | 1377 |
case ControlType.ArrowTextBorderControl: |
1990 |
{ |
|
1991 |
var control = currentControl as ArrowTextControl; |
|
1992 |
|
|
1993 |
if (control != null) |
|
1994 |
{ |
|
1995 |
control.EndPoint = currentCanvasDrawingMouseMovePoint; |
|
1996 |
Point tempPoint = control.EndPoint; |
|
1997 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
1998 |
{ |
|
1999 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
2000 |
control.EndPoint = tempPoint; |
|
2001 |
} |
|
2002 |
else |
|
2003 |
{ |
|
2004 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
2005 |
} |
|
2006 |
control.MidPoint = MathSet.getMiddlePoint(control.StartPoint, control.EndPoint); |
|
2007 |
control.PointSet = new List<Point> |
|
2008 |
{ |
|
2009 |
control.StartPoint, |
|
2010 |
control.MidPoint, |
|
2011 |
control.EndPoint, |
|
2012 |
}; |
|
2013 |
} |
|
2014 |
|
|
2015 |
} |
|
2016 |
break; |
|
2017 | 1378 |
case ControlType.ArrowTransTextBorderControl: |
2018 |
{ |
|
2019 |
var control = currentControl as ArrowTextControl; |
|
2020 |
|
|
2021 |
if (control != null) |
|
2022 |
{ |
|
2023 |
control.isFixed = true; |
|
2024 |
control.EndPoint = currentCanvasDrawingMouseMovePoint; |
|
2025 |
Point tempPoint = control.EndPoint; |
|
2026 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
2027 |
{ |
|
2028 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
2029 |
control.EndPoint = tempPoint; |
|
2030 |
} |
|
2031 |
else |
|
2032 |
{ |
|
2033 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
2034 |
} |
|
2035 |
|
|
2036 |
control.MidPoint = MathSet.getMiddlePoint(control.StartPoint, control.EndPoint); |
|
2037 |
control.PointSet = new List<Point> |
|
2038 |
{ |
|
2039 |
control.StartPoint, |
|
2040 |
control.MidPoint, |
|
2041 |
control.EndPoint, |
|
2042 |
}; |
|
2043 |
} |
|
2044 |
|
|
2045 |
} |
|
2046 |
break; |
|
2047 | 1379 |
case ControlType.ArrowTextCloudControl: |
2048 |
{ |
|
2049 |
var control = currentControl as ArrowTextControl; |
|
2050 |
|
|
2051 |
if (control != null) |
|
2052 |
{ |
|
2053 |
control.EndPoint = currentCanvasDrawingMouseMovePoint; |
|
2054 |
Point tempPoint = control.EndPoint; |
|
2055 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
2056 |
{ |
|
2057 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
2058 |
control.EndPoint = tempPoint; |
|
2059 |
} |
|
2060 |
else |
|
2061 |
{ |
|
2062 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
2063 |
} |
|
2064 |
control.MidPoint = MathSet.getMiddlePoint(control.StartPoint, control.EndPoint); |
|
2065 |
control.PointSet = new List<Point> |
|
2066 |
{ |
|
2067 |
control.StartPoint, |
|
2068 |
control.MidPoint, |
|
2069 |
control.EndPoint, |
|
2070 |
}; |
|
2071 |
} |
|
2072 |
|
|
2073 |
} |
|
2074 |
break; |
|
2075 | 1380 |
case ControlType.ArrowTransTextCloudControl: |
2076 | 1381 |
{ |
2077 | 1382 |
var control = currentControl as ArrowTextControl; |
2078 |
|
|
2079 | 1383 |
if (control != null) |
2080 | 1384 |
{ |
2081 |
control.isFixed = true; |
|
2082 |
control.EndPoint = currentCanvasDrawingMouseMovePoint; |
|
2083 |
Point tempPoint = control.EndPoint; |
|
2084 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
2085 |
{ |
|
2086 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
2087 |
control.EndPoint = tempPoint; |
|
2088 |
} |
|
2089 |
else |
|
2090 |
{ |
|
2091 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false); |
|
2092 |
} |
|
2093 |
control.MidPoint = MathSet.getMiddlePoint(control.StartPoint, control.EndPoint); |
|
2094 |
control.PointSet = new List<Point> |
|
2095 |
{ |
|
2096 |
control.StartPoint, |
|
2097 |
control.MidPoint, |
|
2098 |
control.EndPoint, |
|
2099 |
}; |
|
1385 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
2100 | 1386 |
} |
2101 |
|
|
2102 | 1387 |
} |
2103 | 1388 |
break; |
2104 | 1389 |
case ControlType.PolygonControl: |
2105 | 1390 |
case ControlType.ChainLine: |
2106 | 1391 |
{ |
2107 | 1392 |
var control = currentControl as PolygonControl; |
2108 |
|
|
2109 | 1393 |
if (control != null) |
2110 | 1394 |
{ |
2111 |
control.PointSet.RemoveAt(control.PointSet.Count - 1); |
|
2112 |
Point tempPoint = currentCanvasDrawingMouseMovePoint; |
|
2113 |
if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift) |
|
2114 |
{ |
|
2115 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.PointSet[control.PointSet.Count - 1], ref tempPoint, true); |
|
2116 |
} |
|
2117 |
control.PointSet.Add(currentCanvasDrawingMouseMovePoint); |
|
2118 |
|
|
1395 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
2119 | 1396 |
control.Paint = ViewerDataModel.Instance.paintSet; |
2120 | 1397 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
2121 | 1398 |
control.Paint = ViewerDataModel.Instance.paintSet; |
2122 |
control.updateControl(); |
|
2123 | 1399 |
} |
2124 | 1400 |
} |
2125 | 1401 |
break; |
2126 |
//강인구 추가 |
|
2127 | 1402 |
case ControlType.Sign: |
2128 | 1403 |
{ |
2129 | 1404 |
var control = currentControl as SignControl; |
2130 |
|
|
2131 | 1405 |
if (control != null) |
2132 | 1406 |
{ |
2133 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
2134 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2135 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
2136 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2137 |
|
|
2138 |
if (control.StartPoint != control.EndPoint && control.SignImage == null) |
|
2139 |
{ |
|
2140 |
var _sign = GetUserSign.GetSign(App.ViewInfo.UserID, App.ViewInfo.ProjectNO); |
|
2141 |
byte[] imageBytes = System.Convert.FromBase64String(_sign); |
|
2142 |
System.IO.MemoryStream stream = new System.IO.MemoryStream(); |
|
2143 |
stream.Write(imageBytes, 0, imageBytes.Length); |
|
2144 |
stream.Position = 0; |
|
2145 |
System.Drawing.Image img = System.Drawing.Image.FromStream(stream); |
|
2146 |
BitmapImage returnImage = new BitmapImage(); |
|
2147 |
returnImage.BeginInit(); |
|
2148 |
System.IO.MemoryStream ms = new System.IO.MemoryStream(); |
|
2149 |
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png); |
|
2150 |
ms.Seek(0, System.IO.SeekOrigin.Begin); |
|
2151 |
returnImage.StreamSource = ms; |
|
2152 |
returnImage.EndInit(); |
|
2153 |
stream.Close(); |
|
2154 |
|
|
2155 |
control.SignImage = returnImage; |
|
2156 |
} |
|
2157 |
control.PointSet = new List<Point> |
|
2158 |
{ |
|
2159 |
control.StartPoint, |
|
2160 |
control.LeftBottomPoint, |
|
2161 |
control.EndPoint, |
|
2162 |
control.TopRightPoint, |
|
2163 |
}; |
|
1407 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
2164 | 1408 |
} |
2165 | 1409 |
} |
2166 | 1410 |
break; |
2167 |
//TODO: 강인구 추가 |
|
2168 | 1411 |
case ControlType.Symbol: |
2169 | 1412 |
{ |
2170 | 1413 |
var control = currentControl as SymControl; |
2171 |
|
|
2172 | 1414 |
if (control != null) |
2173 | 1415 |
{ |
2174 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
2175 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2176 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
2177 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2178 |
control.LineSize = ViewerDataModel.Instance.LineSize + 3; |
|
2179 |
control.StrokeColor = new SolidColorBrush(Colors.Red); |
|
2180 |
|
|
2181 |
if (control.StartPoint != control.EndPoint) |
|
2182 |
{ |
|
2183 |
if (control.PathData == null) |
|
2184 |
{ |
|
2185 |
using (StringToPathConverter Convert = new StringToPathConverter()) |
|
2186 |
{ |
|
2187 |
control.PathData = Convert.Convert("M-5,5L0,0L20,30L40,-20 "); |
|
2188 |
} |
|
2189 |
} |
|
2190 |
} |
|
2191 |
|
|
2192 |
control.PointSet = new List<Point> |
|
2193 |
{ |
|
2194 |
control.StartPoint, |
|
2195 |
control.LeftBottomPoint, |
|
2196 |
control.EndPoint, |
|
2197 |
control.TopRightPoint, |
|
2198 |
}; |
|
1416 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
2199 | 1417 |
} |
2200 | 1418 |
} |
2201 | 1419 |
break; |
2202 |
///TODO: |
|
2203 | 1420 |
case ControlType.Stamp: |
2204 | 1421 |
{ |
2205 | 1422 |
var control = currentControl as SymControlN; |
2206 |
|
|
2207 | 1423 |
if (control != null) |
2208 | 1424 |
{ |
2209 |
|
|
2210 |
if (control.StartPoint == control.EndPoint) |
|
2211 |
{ |
|
2212 |
//string appovalData = ""; |
|
2213 |
|
|
2214 |
var xamlData = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString_NonPrefix(App.SystemInfo.STAMP); |
|
2215 |
xamlData = xamlData.Replace("daelim", "DAELIM"); |
|
2216 |
|
|
2217 |
|
|
2218 |
//object obj = System.Windows.Markup.XamlReader.Load(xamlData); |
|
2219 |
|
|
2220 |
System.IO.MemoryStream stream = new System.IO.MemoryStream(); |
|
2221 |
System.IO.StreamWriter writer = new System.IO.StreamWriter(stream); |
|
2222 |
writer.Write(xamlData); |
|
2223 |
writer.Flush(); |
|
2224 |
stream.Position = 0; |
|
2225 |
|
|
2226 |
control.StrokeColor = new SolidColorBrush(Colors.Red); |
|
2227 |
object obj = System.Windows.Markup.XamlReader.Load(stream); |
|
2228 |
UIElement ob = obj as UIElement; |
|
2229 |
|
|
2230 |
//control.ApplyTemplate(); |
|
2231 |
|
|
2232 |
control.SetViewBox(); |
|
2233 |
control.PathXathData = App.SystemInfo.STAMP; |
|
2234 |
control.Base_ViewBox.Child = ob; |
|
2235 |
} |
|
2236 |
|
|
2237 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
2238 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2239 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
2240 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2241 |
//control.LineSize = ViewerDataModel.Instance.LineSize + 3; |
|
2242 |
|
|
2243 |
|
|
2244 |
control.PointSet = new List<Point> |
|
2245 |
{ |
|
2246 |
control.StartPoint, |
|
2247 |
control.LeftBottomPoint, |
|
2248 |
control.EndPoint, |
|
2249 |
control.TopRightPoint, |
|
2250 |
}; |
|
1425 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
2251 | 1426 |
} |
2252 | 1427 |
} |
2253 | 1428 |
break; |
1429 |
case ControlType.Rectangle: |
|
2254 | 1430 |
case ControlType.Mark: |
2255 | 1431 |
{ |
2256 | 1432 |
var control = currentControl as RectangleControl; |
2257 |
|
|
2258 | 1433 |
if (control != null) |
2259 | 1434 |
{ |
2260 |
if (move.mousemode == MouseMode.Drawing) |
|
2261 |
{ |
|
2262 |
//move.control_Move(ControlList, true, moveX, moveY); |
|
2263 |
} |
|
2264 |
else |
|
2265 |
{ |
|
2266 |
control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y); |
|
2267 |
control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2268 |
control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y); |
|
2269 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
|
2270 |
|
|
2271 |
|
|
2272 |
control.PointSet = new List<Point> |
|
2273 |
{ |
|
2274 |
control.StartPoint, |
|
2275 |
control.LeftBottomPoint, |
|
2276 |
control.EndPoint, |
|
2277 |
control.TopRightPoint, |
|
2278 |
}; |
|
2279 |
} |
|
2280 |
|
|
2281 |
//강인구 추가 |
|
2282 |
control.Paint = PaintSet.Fill; |
|
1435 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
|
1436 |
if(control.ControlType == ControlType.Mark) control.Paint = PaintSet.Fill; |
|
2283 | 1437 |
} |
2284 | 1438 |
} |
2285 | 1439 |
break; |
... | ... | |
2386 | 1540 |
} |
2387 | 1541 |
else |
2388 | 1542 |
{ |
2389 |
//var hitRect = new Rect(currentCanvasDrawingMouseMovePoint.X - 10, currentCanvasDrawingMouseMovePoint.Y - 10, 20, 20); |
|
2390 |
|
|
2391 |
//VisualTreeHelper.HitTest(this.drawingRotateCanvas, null, MyCallback, |
|
2392 |
// new GeometryHitTestParameters(new RectangleGeometry(hitRect))); |
|
2393 |
|
|
2394 |
//if (hitList.Count > 0) |
|
2395 |
//{ |
|
2396 |
|
|
2397 |
//} |
|
2398 |
|
|
2399 |
#region 조건 설정 : firstCondition |
|
2400 |
//GeneralTransform generalTransform = this.DeepLayer._BaseLayer.TransformToVisual(Application.Current.RootVisual); |
|
2401 |
//pnts = generalTransform.Transform(pnts); |
|
2402 |
//Rect areaInAbsoluteCoordinates = new Rect(pnts.X - 10, pnts.Y - 10, 20, 20); |
|
2403 |
//var firstCondition = (from kkk in VisualTreeHelper.FindElementsInHostCoordinates(areaInAbsoluteCoordinates, |
|
2404 |
// this.DeepLayer._BaseLayer).ToObservable() |
|
2405 |
// where String.IsNullOrEmpty((kkk as FrameworkElement).Name) |
|
2406 |
// select kkk).FirstOrDefault(); |
|
2407 |
|
|
2408 |
//var canvas = LogicalTreeHelper.FindLogicalNode(this, "drawingRotateCanvas") as Canvas; |
|
2409 |
//if (canvas !=null) |
|
2410 |
//{ |
|
2411 |
// foreach (var item in (canvas.Children[0] as ItemsControl).Items) |
|
2412 |
// { |
|
2413 |
// UIElement uiElement = (UIElement)(canvas.Children[0] as ItemsControl).ItemContainerGenerator.ContainerFromItem(item); |
|
2414 |
// if (uiElement!=null) |
|
2415 |
// { |
|
2416 |
// uiElement.InputHitTest(currentCanvasDrawingMouseMovePoint). |
|
2417 |
// } |
|
2418 |
// } |
|
2419 |
//} |
|
2420 |
|
|
2421 |
//EllipseGeometry expandedHitTestArea = new EllipseGeometry(currentCanvasDrawingMouseMovePoint, 10.0, 10.0); |
|
2422 |
//hitResultsList.Clear(); |
|
2423 |
|
|
2424 |
#endregion |
|
2425 | 1543 |
} |
2426 | 1544 |
} |
2427 | 1545 |
|
... | ... | |
3386 | 2504 |
currentControl = new ClipWhiteControl |
3387 | 2505 |
{ |
3388 | 2506 |
Background = new SolidColorBrush(Colors.Black), |
2507 |
StartPoint = this.canvasDrawingMouseDownPoint, |
|
3389 | 2508 |
ControlType = ControlType.ClipWhite |
3390 | 2509 |
}; |
3391 | 2510 |
|
... | ... | |
3424 | 2543 |
currentControl = new RectangleControl |
3425 | 2544 |
{ |
3426 | 2545 |
Background = new SolidColorBrush(Colors.Black), |
2546 |
StartPoint = this.canvasDrawingMouseDownPoint, |
|
3427 | 2547 |
ControlType = ControlType.Rectangle |
3428 | 2548 |
}; |
3429 | 2549 |
|
... | ... | |
3462 | 2582 |
{ |
3463 | 2583 |
currentControl = new RectCloudControl |
3464 | 2584 |
{ |
2585 |
StartPoint = this.canvasDrawingMouseDownPoint, |
|
2586 |
ControlType = ControlType.RectCloud, |
|
3465 | 2587 |
Background = new SolidColorBrush(Colors.Black) |
3466 | 2588 |
}; |
3467 | 2589 |
|
... | ... | |
3496 | 2618 |
{ |
3497 | 2619 |
currentControl = new CircleControl |
3498 | 2620 |
{ |
2621 |
StartPoint = this.canvasDrawingMouseDownPoint, |
|
2622 |
LeftBottomPoint = this.canvasDrawingMouseDownPoint, |
|
3499 | 2623 |
Background = new SolidColorBrush(Colors.Black) |
3500 | 2624 |
}; |
3501 | 2625 |
|
... | ... | |
3574 | 2698 |
{ |
3575 | 2699 |
currentControl = new LineControl |
3576 | 2700 |
{ |
2701 |
ControlType = ControlType.SingleLine, |
|
2702 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3577 | 2703 |
Background = new SolidColorBrush(Colors.Black) |
3578 | 2704 |
}; |
3579 | 2705 |
|
... | ... | |
3610 | 2736 |
{ |
3611 | 2737 |
currentControl = new LineControl |
3612 | 2738 |
{ |
2739 |
ControlType = ControlType.CancelLine, |
|
2740 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3613 | 2741 |
Background = new SolidColorBrush(Colors.Black) |
3614 | 2742 |
}; |
3615 | 2743 |
|
... | ... | |
3646 | 2774 |
{ |
3647 | 2775 |
currentControl = new LineControl |
3648 | 2776 |
{ |
2777 |
ControlType = ControlType.ArrowLine, |
|
2778 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3649 | 2779 |
Background = new SolidColorBrush(Colors.Black) |
3650 | 2780 |
}; |
3651 | 2781 |
|
... | ... | |
3682 | 2812 |
{ |
3683 | 2813 |
currentControl = new LineControl |
3684 | 2814 |
{ |
2815 |
ControlType = ControlType.TwinLine, |
|
2816 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3685 | 2817 |
Background = new SolidColorBrush(Colors.Black) |
3686 | 2818 |
}; |
3687 | 2819 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
... | ... | |
3716 | 2848 |
{ |
3717 | 2849 |
currentControl = new LineControl |
3718 | 2850 |
{ |
2851 |
ControlType = ControlType.DimLine, |
|
2852 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3719 | 2853 |
Background = new SolidColorBrush(Colors.Black) |
3720 | 2854 |
}; |
3721 | 2855 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
... | ... | |
3810 | 2944 |
{ |
3811 | 2945 |
currentControl = new ArcControl |
3812 | 2946 |
{ |
2947 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3813 | 2948 |
Background = new SolidColorBrush(Colors.Black) |
3814 | 2949 |
}; |
3815 | 2950 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
3854 | 2989 |
{ |
3855 | 2990 |
currentControl = new ArrowArcControl |
3856 | 2991 |
{ |
2992 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3857 | 2993 |
Background = new SolidColorBrush(Colors.Black) |
3858 | 2994 |
}; |
3859 | 2995 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
4012 | 3148 |
if (extension == ".PNG" || extension == ".JPEG" || extension == ".GIF" || extension == ".BMP" || extension == ".JPG" || extension == ".SVG") |
4013 | 3149 |
{ |
4014 | 3150 |
Image img = new Image(); |
4015 |
//img.Source = new BitmapImage(new Uri(filename)); |
|
4016 | 3151 |
if (filename.Contains(".svg")) |
4017 | 3152 |
{ |
4018 | 3153 |
byte[] imageData = null; |
... | ... | |
4090 | 3225 |
{ |
4091 | 3226 |
currentControl = new DateControl |
4092 | 3227 |
{ |
3228 |
StartPoint = canvasDrawingMouseDownPoint, |
|
4093 | 3229 |
Background = new SolidColorBrush(Colors.Black) |
4094 | 3230 |
}; |
4095 | 3231 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
4600 | 3736 |
{ |
4601 | 3737 |
Background = new SolidColorBrush(Colors.Black), |
4602 | 3738 |
UserNumber = App.ViewInfo.UserID, |
3739 |
ProjectNO = App.ViewInfo.ProjectNO, |
|
4603 | 3740 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
4604 | 3741 |
EndPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
4605 | 3742 |
ControlType = ControlType.Sign |
... | ... | |
4647 | 3784 |
{ |
4648 | 3785 |
currentControl = new RectangleControl |
4649 | 3786 |
{ |
3787 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
4650 | 3788 |
Background = new SolidColorBrush(Colors.Black), |
3789 |
ControlType = ControlType.Mark , |
|
4651 | 3790 |
Paint = PaintSet.Fill |
4652 | 3791 |
}; |
4653 | 3792 |
|
... | ... | |
4665 | 3804 |
{ |
4666 | 3805 |
if (e.LeftButton == MouseButtonState.Pressed) |
4667 | 3806 |
{ |
4668 |
//if (IsDrawingEnable(canvasZoomPanningMouseDownPoint)) |
|
4669 |
//{ |
|
4670 |
if (currentControl is SymControl) |
|
3807 |
if (currentControl is SymControl) |
|
3808 |
{ |
|
3809 |
//20180906 LJY TEST IsRotationDrawingEnable |
|
3810 |
if (IsGetoutpoint((currentControl as SymControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault())) |
|
4671 | 3811 |
{ |
4672 |
//20180906 LJY TEST IsRotationDrawingEnable |
|
4673 |
if (IsGetoutpoint((currentControl as SymControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault())) |
|
4674 |
{ |
|
4675 |
return; |
|
4676 |
} |
|
4677 |
CreateCommand.Instance.Execute(currentControl); |
|
4678 |
currentControl = null; |
|
4679 |
|
|
4680 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
|
3812 |
return; |
|
4681 | 3813 |
} |
4682 |
else |
|
3814 |
CreateCommand.Instance.Execute(currentControl); |
|
3815 |
currentControl = null; |
|
3816 |
|
|
3817 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
|
3818 |
} |
|
3819 |
else |
|
3820 |
{ |
|
3821 |
currentControl = new SymControl |
|
4683 | 3822 |
{ |
4684 |
currentControl = new SymControl |
|
4685 |
{ |
|
4686 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
4687 |
Background = new SolidColorBrush(Colors.Black), |
|
4688 |
ControlType = ControlType.Symbol |
|
4689 |
}; |
|
3823 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
|
3824 |
Background = new SolidColorBrush(Colors.Black), |
|
3825 |
LineSize = ViewerDataModel.Instance.LineSize + 3, |
|
3826 |
ControlType = ControlType.Symbol |
|
3827 |
}; |
|
4690 | 3828 |
|
4691 |
currentControl.IsNew = true;
|
|
4692 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId;
|
|
4693 |
currentControl.CommentID = Commons.shortGuid();
|
|
4694 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
|
|
3829 |
currentControl.IsNew = true; |
|
3830 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
|
3831 |
currentControl.CommentID = Commons.shortGuid(); |
|
3832 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
|
4695 | 3833 |
|
4696 |
//20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정
|
|
4697 |
(currentControl as SymControl).Angle -= rotate.Angle;
|
|
3834 |
//20180903 LJY 회전된 방향으로 화면에 출력되지 않는 문제 수정 |
|
3835 |
(currentControl as SymControl).Angle -= rotate.Angle; |
|
4698 | 3836 |
} |
4699 | 3837 |
//} |
4700 | 3838 |
} |
... | ... | |
4726 | 3864 |
{ |
4727 | 3865 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y), |
4728 | 3866 |
Background = new SolidColorBrush(Colors.Black), |
3867 |
STAMP = App.SystemInfo.STAMP, |
|
4729 | 3868 |
ControlType = ControlType.Stamp |
4730 | 3869 |
}; |
4731 | 3870 |
|
내보내기 Unified diff