개정판 c7fde400
Issue #0020 - Symbol추가시 위치가 다른곳으로 가는 현상 수정
Change-Id: I0f49fd5e529e079224d2eb0809850e952fe8cae2
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
1173 | 1173 |
{ |
1174 | 1174 |
this.TranslateItem(dx, dy, item); |
1175 | 1175 |
} |
1176 |
|
|
1177 |
this.BorderUpdate(); |
|
1176 | 1178 |
})); |
1177 |
this.BorderUpdate(); |
|
1178 | 1179 |
} |
1179 | 1180 |
|
1180 | 1181 |
/// <summary> |
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
853 | 853 |
MarkupInfoItemSmall gaza = clickButtonItem.CommandParameter as MarkupInfoItemSmall; |
854 | 854 |
MarkupList.SelectedItem = gaza; |
855 | 855 |
|
856 |
GotoMarkup(new[] { gaza.Id }); |
|
856 |
MarkupHelper.GotoMarkup(new[] { gaza.Id });
|
|
857 | 857 |
} |
858 | 858 |
catch (Exception ex) |
859 | 859 |
{ |
... | ... | |
862 | 862 |
} |
863 | 863 |
} |
864 | 864 |
|
865 |
/// <summary> |
|
866 |
/// 선택된 마크업의 ID리스트를 받아 해당 페이지로 이동 후 GotoSelectedMarkup 호출 |
|
867 |
/// </summary> |
|
868 |
/// <param name="CommentIdList"></param> |
|
869 |
private void GotoMarkup(IEnumerable<string> CommentIdList) |
|
870 |
{ |
|
871 |
var instance = Common.ViewerDataModel.Instance; |
|
872 |
|
|
873 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
|
874 |
|
|
875 |
var commentList = instance._markupInfoList.Where(x => x.MarkupList != null).SelectMany(x => x.MarkupList).Where(f => f.ID == CommentIdList.First()); |
|
876 |
|
|
877 |
if (commentList.Count() > 0) |
|
878 |
{ |
|
879 |
//하단 그리드의 markup list에서 commentid가 포함된 markupinfo를 선택되게 한다. |
|
880 |
#region markup list grid select items |
|
881 |
|
|
882 |
var infoItem = instance._markupInfoList.Where(x => x.MarkupList != null).Where(f => f.MarkupList.Count(y => y == commentList.First()) > 0); |
|
883 |
|
|
884 |
if (infoItem.Count() > 0) |
|
885 |
{ |
|
886 |
|
|
887 |
var gridMarkup = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.gridViewMarkup; |
|
888 |
gridMarkup.SelectedItems.Clear(); |
|
889 |
gridMarkup.SelectedItems.Add(infoItem.First()); |
|
890 |
} |
|
891 |
|
|
892 |
#endregion |
|
893 |
|
|
894 |
var pageNavigator = instance.SystemMain.dzMainMenu.pageNavigator; |
|
895 |
|
|
896 |
if (pageNavigator.CurrentPage.PageNumber == commentList.First().PageNumber) |
|
897 |
{ |
|
898 |
GotoSelectedMarkup(CommentIdList); |
|
899 |
} |
|
900 |
else |
|
901 |
{ |
|
902 |
EventHandler<Sample.PageChangeEventArgs> handler = null; |
|
903 |
|
|
904 |
handler = (snd, evt) => |
|
905 |
{ |
|
906 |
GotoSelectedMarkup(CommentIdList); |
|
907 |
pageNavigator.PageChanged -= handler; |
|
908 |
}; |
|
909 |
|
|
910 |
pageNavigator.PageChanged += handler; |
|
911 |
|
|
912 |
pageNavigator.GotoPage(commentList.First().PageNumber); |
|
913 |
} |
|
914 |
} |
|
915 |
} |
|
916 |
|
|
917 |
/// <summary> |
|
918 |
/// 페이지 이동 후 마크업을 선택하고 Zoom을 한다. |
|
919 |
/// 마크업이 페이지보다 크면 Zoom을 하지 않음. |
|
920 |
/// </summary> |
|
921 |
/// <param name="CommentIdList"></param> |
|
922 |
private void GotoSelectedMarkup(IEnumerable<string> CommentIdList) |
|
923 |
{ |
|
924 |
var instance = Common.ViewerDataModel.Instance; |
|
925 |
|
|
926 |
var selectOrderComments = instance.MarkupControls.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList(); |
|
927 |
var commentUserInfo = instance.MarkupControls_USER.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList(); |
|
928 |
|
|
929 |
if (commentUserInfo.Count() > 0 || selectOrderComments.Count() > 0) |
|
930 |
{ |
|
931 |
commentUserInfo.ForEach(x => x.IsSelected = true); |
|
932 |
commentUserInfo.AddRange(selectOrderComments); |
|
933 |
|
|
934 |
if (commentUserInfo?.Count() > 0) |
|
935 |
{ |
|
936 |
var main = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu; |
|
937 |
|
|
938 |
try |
|
939 |
{ |
|
940 |
if(Common.ViewerDataModel.Instance.Angle != 0) |
|
941 |
{ |
|
942 |
for (int i = 0; i < (Common.ViewerDataModel.Instance.Angle / 90); i++) |
|
943 |
{ |
|
944 |
Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.drawingPannelRotate(true); |
|
945 |
} |
|
865 |
///// <summary>
|
|
866 |
///// 선택된 마크업의 ID리스트를 받아 해당 페이지로 이동 후 GotoSelectedMarkup 호출
|
|
867 |
///// </summary>
|
|
868 |
///// <param name="CommentIdList"></param>
|
|
869 |
//private void GotoMarkup(IEnumerable<string> CommentIdList)
|
|
870 |
//{
|
|
871 |
// var instance = Common.ViewerDataModel.Instance;
|
|
872 |
|
|
873 |
// SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
|
|
874 |
|
|
875 |
// var commentList = instance._markupInfoList.Where(x => x.MarkupList != null).SelectMany(x => x.MarkupList).Where(f => f.ID == CommentIdList.First());
|
|
876 |
|
|
877 |
// if (commentList.Count() > 0)
|
|
878 |
// {
|
|
879 |
// //하단 그리드의 markup list에서 commentid가 포함된 markupinfo를 선택되게 한다.
|
|
880 |
// #region markup list grid select items
|
|
881 |
|
|
882 |
// var infoItem = instance._markupInfoList.Where(x => x.MarkupList != null).Where(f => f.MarkupList.Count(y => y == commentList.First()) > 0);
|
|
883 |
|
|
884 |
// if (infoItem.Count() > 0)
|
|
885 |
// {
|
|
886 |
|
|
887 |
// var gridMarkup = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.gridViewMarkup;
|
|
888 |
// gridMarkup.SelectedItems.Clear();
|
|
889 |
// gridMarkup.SelectedItems.Add(infoItem.First());
|
|
890 |
// }
|
|
891 |
|
|
892 |
// #endregion
|
|
893 |
|
|
894 |
// var pageNavigator = instance.SystemMain.dzMainMenu.pageNavigator;
|
|
895 |
|
|
896 |
// if (pageNavigator.CurrentPage.PageNumber == commentList.First().PageNumber)
|
|
897 |
// {
|
|
898 |
// GotoSelectedMarkup(CommentIdList);
|
|
899 |
// }
|
|
900 |
// else
|
|
901 |
// {
|
|
902 |
// EventHandler<Sample.PageChangeEventArgs> handler = null;
|
|
903 |
|
|
904 |
// handler = (snd, evt) =>
|
|
905 |
// {
|
|
906 |
// GotoSelectedMarkup(CommentIdList);
|
|
907 |
// pageNavigator.PageChanged -= handler;
|
|
908 |
// };
|
|
909 |
|
|
910 |
// pageNavigator.PageChanged += handler;
|
|
911 |
|
|
912 |
// pageNavigator.GotoPage(commentList.First().PageNumber);
|
|
913 |
// }
|
|
914 |
// }
|
|
915 |
//}
|
|
916 |
|
|
917 |
///// <summary>
|
|
918 |
///// 페이지 이동 후 마크업을 선택하고 Zoom을 한다.
|
|
919 |
///// 마크업이 페이지보다 크면 Zoom을 하지 않음.
|
|
920 |
///// </summary>
|
|
921 |
///// <param name="CommentIdList"></param>
|
|
922 |
//private void GotoSelectedMarkup(IEnumerable<string> CommentIdList)
|
|
923 |
//{
|
|
924 |
// var instance = Common.ViewerDataModel.Instance;
|
|
925 |
|
|
926 |
// var selectOrderComments = instance.MarkupControls.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList();
|
|
927 |
// var commentUserInfo = instance.MarkupControls_USER.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList();
|
|
928 |
|
|
929 |
// if (commentUserInfo.Count() > 0 || selectOrderComments.Count() > 0)
|
|
930 |
// {
|
|
931 |
// commentUserInfo.ForEach(x => x.IsSelected = true);
|
|
932 |
// commentUserInfo.AddRange(selectOrderComments);
|
|
933 |
|
|
934 |
// if (commentUserInfo?.Count() > 0)
|
|
935 |
// {
|
|
936 |
// var main = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu;
|
|
937 |
|
|
938 |
// try
|
|
939 |
// {
|
|
940 |
// if(Common.ViewerDataModel.Instance.Angle != 0)
|
|
941 |
// {
|
|
942 |
// for (int i = 0; i < (Common.ViewerDataModel.Instance.Angle / 90); i++)
|
|
943 |
// {
|
|
944 |
// Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.drawingPannelRotate(true);
|
|
945 |
// }
|
|
946 | 946 |
|
947 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.rotate.Angle = 0; |
|
948 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.X = 0; |
|
949 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.Y = 0; |
|
950 |
} |
|
947 |
// //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.rotate.Angle = 0;
|
|
948 |
// //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.X = 0;
|
|
949 |
// //Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.Y = 0;
|
|
950 |
// }
|
|
951 | 951 |
|
952 |
Rect rect = commentUserInfo.First().ItemRect; |
|
952 |
// Rect rect = commentUserInfo.First().ItemRect;
|
|
953 | 953 |
|
954 |
foreach (var UserInfo in commentUserInfo) |
|
955 |
{ |
|
956 |
rect = Rect.Union(rect, UserInfo.ItemRect); |
|
957 |
} |
|
954 |
// foreach (var UserInfo in commentUserInfo)
|
|
955 |
// {
|
|
956 |
// rect = Rect.Union(rect, UserInfo.ItemRect);
|
|
957 |
// }
|
|
958 | 958 |
|
959 |
SelectionSet.Instance.SelectItemByRect(rect, main); |
|
959 |
// SelectionSet.Instance.SelectItemByRect(rect, main);
|
|
960 | 960 |
|
961 |
var center = new Vector(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2); |
|
962 |
//var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
963 |
//rect.Transform(matrix); |
|
961 |
// var center = new Vector(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2);
|
|
962 |
// //var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle);
|
|
963 |
// //rect.Transform(matrix);
|
|
964 | 964 |
|
965 |
double scaleX = Common.ViewerDataModel.Instance.ImageViewWidth / rect.Width; |
|
966 |
double scaleY = Common.ViewerDataModel.Instance.ImageViewHeight / rect.Height; |
|
967 |
double newScale = main.zoomAndPanControl.ContentScale * Math.Min(scaleX, scaleY); |
|
968 |
double positionX = 0; |
|
969 |
double positionY = 0; |
|
965 |
// double scaleX = Common.ViewerDataModel.Instance.ImageViewWidth / rect.Width;
|
|
966 |
// double scaleY = Common.ViewerDataModel.Instance.ImageViewHeight / rect.Height;
|
|
967 |
// double newScale = main.zoomAndPanControl.ContentScale * Math.Min(scaleX, scaleY);
|
|
968 |
// double positionX = 0;
|
|
969 |
// double positionY = 0;
|
|
970 | 970 |
|
971 |
if (Common.ViewerDataModel.Instance.Angle == 90) |
|
972 |
{ |
|
973 |
positionX = Common.ViewerDataModel.Instance.ImageViewHeight + rect.X; |
|
974 |
positionY = Common.ViewerDataModel.Instance.ImageViewWidth + rect.Y; |
|
975 |
} |
|
971 |
// if (Common.ViewerDataModel.Instance.Angle == 90)
|
|
972 |
// {
|
|
973 |
// positionX = Common.ViewerDataModel.Instance.ImageViewHeight + rect.X;
|
|
974 |
// positionY = Common.ViewerDataModel.Instance.ImageViewWidth + rect.Y;
|
|
975 |
// }
|
|
976 | 976 |
|
977 |
main.zoomAndPanControl.ContentScale = newScale; |
|
978 |
main.zoomAndPanControl.ContentOffsetX = positionX; |
|
979 |
main.zoomAndPanControl.ContentOffsetY = positionY; |
|
977 |
// main.zoomAndPanControl.ContentScale = newScale;
|
|
978 |
// main.zoomAndPanControl.ContentOffsetX = positionX;
|
|
979 |
// main.zoomAndPanControl.ContentOffsetY = positionY;
|
|
980 | 980 |
|
981 | 981 |
|
982 |
var pageSize = new Size(main.pageNavigator.CurrentPage.Width, main.pageNavigator.CurrentPage.Height); |
|
983 |
|
|
984 |
double pageAngle = Common.ViewerDataModel.Instance.Angle; |
|
985 |
|
|
986 |
if (pageAngle == 90) |
|
987 |
{ |
|
988 |
pageAngle = 270; |
|
989 |
} |
|
990 |
else |
|
991 |
{ |
|
992 |
pageAngle = 90; |
|
993 |
} |
|
994 |
|
|
995 |
if ((rect.Size.Width + rect.Size.Height) > (pageSize.Width + pageSize.Height)) |
|
996 |
{ |
|
997 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
998 |
rect.Transform(matrix); |
|
999 |
|
|
1000 |
main.zoomAndPanControl.ZoomTo(rect); |
|
1001 |
} |
|
1002 |
else |
|
1003 |
{ |
|
1004 |
rect.Inflate(rect.Width * 3, rect.Height * 3); |
|
1005 |
|
|
1006 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
1007 |
rect.Transform(matrix); |
|
1008 |
|
|
1009 |
|
|
1010 |
main.zoomAndPanControl.ZoomTo(rect); |
|
1011 |
} |
|
1012 |
} |
|
1013 |
catch (Exception ex) |
|
1014 |
{ |
|
1015 |
main.DialogMessage_Alert(ex.Message, "Error"); |
|
1016 |
} |
|
1017 |
} |
|
1018 |
} |
|
1019 |
} |
|
982 |
// var pageSize = new Size(main.pageNavigator.CurrentPage.Width, main.pageNavigator.CurrentPage.Height);
|
|
983 |
|
|
984 |
// double pageAngle = Common.ViewerDataModel.Instance.Angle;
|
|
985 |
|
|
986 |
// if (pageAngle == 90)
|
|
987 |
// {
|
|
988 |
// pageAngle = 270;
|
|
989 |
// }
|
|
990 |
// else
|
|
991 |
// {
|
|
992 |
// pageAngle = 90;
|
|
993 |
// }
|
|
994 |
|
|
995 |
// if ((rect.Size.Width + rect.Size.Height) > (pageSize.Width + pageSize.Height))
|
|
996 |
// {
|
|
997 |
// var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle);
|
|
998 |
// rect.Transform(matrix);
|
|
999 |
|
|
1000 |
// main.zoomAndPanControl.ZoomTo(rect);
|
|
1001 |
// }
|
|
1002 |
// else
|
|
1003 |
// {
|
|
1004 |
// rect.Inflate(rect.Width * 3, rect.Height * 3);
|
|
1005 |
|
|
1006 |
// var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle);
|
|
1007 |
// rect.Transform(matrix);
|
|
1008 |
|
|
1009 |
|
|
1010 |
// main.zoomAndPanControl.ZoomTo(rect);
|
|
1011 |
// }
|
|
1012 |
// }
|
|
1013 |
// catch (Exception ex)
|
|
1014 |
// {
|
|
1015 |
// main.DialogMessage_Alert(ex.Message, "Error");
|
|
1016 |
// }
|
|
1017 |
// }
|
|
1018 |
// }
|
|
1019 |
//}
|
|
1020 | 1020 |
|
1021 | 1021 |
private void MarkupList_Loaded(object sender, RoutedEventArgs e) |
1022 | 1022 |
{ |
KCOM/Controls/SearchPanel.xaml | ||
---|---|---|
108 | 108 |
</GridView> |
109 | 109 |
</ListView.View> |
110 | 110 |
</ListView> |
111 |
|
|
112 | 111 |
</Grid> |
113 | 112 |
<Border Background="Black" Grid.RowSpan="2" Opacity="0.7" Margin="-10" x:Name="border_Overlap" |
114 | 113 |
Visibility="{Binding Instance.IsDownloadOriginal, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" |
KCOM/Controls/Symbol.xaml | ||
---|---|---|
11 | 11 |
d:DesignHeight="900" d:DesignWidth="300"> |
12 | 12 |
|
13 | 13 |
<UserControl.Resources> |
14 |
|
|
14 | 15 |
<converter:SvgImageConverter x:Key="SvgImageConverter"/> |
15 | 16 |
<DataTemplate x:Key="SymbolTemplate_Private"> |
16 | 17 |
|
... | ... | |
49 | 50 |
</Grid> |
50 | 51 |
</StackPanel> |
51 | 52 |
</DataTemplate> |
52 |
<Style x:Key="DraggableListBox" TargetType="ListBox"> |
|
53 |
<Style x:Key="DraggableListBox" TargetType="ListBox"> |
|
54 |
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" /> |
|
55 |
</Style> |
|
56 |
<Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"> |
|
53 | 57 |
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" /> |
58 |
<Setter Property="telerik:TouchManager.DragStartTrigger" Value="TapHoldAndMove"/> |
|
54 | 59 |
</Style> |
55 | 60 |
</UserControl.Resources> |
56 | 61 |
<Grid Margin="10"> |
... | ... | |
88 | 93 |
</Grid> |
89 | 94 |
</StackPanel> |
90 | 95 |
<ScrollViewer x:Name="ScView" Grid.Row="2" > |
91 |
<ListBox x:Name="lstSymbolPrivate" Background="#f5f5f5" FontWeight="Normal" ItemTemplate="{StaticResource SymbolTemplate_Private}" |
|
96 |
<telerik:RadListBox x:Name="lstSymbolPrivate" Background="#f5f5f5" FontWeight="Normal" ItemTemplate="{StaticResource SymbolTemplate_Private}"
|
|
92 | 97 |
MouseDown="lstSymbolPrivate_MouseDown" |
93 | 98 |
PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp" |
94 | 99 |
MouseLeave="lstSymbolPrivate_MouseLeave" |
95 | 100 |
PreviewMouseWheel ="lstSymbolPrivate_PreviewMouseWheel"> |
101 |
<telerik:RadListBox.DragVisualProvider> |
|
102 |
<telerik:ScreenshotDragVisualProvider /> |
|
103 |
</telerik:RadListBox.DragVisualProvider> |
|
96 | 104 |
<telerik:ListBoxDragDrop.Behavior> |
97 |
<telerik:ListBoxDragDropBehavior AllowReorder="True" /> |
|
105 |
<telerik:ListBoxDragDropBehavior AllowReorder="True" telerik:TouchManager.DragStartTrigger="TapHoldAndMove"/>
|
|
98 | 106 |
</telerik:ListBoxDragDrop.Behavior> |
99 |
</ListBox> |
|
107 |
</telerik:RadListBox>
|
|
100 | 108 |
</ScrollViewer> |
101 | 109 |
</Grid> |
102 | 110 |
</telerik:RadTabItem> |
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
401 | 401 |
/// </summary> |
402 | 402 |
/// <date>2018.06.14</date> |
403 | 403 |
/// <param name="id"></param> |
404 |
private void PlaceSymbol(string id) |
|
404 |
private void PlaceSymbol(string id,Point CurrentMousePoint)
|
|
405 | 405 |
{ |
406 | 406 |
string Data_ = ""; |
407 | 407 |
|
408 |
var systemMain = Common.ViewerDataModel.Instance.SystemMain; |
|
409 |
var mainMenu = systemMain.dzMainMenu; |
|
410 |
|
|
411 |
SelectionSet.Instance.UnSelect(mainMenu); /// unselect alreay selected items |
|
412 |
|
|
408 | 413 |
try |
409 | 414 |
{ |
410 | 415 |
Logger.sendReqLog("GetSymbolData: ", id + "," + RadTab.SelectedIndex, 1); |
411 |
Data_ = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetSymbolData(id, RadTab.SelectedIndex); |
|
416 |
Data_ = mainMenu.BaseClient.GetSymbolData(id, RadTab.SelectedIndex); |
|
417 |
|
|
412 | 418 |
if (Data_ != null || Data_ != "") |
413 | 419 |
{ |
414 | 420 |
Logger.sendResLog("GetSymbolData", "TRUE", 1); |
... | ... | |
455 | 461 |
(item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid(); |
456 | 462 |
(item as MarkupToPDF.Common.CommentUserInfo).SymbolID = id; |
457 | 463 |
//(item as MarkupToPDF.Common.CommentUserInfo).GroupID = group_id; |
464 |
|
|
458 | 465 |
ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo); |
459 | 466 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo); |
460 | 467 |
|
... | ... | |
466 | 473 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
467 | 474 |
} |
468 | 475 |
} |
476 |
|
|
469 | 477 |
Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet); |
470 | 478 |
|
471 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final); |
|
479 |
// 마우스 클릭된 페이지 위치 |
|
480 |
|
|
481 |
var pageWidth = mainMenu.pageNavigator.CurrentPage.Width; |
|
482 |
var pageHeight = mainMenu.pageNavigator.CurrentPage.Height; |
|
483 |
var angle = Common.ViewerDataModel.Instance.Angle; |
|
484 |
|
|
485 |
Point pagePoint = new Point(pageWidth/2, pageHeight/2); |
|
486 |
|
|
487 |
var rotatePoint = Rotate(mainMenu.CanvasDrawingMouseDownPoint,pagePoint,angle); |
|
488 |
|
|
489 |
var diff = Point.Subtract(rotatePoint, final.Centeroid); |
|
490 |
final.TranslateItems(diff.X, diff.Y); |
|
491 |
|
|
492 |
mainMenu.SelectLayer.Children.Add(final); |
|
493 |
//var finalPosition = new Point(Canvas.GetLeft(final), Canvas.GetTop(final)); |
|
494 |
//Rect rect = new Rect(finalPosition, Point.Add(finalPosition,new Vector(final.Width,final.Height))); |
|
495 |
|
|
496 |
//SelectionSet.Instance.SelectItemByRect(final.getAdornerSize(), mainMenu); |
|
497 |
|
|
472 | 498 |
} |
473 | 499 |
else |
474 | 500 |
{ |
... | ... | |
481 | 507 |
} |
482 | 508 |
} |
483 | 509 |
|
510 |
|
|
511 |
//출처: https://icodebroker.tistory.com/3189 [ICODEBROKER] |
|
512 |
public Point Rotate(Point sourcePoint, Point centerPoint, double rotateAngle) |
|
513 |
{ |
|
514 |
Point targetPoint = new Point(); |
|
515 |
|
|
516 |
double radian = rotateAngle / 180 * Math.PI; |
|
517 |
|
|
518 |
targetPoint.X = Math.Cos(radian) * (sourcePoint.X - centerPoint.X) - Math.Sin(radian) * (sourcePoint.Y - centerPoint.Y) + centerPoint.X; |
|
519 |
targetPoint.Y = Math.Sin(radian) * (sourcePoint.X - centerPoint.X) + Math.Cos(radian) * (sourcePoint.Y - centerPoint.Y) + centerPoint.Y; |
|
520 |
|
|
521 |
return targetPoint; |
|
522 |
} |
|
523 |
|
|
524 |
|
|
525 |
|
|
484 | 526 |
private void PlaceImageSymbol(string id, long group_id) |
485 | 527 |
{ |
486 | 528 |
|
... | ... | |
684 | 726 |
|
685 | 727 |
if (e.ClickCount > 1) |
686 | 728 |
{ |
687 |
this.PlaceSymbol(id); |
|
729 |
this.PlaceSymbol(id,ViewerDataModel.Instance.SystemMain.dzMainMenu.CanvasDrawingMouseDownPoint);
|
|
688 | 730 |
} |
689 | 731 |
} |
690 | 732 |
catch(Exception ex) |
... | ... | |
853 | 895 |
} |
854 | 896 |
|
855 | 897 |
string id = (lstSymbolPrivate.SelectedItem as Symbol_Custom).ID; |
856 |
this.PlaceSymbol(id); |
|
898 |
this.PlaceSymbol(id, ViewerDataModel.Instance.SystemMain.dzMainMenu.CanvasDrawingMouseDownPoint);
|
|
857 | 899 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None; |
858 | 900 |
} |
859 | 901 |
|
... | ... | |
866 | 908 |
} |
867 | 909 |
|
868 | 910 |
string id = (lstSymbolPublic.SelectedItem as Symbol_Custom).ID; |
869 |
this.PlaceSymbol(id); |
|
911 |
this.PlaceSymbol(id, ViewerDataModel.Instance.SystemMain.dzMainMenu.CanvasDrawingMouseDownPoint);
|
|
870 | 912 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None; |
871 | 913 |
} |
872 | 914 |
|
KCOM/Extensions/MarkupVisitHelper.cs | ||
---|---|---|
1 |
using KCOM.Common; |
|
2 |
using KCOM.Controls; |
|
3 |
using System; |
|
4 |
using System.Collections.Generic; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
using System.Windows; |
|
9 |
|
|
10 |
namespace KCOM |
|
11 |
{ |
|
12 |
/// <summary> |
|
13 |
/// Markup 이동 |
|
14 |
/// </summary> |
|
15 |
public static class MarkupHelper |
|
16 |
{ |
|
17 |
/// <summary> |
|
18 |
/// 선택된 마크업의 ID리스트를 받아 해당 페이지로 이동 후 GotoSelectedMarkup 호출 |
|
19 |
/// </summary> |
|
20 |
/// <param name="CommentIdList"></param> |
|
21 |
public static void GotoMarkup(IEnumerable<string> CommentIdList) |
|
22 |
{ |
|
23 |
var instance = Common.ViewerDataModel.Instance; |
|
24 |
|
|
25 |
SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu); |
|
26 |
|
|
27 |
var commentList = instance._markupInfoList.Where(x => x.MarkupList != null).SelectMany(x => x.MarkupList).Where(f => f.ID == CommentIdList.First()); |
|
28 |
|
|
29 |
if (commentList.Count() > 0) |
|
30 |
{ |
|
31 |
//하단 그리드의 markup list에서 commentid가 포함된 markupinfo를 선택되게 한다. |
|
32 |
#region markup list grid select items |
|
33 |
|
|
34 |
var infoItem = instance._markupInfoList.Where(x => x.MarkupList != null).Where(f => f.MarkupList.Count(y => y == commentList.First()) > 0); |
|
35 |
|
|
36 |
if (infoItem.Count() > 0) |
|
37 |
{ |
|
38 |
|
|
39 |
var gridMarkup = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.gridViewMarkup; |
|
40 |
gridMarkup.SelectedItems.Clear(); |
|
41 |
gridMarkup.SelectedItems.Add(infoItem.First()); |
|
42 |
} |
|
43 |
|
|
44 |
#endregion |
|
45 |
|
|
46 |
var pageNavigator = instance.SystemMain.dzMainMenu.pageNavigator; |
|
47 |
|
|
48 |
if (pageNavigator.CurrentPage.PageNumber == commentList.First().PageNumber) |
|
49 |
{ |
|
50 |
GotoSelectedMarkup(CommentIdList); |
|
51 |
} |
|
52 |
else |
|
53 |
{ |
|
54 |
EventHandler<Sample.PageChangeEventArgs> handler = null; |
|
55 |
|
|
56 |
handler = (snd, evt) => |
|
57 |
{ |
|
58 |
GotoSelectedMarkup(CommentIdList); |
|
59 |
pageNavigator.PageChanged -= handler; |
|
60 |
}; |
|
61 |
|
|
62 |
pageNavigator.PageChanged += handler; |
|
63 |
|
|
64 |
pageNavigator.GotoPage(commentList.First().PageNumber); |
|
65 |
} |
|
66 |
} |
|
67 |
} |
|
68 |
|
|
69 |
private static void GotoSelectedMarkup(IEnumerable<string> CommentIdList) |
|
70 |
{ |
|
71 |
var instance = Common.ViewerDataModel.Instance; |
|
72 |
|
|
73 |
var selectOrderComments = instance.MarkupControls.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList(); |
|
74 |
var commentUserInfo = instance.MarkupControls_USER.Where(x => CommentIdList.Count(y => y == x.CommentID) > 0).ToList(); |
|
75 |
|
|
76 |
if (commentUserInfo.Count() > 0 || selectOrderComments.Count() > 0) |
|
77 |
{ |
|
78 |
commentUserInfo.ForEach(x => x.IsSelected = true); |
|
79 |
commentUserInfo.AddRange(selectOrderComments); |
|
80 |
|
|
81 |
if (commentUserInfo?.Count() > 0) |
|
82 |
{ |
|
83 |
var main = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu; |
|
84 |
|
|
85 |
try |
|
86 |
{ |
|
87 |
if (Common.ViewerDataModel.Instance.Angle != 0) |
|
88 |
{ |
|
89 |
for (int i = 0; i < (Common.ViewerDataModel.Instance.Angle / 90); i++) |
|
90 |
{ |
|
91 |
Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.drawingPannelRotate(true); |
|
92 |
} |
|
93 |
|
|
94 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.rotate.Angle = 0; |
|
95 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.X = 0; |
|
96 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.Y = 0; |
|
97 |
} |
|
98 |
|
|
99 |
Rect rect = commentUserInfo.First().ItemRect; |
|
100 |
|
|
101 |
foreach (var UserInfo in commentUserInfo) |
|
102 |
{ |
|
103 |
rect = Rect.Union(rect, UserInfo.ItemRect); |
|
104 |
} |
|
105 |
|
|
106 |
SelectionSet.Instance.SelectItemByRect(rect, main); |
|
107 |
|
|
108 |
var center = new Vector(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2); |
|
109 |
//var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
110 |
//rect.Transform(matrix); |
|
111 |
|
|
112 |
double scaleX = Common.ViewerDataModel.Instance.ImageViewWidth / rect.Width; |
|
113 |
double scaleY = Common.ViewerDataModel.Instance.ImageViewHeight / rect.Height; |
|
114 |
double newScale = main.zoomAndPanControl.ContentScale * Math.Min(scaleX, scaleY); |
|
115 |
double positionX = 0; |
|
116 |
double positionY = 0; |
|
117 |
|
|
118 |
if (Common.ViewerDataModel.Instance.Angle == 90) |
|
119 |
{ |
|
120 |
positionX = Common.ViewerDataModel.Instance.ImageViewHeight + rect.X; |
|
121 |
positionY = Common.ViewerDataModel.Instance.ImageViewWidth + rect.Y; |
|
122 |
} |
|
123 |
|
|
124 |
main.zoomAndPanControl.ContentScale = newScale; |
|
125 |
main.zoomAndPanControl.ContentOffsetX = positionX; |
|
126 |
main.zoomAndPanControl.ContentOffsetY = positionY; |
|
127 |
|
|
128 |
|
|
129 |
var pageSize = new Size(main.pageNavigator.CurrentPage.Width, main.pageNavigator.CurrentPage.Height); |
|
130 |
|
|
131 |
double pageAngle = Common.ViewerDataModel.Instance.Angle; |
|
132 |
|
|
133 |
if (pageAngle == 90) |
|
134 |
{ |
|
135 |
pageAngle = 270; |
|
136 |
} |
|
137 |
else |
|
138 |
{ |
|
139 |
pageAngle = 90; |
|
140 |
} |
|
141 |
|
|
142 |
if ((rect.Size.Width + rect.Size.Height) > (pageSize.Width + pageSize.Height)) |
|
143 |
{ |
|
144 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
145 |
rect.Transform(matrix); |
|
146 |
|
|
147 |
main.zoomAndPanControl.ZoomTo(rect); |
|
148 |
} |
|
149 |
else |
|
150 |
{ |
|
151 |
rect.Inflate(rect.Width * 3, rect.Height * 3); |
|
152 |
|
|
153 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
154 |
rect.Transform(matrix); |
|
155 |
|
|
156 |
|
|
157 |
main.zoomAndPanControl.ZoomTo(rect); |
|
158 |
} |
|
159 |
} |
|
160 |
catch (Exception ex) |
|
161 |
{ |
|
162 |
main.DialogMessage_Alert(ex.Message, "Error"); |
|
163 |
} |
|
164 |
} |
|
165 |
} |
|
166 |
} |
|
167 |
|
|
168 |
} |
|
169 |
} |
KCOM/KCOM.csproj | ||
---|---|---|
331 | 331 |
<Compile Include="Events\UndoCommand.cs" /> |
332 | 332 |
<Compile Include="Events\SaveCommand.cs" /> |
333 | 333 |
<Compile Include="Events\RedoCommand.cs" /> |
334 |
<Compile Include="Extensions\MarkupVisitHelper.cs" /> |
|
334 | 335 |
<Compile Include="Extensions\MatrixHelper.cs" /> |
335 | 336 |
<Compile Include="Extensions\WindowHelper.cs" /> |
336 | 337 |
<Compile Include="IAbstractDatabase.cs" /> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
132 | 132 |
public MouseHandlingMode mouseHandlingMode = MouseHandlingMode.None; |
133 | 133 |
private static readonly double DragThreshold = 5; |
134 | 134 |
private System.Windows.Input.Cursor cursor { get; set; } |
135 |
private Point canvasDrawingMouseDownPoint; |
|
135 |
|
|
136 |
/// <summary> |
|
137 |
/// 문서의 마우스 위치 |
|
138 |
/// </summary> |
|
139 |
public Point CanvasDrawingMouseDownPoint; |
|
140 |
|
|
136 | 141 |
public string filename { get; set; } |
137 | 142 |
private Point canvasZoomPanningMouseDownPoint; |
138 | 143 |
public Point getCurrentPoint; |
... | ... | |
1298 | 1303 |
|
1299 | 1304 |
if (currentControl != null) |
1300 | 1305 |
{ |
1301 |
double moveX = currentCanvasDrawingMouseMovePoint.X - canvasDrawingMouseDownPoint.X;
|
|
1302 |
double moveY = currentCanvasDrawingMouseMovePoint.Y - canvasDrawingMouseDownPoint.Y;
|
|
1306 |
double moveX = currentCanvasDrawingMouseMovePoint.X - CanvasDrawingMouseDownPoint.X;
|
|
1307 |
double moveY = currentCanvasDrawingMouseMovePoint.Y - CanvasDrawingMouseDownPoint.Y;
|
|
1303 | 1308 |
//강인구 추가 |
1304 | 1309 |
currentControl.Opacity = ViewerDataModel.Instance.ControlOpacity; |
1305 | 1310 |
|
... | ... | |
1663 | 1668 |
|
1664 | 1669 |
if (isDraggingSelectionRect) |
1665 | 1670 |
{ |
1666 |
UpdateDragSelectionRect(canvasDrawingMouseDownPoint, curMouseDownPoint);
|
|
1671 |
UpdateDragSelectionRect(CanvasDrawingMouseDownPoint, curMouseDownPoint);
|
|
1667 | 1672 |
e.Handled = true; |
1668 | 1673 |
} |
1669 | 1674 |
else if (isLeftMouseButtonDownOnWindow) |
1670 | 1675 |
{ |
1671 |
var dragDelta = curMouseDownPoint - canvasDrawingMouseDownPoint;
|
|
1676 |
var dragDelta = curMouseDownPoint - CanvasDrawingMouseDownPoint;
|
|
1672 | 1677 |
double dragDistance = Math.Abs(dragDelta.Length); |
1673 | 1678 |
|
1674 | 1679 |
if (dragDistance > DragThreshold) |
1675 | 1680 |
{ |
1676 | 1681 |
isDraggingSelectionRect = true; |
1677 |
InitDragSelectionRect(canvasDrawingMouseDownPoint, curMouseDownPoint);
|
|
1682 |
InitDragSelectionRect(CanvasDrawingMouseDownPoint, curMouseDownPoint);
|
|
1678 | 1683 |
} |
1679 | 1684 |
|
1680 | 1685 |
e.Handled = true; |
1681 | 1686 |
} |
1682 | 1687 |
|
1683 |
if (canvasDrawingMouseDownPoint == curMouseDownPoint)
|
|
1688 |
if (CanvasDrawingMouseDownPoint == curMouseDownPoint)
|
|
1684 | 1689 |
{ |
1685 | 1690 |
} |
1686 | 1691 |
else |
... | ... | |
1865 | 1870 |
|
1866 | 1871 |
public void Set_Symbol_Capture(Point endPoint) |
1867 | 1872 |
{ |
1868 |
double x = canvasDrawingMouseDownPoint.X;
|
|
1869 |
double y = canvasDrawingMouseDownPoint.Y;
|
|
1873 |
double x = CanvasDrawingMouseDownPoint.X;
|
|
1874 |
double y = CanvasDrawingMouseDownPoint.Y;
|
|
1870 | 1875 |
if(x > endPoint.X) |
1871 | 1876 |
{ |
1872 | 1877 |
x = endPoint.X; |
... | ... | |
2328 | 2333 |
|
2329 | 2334 |
if (e.LeftButton == MouseButtonState.Pressed) |
2330 | 2335 |
{ |
2331 |
canvasDrawingMouseDownPoint = e.GetPosition(drawingRotateCanvas);
|
|
2336 |
CanvasDrawingMouseDownPoint = e.GetPosition(drawingRotateCanvas);
|
|
2332 | 2337 |
canvasZoomPanningMouseDownPoint = e.GetPosition(zoomAndPanCanvas); |
2333 | 2338 |
|
2334 | 2339 |
this.cursor = new Cursor(MainWindow.CursorChange().StreamSource); |
... | ... | |
2600 | 2605 |
currentControl = new CoordinateControl |
2601 | 2606 |
{ |
2602 | 2607 |
Background = new SolidColorBrush(Colors.Black), |
2603 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2608 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2604 | 2609 |
ControlType = ControlType.Coordinate |
2605 | 2610 |
}; |
2606 | 2611 |
|
... | ... | |
2637 | 2642 |
currentControl = new InsideWhiteControl |
2638 | 2643 |
{ |
2639 | 2644 |
Background = new SolidColorBrush(Colors.Black), |
2640 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2645 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2641 | 2646 |
ControlType = ControlType.InsideWhite |
2642 | 2647 |
}; |
2643 | 2648 |
|
... | ... | |
2672 | 2677 |
currentControl = new OverlapWhiteControl |
2673 | 2678 |
{ |
2674 | 2679 |
Background = new SolidColorBrush(Colors.Black), |
2675 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2680 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2676 | 2681 |
ControlType = ControlType.OverlapWhite |
2677 | 2682 |
}; |
2678 | 2683 |
|
... | ... | |
2707 | 2712 |
currentControl = new ClipWhiteControl |
2708 | 2713 |
{ |
2709 | 2714 |
Background = new SolidColorBrush(Colors.Black), |
2710 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2715 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2711 | 2716 |
ControlType = ControlType.ClipWhite |
2712 | 2717 |
}; |
2713 | 2718 |
|
... | ... | |
2742 | 2747 |
currentControl = new RectangleControl |
2743 | 2748 |
{ |
2744 | 2749 |
Background = new SolidColorBrush(Colors.Black), |
2745 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2750 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2746 | 2751 |
ControlType = ControlType.Rectangle |
2747 | 2752 |
}; |
2748 | 2753 |
|
... | ... | |
2778 | 2783 |
{ |
2779 | 2784 |
currentControl = new RectCloudControl |
2780 | 2785 |
{ |
2781 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2786 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2782 | 2787 |
ControlType = ControlType.RectCloud, |
2783 | 2788 |
Background = new SolidColorBrush(Colors.Black) |
2784 | 2789 |
}; |
... | ... | |
2811 | 2816 |
{ |
2812 | 2817 |
currentControl = new CircleControl |
2813 | 2818 |
{ |
2814 |
StartPoint = this.canvasDrawingMouseDownPoint,
|
|
2815 |
LeftBottomPoint = this.canvasDrawingMouseDownPoint,
|
|
2819 |
StartPoint = this.CanvasDrawingMouseDownPoint,
|
|
2820 |
LeftBottomPoint = this.CanvasDrawingMouseDownPoint,
|
|
2816 | 2821 |
Background = new SolidColorBrush(Colors.Black) |
2817 | 2822 |
}; |
2818 | 2823 |
|
... | ... | |
2833 | 2838 |
var content = currentControl as TriControl; |
2834 | 2839 |
if (content.MidPoint == new Point(0, 0)) |
2835 | 2840 |
{ |
2836 |
content.MidPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y);
|
|
2841 |
content.MidPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y);
|
|
2837 | 2842 |
} |
2838 | 2843 |
else |
2839 | 2844 |
{ |
... | ... | |
2852 | 2857 |
{ |
2853 | 2858 |
currentControl = new TriControl |
2854 | 2859 |
{ |
2855 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
2860 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
2856 | 2861 |
Background = new SolidColorBrush(Colors.Black), |
2857 | 2862 |
}; |
2858 | 2863 |
|
... | ... | |
2889 | 2894 |
currentControl = new LineControl |
2890 | 2895 |
{ |
2891 | 2896 |
ControlType = this.controlType, |
2892 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
2897 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
2893 | 2898 |
Background = new SolidColorBrush(Colors.Black) |
2894 | 2899 |
}; |
2895 | 2900 |
|
... | ... | |
2950 | 2955 |
currentControl.CommentID = Commons.shortGuid(); |
2951 | 2956 |
currentControl.IsNew = true; |
2952 | 2957 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
2953 |
polygonControl.StartPoint = canvasDrawingMouseDownPoint;
|
|
2954 |
polygonControl.EndPoint = canvasDrawingMouseDownPoint;
|
|
2955 |
polygonControl.PointSet.Add(canvasDrawingMouseDownPoint);
|
|
2956 |
polygonControl.PointSet.Add(canvasDrawingMouseDownPoint);
|
|
2958 |
polygonControl.StartPoint = CanvasDrawingMouseDownPoint;
|
|
2959 |
polygonControl.EndPoint = CanvasDrawingMouseDownPoint;
|
|
2960 |
polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
|
|
2961 |
polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
|
|
2957 | 2962 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
2958 | 2963 |
polygonControl.ApplyTemplate(); |
2959 | 2964 |
polygonControl.Visibility = Visibility.Visible; |
... | ... | |
3013 | 3018 |
//currentControl.OnApplyTemplate(); |
3014 | 3019 |
//polygonControl.PointC.pointSet.Add(canvasDrawingMouseDownPoint); |
3015 | 3020 |
//polygonControl.PointC.pointSet.Add(canvasDrawingMouseDownPoint); |
3016 |
polygonControl.PointSet.Add(canvasDrawingMouseDownPoint);
|
|
3017 |
polygonControl.PointSet.Add(canvasDrawingMouseDownPoint);
|
|
3021 |
polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
|
|
3022 |
polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
|
|
3018 | 3023 |
//} |
3019 | 3024 |
} |
3020 | 3025 |
} |
... | ... | |
3041 | 3046 |
{ |
3042 | 3047 |
currentControl = new ArcControl |
3043 | 3048 |
{ |
3044 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3049 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3045 | 3050 |
Background = new SolidColorBrush(Colors.Black) |
3046 | 3051 |
}; |
3047 | 3052 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
3084 | 3089 |
{ |
3085 | 3090 |
currentControl = new ArrowArcControl |
3086 | 3091 |
{ |
3087 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3092 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3088 | 3093 |
Background = new SolidColorBrush(Colors.Black) |
3089 | 3094 |
}; |
3090 | 3095 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
3124 | 3129 |
} |
3125 | 3130 |
else |
3126 | 3131 |
{ |
3127 |
content.MiddlePoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y);
|
|
3132 |
content.MiddlePoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y);
|
|
3128 | 3133 |
} |
3129 | 3134 |
} |
3130 | 3135 |
else |
... | ... | |
3145 | 3150 |
{ |
3146 | 3151 |
currentControl = new ArrowControl_Multi |
3147 | 3152 |
{ |
3148 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3153 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3149 | 3154 |
Background = new SolidColorBrush(Colors.Black) |
3150 | 3155 |
}; |
3151 | 3156 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
3210 | 3215 |
currentControl.IsNew = true; |
3211 | 3216 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3212 | 3217 |
|
3213 |
polygonControl.PointSet.Add(canvasDrawingMouseDownPoint);
|
|
3214 |
polygonControl.PointSet.Add(canvasDrawingMouseDownPoint);
|
|
3218 |
polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
|
|
3219 |
polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
|
|
3215 | 3220 |
|
3216 | 3221 |
//} |
3217 | 3222 |
} |
... | ... | |
3266 | 3271 |
PointSet = new List<Point>(), |
3267 | 3272 |
FilePath = filename, |
3268 | 3273 |
ImageData = img.Source, |
3269 |
StartPoint = canvasDrawingMouseDownPoint,
|
|
3270 |
EndPoint = new Point(canvasDrawingMouseDownPoint.X + 100, canvasDrawingMouseDownPoint.Y + 100),
|
|
3271 |
TopRightPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y + 100),
|
|
3272 |
LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X + 100, canvasDrawingMouseDownPoint.Y),
|
|
3274 |
StartPoint = CanvasDrawingMouseDownPoint,
|
|
3275 |
EndPoint = new Point(CanvasDrawingMouseDownPoint.X + 100, CanvasDrawingMouseDownPoint.Y + 100),
|
|
3276 |
TopRightPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y + 100),
|
|
3277 |
LeftBottomPoint = new Point(CanvasDrawingMouseDownPoint.X + 100, CanvasDrawingMouseDownPoint.Y),
|
|
3273 | 3278 |
ControlType = ControlType.ImgControl |
3274 | 3279 |
}; |
3275 | 3280 |
|
... | ... | |
3320 | 3325 |
{ |
3321 | 3326 |
currentControl = new DateControl |
3322 | 3327 |
{ |
3323 |
StartPoint = canvasDrawingMouseDownPoint,
|
|
3328 |
StartPoint = CanvasDrawingMouseDownPoint,
|
|
3324 | 3329 |
Background = new SolidColorBrush(Colors.Black) |
3325 | 3330 |
}; |
3326 | 3331 |
currentControl.CommentID = Commons.shortGuid(); |
... | ... | |
3352 | 3357 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3353 | 3358 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3354 | 3359 |
|
3355 |
currentControl.SetValue(TextControl.CanvasXProperty, canvasDrawingMouseDownPoint.X);
|
|
3356 |
currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
|
|
3360 |
currentControl.SetValue(TextControl.CanvasXProperty, CanvasDrawingMouseDownPoint.X);
|
|
3361 |
currentControl.SetValue(TextControl.CanvasYProperty, CanvasDrawingMouseDownPoint.Y);
|
|
3357 | 3362 |
|
3358 | 3363 |
(currentControl as TextControl).ControlType_No = 0; |
3359 | 3364 |
(currentControl as TextControl).CommentAngle -= rotate.Angle; |
... | ... | |
3383 | 3388 |
currentControl.IsNew = true; |
3384 | 3389 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3385 | 3390 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3386 |
currentControl.SetValue(TextControl.CanvasXProperty, canvasDrawingMouseDownPoint.X);
|
|
3387 |
currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
|
|
3391 |
currentControl.SetValue(TextControl.CanvasXProperty, CanvasDrawingMouseDownPoint.X);
|
|
3392 |
currentControl.SetValue(TextControl.CanvasYProperty, CanvasDrawingMouseDownPoint.Y);
|
|
3388 | 3393 |
|
3389 | 3394 |
(currentControl as TextControl).ControlType_No = 1; |
3390 | 3395 |
(currentControl as TextControl).CommentAngle = Ang; |
... | ... | |
3415 | 3420 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3416 | 3421 |
|
3417 | 3422 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3418 |
currentControl.SetValue(TextControl.CanvasXProperty, canvasDrawingMouseDownPoint.X);
|
|
3419 |
currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
|
|
3423 |
currentControl.SetValue(TextControl.CanvasXProperty, CanvasDrawingMouseDownPoint.X);
|
|
3424 |
currentControl.SetValue(TextControl.CanvasYProperty, CanvasDrawingMouseDownPoint.Y);
|
|
3420 | 3425 |
|
3421 | 3426 |
(currentControl as TextControl).CommentAngle = Ang; |
3422 | 3427 |
(currentControl as TextControl).ControlType_No = 2; |
... | ... | |
3460 | 3465 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3461 | 3466 |
|
3462 | 3467 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3463 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, canvasDrawingMouseDownPoint);
|
|
3464 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
|
|
3468 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, CanvasDrawingMouseDownPoint);
|
|
3469 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, CanvasDrawingMouseDownPoint);
|
|
3465 | 3470 |
(currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize; |
3466 | 3471 |
(currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape; |
3467 | 3472 |
|
... | ... | |
3512 | 3517 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
3513 | 3518 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3514 | 3519 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3515 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, canvasDrawingMouseDownPoint);
|
|
3516 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
|
|
3520 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, CanvasDrawingMouseDownPoint);
|
|
3521 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, CanvasDrawingMouseDownPoint);
|
|
3517 | 3522 |
(currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize; |
3518 | 3523 |
(currentControl as ArrowTextControl).isFixed = true; |
3519 | 3524 |
(currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape; |
... | ... | |
3562 | 3567 |
|
3563 | 3568 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3564 | 3569 |
|
3565 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, canvasDrawingMouseDownPoint);
|
|
3570 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, CanvasDrawingMouseDownPoint);
|
|
3566 | 3571 |
|
3567 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
|
|
3572 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, CanvasDrawingMouseDownPoint);
|
|
3568 | 3573 |
(currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape; |
3569 | 3574 |
(currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize; |
3570 | 3575 |
(currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text)); |
... | ... | |
3615 | 3620 |
|
3616 | 3621 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3617 | 3622 |
|
3618 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, canvasDrawingMouseDownPoint);
|
|
3619 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
|
|
3623 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, CanvasDrawingMouseDownPoint);
|
|
3624 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, CanvasDrawingMouseDownPoint);
|
|
3620 | 3625 |
(currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize; |
3621 | 3626 |
(currentControl as ArrowTextControl).isFixed = true; |
3622 | 3627 |
(currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape; |
... | ... | |
3668 | 3673 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3669 | 3674 |
|
3670 | 3675 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3671 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, canvasDrawingMouseDownPoint);
|
|
3672 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
|
|
3676 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, CanvasDrawingMouseDownPoint);
|
|
3677 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, CanvasDrawingMouseDownPoint);
|
|
3673 | 3678 |
(currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize; |
3674 | 3679 |
(currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape; |
3675 | 3680 |
(currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text)); |
... | ... | |
3717 | 3722 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3718 | 3723 |
currentControl.SetValue(Canvas.ZIndexProperty, 3); |
3719 | 3724 |
|
3720 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, canvasDrawingMouseDownPoint);
|
|
3721 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, canvasDrawingMouseDownPoint);
|
|
3725 |
currentControl.SetValue(ArrowTextControl.StartPointProperty, CanvasDrawingMouseDownPoint);
|
|
3726 |
currentControl.SetValue(ArrowTextControl.EndPointProperty, CanvasDrawingMouseDownPoint);
|
|
3722 | 3727 |
(currentControl as ArrowTextControl).TextSize = ViewerDataModel.Instance.TextSize; |
3723 | 3728 |
(currentControl as ArrowTextControl).isFixed = true; |
3724 | 3729 |
(currentControl as ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape; |
... | ... | |
3780 | 3785 |
Background = new SolidColorBrush(Colors.Black), |
3781 | 3786 |
UserNumber = App.ViewInfo.UserID, |
3782 | 3787 |
ProjectNO = App.ViewInfo.ProjectNO, |
3783 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3784 |
EndPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3788 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3789 |
EndPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3785 | 3790 |
ControlType = ControlType.Sign |
3786 | 3791 |
}; |
3787 | 3792 |
|
... | ... | |
3827 | 3832 |
{ |
3828 | 3833 |
currentControl = new RectangleControl |
3829 | 3834 |
{ |
3830 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3835 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3831 | 3836 |
Background = new SolidColorBrush(Colors.Black), |
3832 | 3837 |
ControlType = ControlType.Mark , |
3833 | 3838 |
Paint = PaintSet.Fill |
... | ... | |
3863 | 3868 |
{ |
3864 | 3869 |
currentControl = new SymControl |
3865 | 3870 |
{ |
3866 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3871 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3867 | 3872 |
Background = new SolidColorBrush(Colors.Black), |
3868 | 3873 |
LineSize = ViewerDataModel.Instance.LineSize + 3, |
3869 | 3874 |
ControlType = ControlType.Symbol |
... | ... | |
3905 | 3910 |
{ |
3906 | 3911 |
currentControl = new SymControlN |
3907 | 3912 |
{ |
3908 |
StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y),
|
|
3913 |
StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
|
|
3909 | 3914 |
Background = new SolidColorBrush(Colors.Black), |
3910 | 3915 |
STAMP = App.SystemInfo.STAMP, |
3911 | 3916 |
ControlType = ControlType.Stamp |
... | ... | |
3927 | 3932 |
if (inkBoard.Tag.ToString() == "Ink") |
3928 | 3933 |
{ |
3929 | 3934 |
inkBoard.IsEnabled = true; |
3930 |
StartNewStroke(canvasDrawingMouseDownPoint);
|
|
3935 |
StartNewStroke(CanvasDrawingMouseDownPoint);
|
|
3931 | 3936 |
} |
3932 | 3937 |
else if (inkBoard.Tag.ToString() == "EraseByPoint") |
3933 | 3938 |
{ |
3934 |
RemovePointStroke(canvasDrawingMouseDownPoint);
|
|
3939 |
RemovePointStroke(CanvasDrawingMouseDownPoint);
|
|
3935 | 3940 |
} |
3936 | 3941 |
else if (inkBoard.Tag.ToString() == "EraseByStroke") |
3937 | 3942 |
{ |
3938 |
RemoveLineStroke(canvasDrawingMouseDownPoint);
|
|
3943 |
RemoveLineStroke(CanvasDrawingMouseDownPoint);
|
|
3939 | 3944 |
} |
3940 | 3945 |
IsDrawing = true; |
3941 | 3946 |
return; |
... | ... | |
5231 | 5236 |
|
5232 | 5237 |
public void Set_Capture() |
5233 | 5238 |
{ |
5234 |
double x = canvasDrawingMouseDownPoint.X;
|
|
5235 |
double y = canvasDrawingMouseDownPoint.Y;
|
|
5239 |
double x = CanvasDrawingMouseDownPoint.X;
|
|
5240 |
double y = CanvasDrawingMouseDownPoint.Y;
|
|
5236 | 5241 |
double width = dragCaptureBorder.Width; |
5237 | 5242 |
double height = dragCaptureBorder.Height; |
5238 | 5243 |
|
Site/Daelim/ini/MARKUS.ini | ||
---|---|---|
1 | 1 |
[Internal] |
2 |
IP=172.20.120.141 |
|
3 |
|
|
2 |
IP=172.20.120.141 |
|
4 | 3 |
[External] |
5 |
IP=203.226.6.165 |
|
6 |
|
|
4 |
IP=203.226.6.165 |
|
7 | 5 |
[BaseClientAddress] |
8 |
URL=http://172.20.120.141:5978 |
|
9 |
|
|
10 |
[OriginalFileUrl] |
|
11 |
Internal=http://172.20.110.75:8880 |
|
12 |
External=https://ensembleitf.daelim.co.kr |
|
13 |
|
|
6 |
URL=http://172.20.120.141:5978 |
|
7 |
[InternalOriginalFileUrl] |
|
8 |
URL=http://172.20.110.75:8880 |
|
9 |
[ExternalOriginalFileUrl] |
|
10 |
URL=https://ensembleitf.daelim.co.kr |
|
14 | 11 |
[HubAddress] |
15 | 12 |
URL=http://172.20.120.141:5100/ |
16 | 13 |
[UpdateVer64] |
내보내기 Unified diff