개정판 7a3b7ef3
polygon생성시 Point가 3개 이상이고 Mouse Point가 Start Point 지점에 맞닿으면 Complete
Change-Id: Ic2f25f3c486779e17ab07f10ab1e97c4ac53894b
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
1833 | 1833 |
if (controlType != ControlType.PenControl) |
1834 | 1834 |
{ |
1835 | 1835 |
currentControl.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift); |
1836 |
|
|
1837 |
|
|
1838 |
if(currentControl is MarkupToPDF.Controls.Polygon.PolygonControl && ((MarkupToPDF.Controls.Polygon.PolygonControl)currentControl).IsCompleted) |
|
1839 |
{ |
|
1840 |
var vControl = currentControl as MarkupToPDF.Controls.Polygon.PolygonControl; |
|
1841 |
var firstPoint = vControl.PointSet.First(); |
|
1842 |
vControl.DashSize = ViewerDataModel.Instance.DashSize; |
|
1843 |
vControl.LineSize = ViewerDataModel.Instance.LineSize; |
|
1844 |
vControl.PointSet.Add(firstPoint); |
|
1845 |
|
|
1846 |
vControl.ApplyOverViewData(); |
|
1847 |
|
|
1848 |
CreateCommand.Instance.Execute(currentControl); |
|
1849 |
vControl.UpdateControl(); |
|
1850 |
currentControl = null; |
|
1851 |
} |
|
1852 |
else if(currentControl is MarkupToPDF.Controls.Polygon.CloudControl && ((MarkupToPDF.Controls.Polygon.CloudControl)currentControl).IsCompleted) |
|
1853 |
{ |
|
1854 |
var vControl = currentControl as MarkupToPDF.Controls.Polygon.CloudControl; |
|
1855 |
|
|
1856 |
CreateCommand.Instance.Execute(currentControl); |
|
1857 |
|
|
1858 |
vControl.isTransOn = true; |
|
1859 |
var firstPoint = vControl.PointSet.First(); |
|
1860 |
|
|
1861 |
vControl.PointSet.Add(firstPoint); |
|
1862 |
vControl.DrawingCloud(); |
|
1863 |
vControl.ApplyOverViewData(); |
|
1864 |
|
|
1865 |
currentControl = null; |
|
1866 |
} |
|
1867 |
|
|
1836 | 1868 |
ViewerDataModel.Instance.IsMarkupUpdate = true; |
1837 | 1869 |
} |
1838 | 1870 |
|
MarkupToPDF/Controls/Polygon/CloudControl.cs | ||
---|---|---|
1015 | 1015 |
CommentAngle = MathSet.returnAngle(this.StartPoint, ref tmp, bAxisLocked); |
1016 | 1016 |
} |
1017 | 1017 |
|
1018 |
this.PointSet.Add(tmp); |
|
1018 |
if (this.PointSet.Count > 2 && StartPoint == tmp) |
|
1019 |
{ |
|
1020 |
this.IsCompleted = true; |
|
1019 | 1021 |
|
1020 |
this.SetCloud(); |
|
1022 |
|
|
1023 |
//var firstPoint = this.PointSet.First(); |
|
1024 |
//this.PointSet.Add(firstPoint); |
|
1025 |
|
|
1026 |
//this.ApplyOverViewData(); |
|
1027 |
|
|
1028 |
this.SetCloud(); |
|
1029 |
} |
|
1030 |
else |
|
1031 |
{ |
|
1032 |
this.PointSet.Add(tmp); |
|
1033 |
|
|
1034 |
this.SetCloud(); |
|
1035 |
} |
|
1021 | 1036 |
} |
1022 | 1037 |
|
1023 | 1038 |
/// <summary> |
MarkupToPDF/Controls/Polygon/PolygonControl.cs | ||
---|---|---|
10 | 10 |
using System.Threading.Tasks; |
11 | 11 |
using System.Windows; |
12 | 12 |
using System.Windows.Controls; |
13 |
using System.Windows.Forms; |
|
14 |
using System.Windows.Input; |
|
13 | 15 |
using System.Windows.Media; |
14 | 16 |
using System.Windows.Shapes; |
15 | 17 |
|
... | ... | |
500 | 502 |
CommentAngle = MathSet.returnAngle(this.PointSet[this.PointSet.Count - 1], ref tmp, bAxisLocked); |
501 | 503 |
} |
502 | 504 |
|
503 |
this.PointSet.Add(tmp); |
|
505 |
if (this.PointSet.Count > 2 && StartPoint == tmp) |
|
506 |
{ |
|
507 |
this.IsCompleted = true; |
|
504 | 508 |
|
505 |
this.UpdateControl(); |
|
509 |
|
|
510 |
//var firstPoint = this.PointSet.First(); |
|
511 |
//this.PointSet.Add(firstPoint); |
|
512 |
|
|
513 |
//this.ApplyOverViewData(); |
|
514 |
|
|
515 |
UpdateControl(); |
|
516 |
} |
|
517 |
else |
|
518 |
{ |
|
519 |
|
|
520 |
this.PointSet.Add(tmp); |
|
521 |
|
|
522 |
this.UpdateControl(); |
|
523 |
} |
|
506 | 524 |
} |
507 | 525 |
|
508 | 526 |
/// <summary> |
내보내기 Unified diff