개정판 6a659fd9
dev issue #000 : move logic
Change-Id: I5dc7221579e0edf6ec3ab7cc4d9c395c59c71cc6
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
964 | 964 |
switch (degree) |
965 | 965 |
{ |
966 | 966 |
case 0: |
967 |
textBox1.Move(d1X2, d1Y2, crossX, crossY);
|
|
968 |
textBox2.Move(d2X1, d2Y2, crossX, crossY);
|
|
967 |
MoveDependency(dependency1, d1X2, d1Y2, crossX, crossY);
|
|
968 |
MoveDependency(dependency2, d2X1, d2Y2, crossX, crossY);
|
|
969 | 969 |
break; |
970 | 970 |
case 90: |
971 |
textBox1.Move(d1X1, d1Y2, crossX, crossY);
|
|
972 |
textBox2.Move(d2X1, d2Y1, crossX, crossY);
|
|
971 |
MoveDependency(dependency1, d1X1, d1Y2, crossX, crossY);
|
|
972 |
MoveDependency(dependency2, d2X1, d2Y1, crossX, crossY);
|
|
973 | 973 |
break; |
974 | 974 |
case 180: |
975 |
textBox1.Move(d1X2, d1Y1, crossX, crossY);
|
|
976 |
textBox2.Move(d2X1, d2Y1, crossX, crossY);
|
|
975 |
MoveDependency(dependency1, d1X2, d1Y1, crossX, crossY);
|
|
976 |
MoveDependency(dependency2, d2X1, d2Y1, crossX, crossY);
|
|
977 | 977 |
break; |
978 | 978 |
case 270: |
979 |
textBox1.Move(d1X2, d1Y2, crossX, crossY);
|
|
980 |
textBox2.Move(d2X2, d2Y1, crossX, crossY);
|
|
979 |
MoveDependency(dependency1, d1X2, d1Y2, crossX, crossY);
|
|
980 |
MoveDependency(dependency2, d2X2, d2Y1, crossX, crossY);
|
|
981 | 981 |
break; |
982 | 982 |
default: |
983 | 983 |
break; |
984 | 984 |
} |
985 | 985 |
} |
986 |
private void MoveDependency(DependencyObject dependency, double xFrom, double yFrom, double xTo, double yTo) |
|
987 |
{ |
|
988 |
foreach (var item in dependency.DrawingObjects) |
|
989 |
{ |
|
990 |
DrawingObjectBaseEx ex = item as DrawingObjectBaseEx; |
|
991 |
if (ex != null) |
|
992 |
ex.Move(xFrom, yFrom, xTo, yTo); |
|
993 |
} |
|
994 |
} |
|
986 | 995 |
private string GetDrawingItemType(DependencyObject dependency) |
987 | 996 |
{ |
988 | 997 |
string result = string.Empty; |
내보내기 Unified diff