프로젝트

일반

사용자정보

개정판 9ca8730b

ID9ca8730b36a25d687010fd916799562abe1befa5
상위 ff990784
하위 5da35756

백흠경이(가) 일년 이상 전에 추가함

Feature: Verification 기능 추가(진행 중)

Change-Id: I6e28f60470e588f770bb456965a1afe771a9356a

차이점 보기:

ID2.Manager/ID2.Manager/Classes/ID2Helper.cs
5 5
using System.Linq;
6 6
using System.Net.Sockets;
7 7
using System.Reflection;
8
using System.Runtime.InteropServices;
8 9
using System.Text;
9 10
using System.Threading.Tasks;
10 11

  
......
12 13
{
13 14
    public static class ID2Helper
14 15
    {
16
        [DllImport("kernel32")]
17
        private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
18
        [DllImport("kernel32")]
19
        private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
20
        [DllImport("kernel32.dll")]
21
        private static extern int GetPrivateProfileSection(string lpAppName, byte[] lpszReturnBuffer, int nSize, string lpFileName);
22

  
15 23
        /// <summary>
16 24
        /// 주어진 DrawingName의 도면을 ID2에서 엽니다.
17 25
        /// </summary>
......
52 60
                }
53 61
            }
54 62
        }
63

  
64
        /// <summary>
65
        /// Write Data to the INI File
66
        /// </summary>
67
        /// <PARAM name="Section"></PARAM>
68
        /// Section name
69
        /// <PARAM name="Key"></PARAM>
70
        /// Key Name
71
        /// <PARAM name="Value"></PARAM>
72
        /// Value Name
73
        public static void IniWriteValue(string sPath, string Section, string Key, string Value)
74
        {
75
            WritePrivateProfileString(Section, Key, Value, sPath);
76
        }
77

  
78
        /// <summary>
79
        /// Read Data Value From the Ini File
80
        /// </summary>
81
        /// <PARAM name="Section"></PARAM>
82
        /// <PARAM name="Key"></PARAM>
83
        /// <PARAM name="Path"></PARAM>
84
        /// <returns></returns>
85
        public static string IniReadValue(string sPath, string Section, string Key)
86
        {
87
            StringBuilder temp = new StringBuilder(255);
88
            int i = GetPrivateProfileString(Section, Key, string.Empty, temp, 255, sPath);
89
            return temp.ToString();
90
        }
55 91
    }
56 92
}
ID2.Manager/ID2.Manager/Controls/Verification.Designer.cs
32 32
            devDept.Eyeshot.CancelToolBarButton cancelToolBarButton1 = new devDept.Eyeshot.CancelToolBarButton("Cancel", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
33 33
            devDept.Eyeshot.ProgressBar progressBar1 = new devDept.Eyeshot.ProgressBar(devDept.Eyeshot.ProgressBar.styleType.Circular, 0, "Idle", System.Drawing.Color.Black, System.Drawing.Color.Transparent, System.Drawing.Color.Green, 1D, true, cancelToolBarButton1, false, 0.1D, 0.333D, true);
34 34
            devDept.Graphics.BackgroundSettings backgroundSettings1 = new devDept.Graphics.BackgroundSettings(devDept.Graphics.backgroundStyleType.Solid, System.Drawing.Color.DeepSkyBlue, System.Drawing.Color.DodgerBlue, System.Drawing.Color.Black, 0.75D, null, devDept.Graphics.colorThemeType.Auto, 0.33D);
35
            devDept.Eyeshot.Camera camera1 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 1.2558923276065208D, false, 0.001D);
35
            devDept.Eyeshot.Camera camera1 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 1.3889669754156004D, false, 0.001D);
36 36
            devDept.Eyeshot.MagnifyingGlassToolBarButton magnifyingGlassToolBarButton1 = new devDept.Eyeshot.MagnifyingGlassToolBarButton("Magnifying Glass", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
37 37
            devDept.Eyeshot.ZoomWindowToolBarButton zoomWindowToolBarButton1 = new devDept.Eyeshot.ZoomWindowToolBarButton("Zoom Window", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
38 38
            devDept.Eyeshot.ZoomToolBarButton zoomToolBarButton1 = new devDept.Eyeshot.ZoomToolBarButton("Zoom", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
......
54 54
            devDept.Eyeshot.CoordinateSystemIcon coordinateSystemIcon1 = new devDept.Eyeshot.CoordinateSystemIcon(new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.OrangeRed, "Origin", "X", "Y", "Z", true, devDept.Eyeshot.coordinateSystemPositionType.BottomLeft, 37, null, false);
55 55
            devDept.Eyeshot.ViewCubeIcon viewCubeIcon1 = new devDept.Eyeshot.ViewCubeIcon(devDept.Eyeshot.coordinateSystemPositionType.TopRight, false, System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(20)))), ((int)(((byte)(60))))), true, "FRONT", "BACK", "LEFT", "RIGHT", "TOP", "BOTTOM", System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), 'S', 'N', 'W', 'E', true, null, System.Drawing.Color.White, System.Drawing.Color.Black, 120, true, true, null, null, null, null, null, null, false, new devDept.Geometry.Quaternion(0D, 0D, 0D, 1D), true);
56 56
            devDept.Eyeshot.Viewport.SavedViewsManager savedViewsManager1 = new devDept.Eyeshot.Viewport.SavedViewsManager(8);
57
            devDept.Eyeshot.Viewport viewport1 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(299, 302), backgroundSettings1, camera1, new devDept.Eyeshot.ToolBar[] {
57
            devDept.Eyeshot.Viewport viewport1 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(426, 334), backgroundSettings1, camera1, new devDept.Eyeshot.ToolBar[] {
58 58
            toolBar1}, new devDept.Eyeshot.Legend[0], histogram1, devDept.Eyeshot.displayType.Wireframe, true, false, false, false, new devDept.Eyeshot.Grid[] {
59 59
            grid1}, new devDept.Eyeshot.OriginSymbol[] {
60 60
            originSymbol1}, false, rotateSettings1, zoomSettings1, panSettings1, navigationSettings1, coordinateSystemIcon1, viewCubeIcon1, savedViewsManager1, devDept.Eyeshot.viewType.Top);
61 61
            devDept.Eyeshot.CancelToolBarButton cancelToolBarButton2 = new devDept.Eyeshot.CancelToolBarButton("Cancel", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
62 62
            devDept.Eyeshot.ProgressBar progressBar2 = new devDept.Eyeshot.ProgressBar(devDept.Eyeshot.ProgressBar.styleType.Circular, 0, "Idle", System.Drawing.Color.Black, System.Drawing.Color.Transparent, System.Drawing.Color.Green, 1D, true, cancelToolBarButton2, false, 0.1D, 0.333D, true);
63 63
            devDept.Graphics.BackgroundSettings backgroundSettings2 = new devDept.Graphics.BackgroundSettings(devDept.Graphics.backgroundStyleType.Solid, System.Drawing.Color.DeepSkyBlue, System.Drawing.Color.DodgerBlue, System.Drawing.Color.Black, 0.75D, null, devDept.Graphics.colorThemeType.Auto, 0.33D);
64
            devDept.Eyeshot.Camera camera2 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 1.2558923276065208D, false, 0.001D);
64
            devDept.Eyeshot.Camera camera2 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 1.3889669754156004D, false, 0.001D);
65 65
            devDept.Eyeshot.MagnifyingGlassToolBarButton magnifyingGlassToolBarButton2 = new devDept.Eyeshot.MagnifyingGlassToolBarButton("Magnifying Glass", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
66 66
            devDept.Eyeshot.ZoomWindowToolBarButton zoomWindowToolBarButton2 = new devDept.Eyeshot.ZoomWindowToolBarButton("Zoom Window", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
67 67
            devDept.Eyeshot.ZoomToolBarButton zoomToolBarButton2 = new devDept.Eyeshot.ZoomToolBarButton("Zoom", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
......
83 83
            devDept.Eyeshot.CoordinateSystemIcon coordinateSystemIcon2 = new devDept.Eyeshot.CoordinateSystemIcon(new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.OrangeRed, "Origin", "X", "Y", "Z", true, devDept.Eyeshot.coordinateSystemPositionType.BottomLeft, 37, null, false);
84 84
            devDept.Eyeshot.ViewCubeIcon viewCubeIcon2 = new devDept.Eyeshot.ViewCubeIcon(devDept.Eyeshot.coordinateSystemPositionType.TopRight, false, System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(20)))), ((int)(((byte)(60))))), true, "FRONT", "BACK", "LEFT", "RIGHT", "TOP", "BOTTOM", System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), 'S', 'N', 'W', 'E', true, null, System.Drawing.Color.White, System.Drawing.Color.Black, 120, true, true, null, null, null, null, null, null, false, new devDept.Geometry.Quaternion(0D, 0D, 0D, 1D), true);
85 85
            devDept.Eyeshot.Viewport.SavedViewsManager savedViewsManager2 = new devDept.Eyeshot.Viewport.SavedViewsManager(8);
86
            devDept.Eyeshot.Viewport viewport2 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(299, 302), backgroundSettings2, camera2, new devDept.Eyeshot.ToolBar[] {
86
            devDept.Eyeshot.Viewport viewport2 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(426, 334), backgroundSettings2, camera2, new devDept.Eyeshot.ToolBar[] {
87 87
            toolBar2}, new devDept.Eyeshot.Legend[0], histogram2, devDept.Eyeshot.displayType.Wireframe, true, false, false, false, new devDept.Eyeshot.Grid[] {
88 88
            grid2}, new devDept.Eyeshot.OriginSymbol[] {
89 89
            originSymbol2}, false, rotateSettings2, zoomSettings2, panSettings2, navigationSettings2, coordinateSystemIcon2, viewCubeIcon2, savedViewsManager2, devDept.Eyeshot.viewType.Top);
90
            devDept.Eyeshot.CancelToolBarButton cancelToolBarButton3 = new devDept.Eyeshot.CancelToolBarButton("Cancel", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
91
            devDept.Eyeshot.ProgressBar progressBar3 = new devDept.Eyeshot.ProgressBar(devDept.Eyeshot.ProgressBar.styleType.Circular, 0, "Idle", System.Drawing.Color.Black, System.Drawing.Color.Transparent, System.Drawing.Color.Green, 1D, true, cancelToolBarButton3, false, 0.1D, 0.333D, true);
92
            devDept.Graphics.BackgroundSettings backgroundSettings3 = new devDept.Graphics.BackgroundSettings(devDept.Graphics.backgroundStyleType.Solid, System.Drawing.Color.DeepSkyBlue, System.Drawing.Color.DodgerBlue, System.Drawing.Color.Black, 0.75D, null, devDept.Graphics.colorThemeType.Auto, 0.33D);
93
            devDept.Eyeshot.Camera camera3 = new devDept.Eyeshot.Camera(new devDept.Geometry.Point3D(-4.5374030325107811E-16D, 2.0434646606445308D, 47.596564948558793D), 97.257904648780823D, new devDept.Geometry.Quaternion(0.49999999999999989D, 0.5D, 0.5D, 0.50000000000000011D), devDept.Graphics.projectionType.Orthographic, 40D, 1.2558923419968531D, false, 0.001D);
94
            devDept.Eyeshot.MagnifyingGlassToolBarButton magnifyingGlassToolBarButton3 = new devDept.Eyeshot.MagnifyingGlassToolBarButton("Magnifying Glass", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
95
            devDept.Eyeshot.ZoomWindowToolBarButton zoomWindowToolBarButton3 = new devDept.Eyeshot.ZoomWindowToolBarButton("Zoom Window", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
96
            devDept.Eyeshot.ZoomToolBarButton zoomToolBarButton3 = new devDept.Eyeshot.ZoomToolBarButton("Zoom", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
97
            devDept.Eyeshot.PanToolBarButton panToolBarButton3 = new devDept.Eyeshot.PanToolBarButton("Pan", devDept.Eyeshot.ToolBarButton.styleType.ToggleButton, true, true);
98
            devDept.Eyeshot.ZoomFitToolBarButton zoomFitToolBarButton3 = new devDept.Eyeshot.ZoomFitToolBarButton("Zoom Fit", devDept.Eyeshot.ToolBarButton.styleType.PushButton, true, true);
99
            devDept.Eyeshot.ToolBar toolBar3 = new devDept.Eyeshot.ToolBar(devDept.Eyeshot.ToolBar.positionType.HorizontalTopCenter, true, new devDept.Eyeshot.ToolBarButton[] {
100
            ((devDept.Eyeshot.ToolBarButton)(magnifyingGlassToolBarButton3)),
101
            ((devDept.Eyeshot.ToolBarButton)(zoomWindowToolBarButton3)),
102
            ((devDept.Eyeshot.ToolBarButton)(zoomToolBarButton3)),
103
            ((devDept.Eyeshot.ToolBarButton)(panToolBarButton3)),
104
            ((devDept.Eyeshot.ToolBarButton)(zoomFitToolBarButton3))});
105
            devDept.Eyeshot.Histogram histogram3 = new devDept.Eyeshot.Histogram(30, 80, "Title", System.Drawing.Color.Blue, System.Drawing.Color.Gray, System.Drawing.Color.Black, System.Drawing.Color.Red, System.Drawing.Color.LightYellow, false, true, false, "{0:+0.###;-0.###;0}");
106
            devDept.Eyeshot.Grid grid3 = new devDept.Eyeshot.Grid(new devDept.Geometry.Point2D(-100D, -100D), new devDept.Geometry.Point2D(100D, 100D), 10D, new devDept.Geometry.Plane(new devDept.Geometry.Point3D(0D, 0D, 0D), new devDept.Geometry.Vector3D(0D, 0D, 1D)), System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))), System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))), System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))), false, false, false, false, 10, 100, 10, System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))), System.Drawing.Color.Transparent, false, System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))));
107
            devDept.Eyeshot.OriginSymbol originSymbol3 = new devDept.Eyeshot.OriginSymbol(10, devDept.Eyeshot.originSymbolStyleType.Ball, new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Red, System.Drawing.Color.Green, System.Drawing.Color.Blue, "Origin", "X", "Y", "Z", true, null, false);
108
            devDept.Eyeshot.RotateSettings rotateSettings3 = new devDept.Eyeshot.RotateSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.None), 10D, false, 1D, devDept.Eyeshot.rotationType.Trackball, devDept.Eyeshot.rotationCenterType.CursorLocation, new devDept.Geometry.Point3D(0D, 0D, 0D), false);
109
            devDept.Eyeshot.ZoomSettings zoomSettings3 = new devDept.Eyeshot.ZoomSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.Shift), 25, true, devDept.Eyeshot.zoomStyleType.AtCursorLocation, false, 1D, System.Drawing.Color.Empty, devDept.Eyeshot.Camera.perspectiveFitType.Accurate, false, 10, true);
110
            devDept.Eyeshot.PanSettings panSettings3 = new devDept.Eyeshot.PanSettings(new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Middle, devDept.Eyeshot.modifierKeys.Ctrl), 25, true);
111
            devDept.Eyeshot.NavigationSettings navigationSettings3 = new devDept.Eyeshot.NavigationSettings(devDept.Eyeshot.Camera.navigationType.Examine, new devDept.Eyeshot.MouseButton(devDept.Eyeshot.mouseButtonsZPR.Left, devDept.Eyeshot.modifierKeys.None), new devDept.Geometry.Point3D(-1000D, -1000D, -1000D), new devDept.Geometry.Point3D(1000D, 1000D, 1000D), 8D, 50D, 50D);
112
            devDept.Eyeshot.CoordinateSystemIcon coordinateSystemIcon3 = new devDept.Eyeshot.CoordinateSystemIcon(new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))), System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.Black, System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))), System.Drawing.Color.OrangeRed, "Origin", "X", "Y", "Z", true, devDept.Eyeshot.coordinateSystemPositionType.BottomLeft, 37, null, false);
113
            devDept.Eyeshot.ViewCubeIcon viewCubeIcon3 = new devDept.Eyeshot.ViewCubeIcon(devDept.Eyeshot.coordinateSystemPositionType.TopRight, false, System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(20)))), ((int)(((byte)(60))))), true, "FRONT", "BACK", "LEFT", "RIGHT", "TOP", "BOTTOM", System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(77)))), ((int)(((byte)(77)))), ((int)(((byte)(77))))), 'S', 'N', 'W', 'E', true, null, System.Drawing.Color.White, System.Drawing.Color.Black, 120, true, true, null, null, null, null, null, null, false, new devDept.Geometry.Quaternion(0D, 0D, 0D, 1D), true);
114
            devDept.Eyeshot.Viewport.SavedViewsManager savedViewsManager3 = new devDept.Eyeshot.Viewport.SavedViewsManager(8);
115
            devDept.Eyeshot.Viewport viewport3 = new devDept.Eyeshot.Viewport(new System.Drawing.Point(0, 0), new System.Drawing.Size(602, 302), backgroundSettings3, camera3, new devDept.Eyeshot.ToolBar[] {
116
            toolBar3}, new devDept.Eyeshot.Legend[0], histogram3, devDept.Eyeshot.displayType.Wireframe, true, false, false, false, new devDept.Eyeshot.Grid[] {
117
            grid3}, new devDept.Eyeshot.OriginSymbol[] {
118
            originSymbol3}, false, rotateSettings3, zoomSettings3, panSettings3, navigationSettings3, coordinateSystemIcon3, viewCubeIcon3, savedViewsManager3, devDept.Eyeshot.viewType.Top);
119 90
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
91
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition();
120 92
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition();
121 93
            this.radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
122 94
            this.splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
......
127 99
            this.designAutoCAD = new devDept.Eyeshot.Design();
128 100
            this.splitPanelAVEVA = new Telerik.WinControls.UI.SplitPanel();
129 101
            this.designAVEVA = new devDept.Eyeshot.Design();
130
            this.splitPanelComparision = new Telerik.WinControls.UI.SplitPanel();
131
            this.designComparision = new devDept.Eyeshot.Design();
132 102
            this.splitPanelData = new Telerik.WinControls.UI.SplitPanel();
133 103
            this.radSplitContainerMain = new Telerik.WinControls.UI.RadSplitContainer();
134 104
            this.splitPanelDocument = new Telerik.WinControls.UI.SplitPanel();
135
            this.splitPanel4 = new Telerik.WinControls.UI.SplitPanel();
136 105
            this.radGridViewDocument = new Telerik.WinControls.UI.RadGridView();
106
            this.splitPanel4 = new Telerik.WinControls.UI.SplitPanel();
107
            this.tableLayoutPanelMain = new System.Windows.Forms.TableLayoutPanel();
108
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
109
            this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
110
            this.radTextBoxID2DrawingFolder = new Telerik.WinControls.UI.RadTextBox();
111
            this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
112
            this.radLabel2 = new Telerik.WinControls.UI.RadLabel();
113
            this.radBrowseEditorAVEVAPIDFolder = new Telerik.WinControls.UI.RadBrowseEditor();
114
            this.radGridViewData = new Telerik.WinControls.UI.RadGridView();
137 115
            ((System.ComponentModel.ISupportInitialize)(this.radSplitContainer1)).BeginInit();
138 116
            this.radSplitContainer1.SuspendLayout();
139 117
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel1)).BeginInit();
......
150 128
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelAVEVA)).BeginInit();
151 129
            this.splitPanelAVEVA.SuspendLayout();
152 130
            ((System.ComponentModel.ISupportInitialize)(this.designAVEVA)).BeginInit();
153
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelComparision)).BeginInit();
154
            this.splitPanelComparision.SuspendLayout();
155
            ((System.ComponentModel.ISupportInitialize)(this.designComparision)).BeginInit();
156 131
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelData)).BeginInit();
132
            this.splitPanelData.SuspendLayout();
157 133
            ((System.ComponentModel.ISupportInitialize)(this.radSplitContainerMain)).BeginInit();
158 134
            this.radSplitContainerMain.SuspendLayout();
159 135
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelDocument)).BeginInit();
160 136
            this.splitPanelDocument.SuspendLayout();
161
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel4)).BeginInit();
162
            this.splitPanel4.SuspendLayout();
163 137
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewDocument)).BeginInit();
164 138
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewDocument.MasterTemplate)).BeginInit();
139
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel4)).BeginInit();
140
            this.splitPanel4.SuspendLayout();
141
            this.tableLayoutPanelMain.SuspendLayout();
142
            this.tableLayoutPanel1.SuspendLayout();
143
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
144
            ((System.ComponentModel.ISupportInitialize)(this.radTextBoxID2DrawingFolder)).BeginInit();
145
            this.tableLayoutPanel2.SuspendLayout();
146
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit();
147
            ((System.ComponentModel.ISupportInitialize)(this.radBrowseEditorAVEVAPIDFolder)).BeginInit();
148
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewData)).BeginInit();
149
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewData.MasterTemplate)).BeginInit();
165 150
            this.SuspendLayout();
166 151
            // 
167 152
            // radSplitContainer1
......
171 156
            this.radSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
172 157
            this.radSplitContainer1.Location = new System.Drawing.Point(0, 0);
173 158
            this.radSplitContainer1.Name = "radSplitContainer1";
159
            this.radSplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
174 160
            // 
175 161
            // 
176 162
            // 
177 163
            this.radSplitContainer1.RootElement.MinSize = new System.Drawing.Size(25, 25);
178
            this.radSplitContainer1.Size = new System.Drawing.Size(856, 608);
164
            this.radSplitContainer1.Size = new System.Drawing.Size(856, 538);
179 165
            this.radSplitContainer1.TabIndex = 0;
180 166
            this.radSplitContainer1.TabStop = false;
181 167
            // 
......
188 174
            // 
189 175
            // 
190 176
            this.splitPanel1.RootElement.MinSize = new System.Drawing.Size(25, 25);
191
            this.splitPanel1.Size = new System.Drawing.Size(602, 608);
177
            this.splitPanel1.Size = new System.Drawing.Size(856, 334);
192 178
            this.splitPanel1.SizeInfo.AutoSizeScale = new System.Drawing.SizeF(0.2820976F, 0F);
193 179
            this.splitPanel1.SizeInfo.SplitterCorrection = new System.Drawing.Size(312, 0);
194 180
            this.splitPanel1.TabIndex = 0;
......
198 184
            // radSplitContainer2
199 185
            // 
200 186
            this.radSplitContainer2.Controls.Add(this.splitPanel2);
201
            this.radSplitContainer2.Controls.Add(this.splitPanelComparision);
202 187
            this.radSplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
203 188
            this.radSplitContainer2.Location = new System.Drawing.Point(0, 0);
204 189
            this.radSplitContainer2.Name = "radSplitContainer2";
......
207 192
            // 
208 193
            // 
209 194
            this.radSplitContainer2.RootElement.MinSize = new System.Drawing.Size(25, 25);
210
            this.radSplitContainer2.Size = new System.Drawing.Size(602, 608);
195
            this.radSplitContainer2.Size = new System.Drawing.Size(856, 334);
211 196
            this.radSplitContainer2.TabIndex = 0;
212 197
            this.radSplitContainer2.TabStop = false;
213 198
            // 
......
220 205
            // 
221 206
            // 
222 207
            this.splitPanel2.RootElement.MinSize = new System.Drawing.Size(25, 25);
223
            this.splitPanel2.Size = new System.Drawing.Size(602, 302);
208
            this.splitPanel2.Size = new System.Drawing.Size(856, 334);
224 209
            this.splitPanel2.TabIndex = 0;
225 210
            this.splitPanel2.TabStop = false;
226 211
            this.splitPanel2.Text = "splitPanel2";
......
236 221
            // 
237 222
            // 
238 223
            this.radSplitContainer3.RootElement.MinSize = new System.Drawing.Size(25, 25);
239
            this.radSplitContainer3.Size = new System.Drawing.Size(602, 302);
224
            this.radSplitContainer3.Size = new System.Drawing.Size(856, 334);
240 225
            this.radSplitContainer3.TabIndex = 0;
241 226
            this.radSplitContainer3.TabStop = false;
242 227
            // 
......
249 234
            // 
250 235
            // 
251 236
            this.splitPanelAutoCAD.RootElement.MinSize = new System.Drawing.Size(25, 25);
252
            this.splitPanelAutoCAD.Size = new System.Drawing.Size(299, 302);
237
            this.splitPanelAutoCAD.Size = new System.Drawing.Size(426, 334);
253 238
            this.splitPanelAutoCAD.TabIndex = 0;
254 239
            this.splitPanelAutoCAD.TabStop = false;
255 240
            this.splitPanelAutoCAD.Text = "splitPanel4";
......
261 246
            this.designAutoCAD.Location = new System.Drawing.Point(0, 0);
262 247
            this.designAutoCAD.Name = "designAutoCAD";
263 248
            this.designAutoCAD.ProgressBar = progressBar1;
264
            this.designAutoCAD.Size = new System.Drawing.Size(299, 302);
249
            this.designAutoCAD.Size = new System.Drawing.Size(426, 334);
265 250
            this.designAutoCAD.TabIndex = 0;
266 251
            this.designAutoCAD.Text = "design1";
267 252
            this.designAutoCAD.Viewports.Add(viewport1);
......
269 254
            // splitPanelAVEVA
270 255
            // 
271 256
            this.splitPanelAVEVA.Controls.Add(this.designAVEVA);
272
            this.splitPanelAVEVA.Location = new System.Drawing.Point(303, 0);
257
            this.splitPanelAVEVA.Location = new System.Drawing.Point(430, 0);
273 258
            this.splitPanelAVEVA.Name = "splitPanelAVEVA";
274 259
            // 
275 260
            // 
276 261
            // 
277 262
            this.splitPanelAVEVA.RootElement.MinSize = new System.Drawing.Size(25, 25);
278
            this.splitPanelAVEVA.Size = new System.Drawing.Size(299, 302);
263
            this.splitPanelAVEVA.Size = new System.Drawing.Size(426, 334);
279 264
            this.splitPanelAVEVA.TabIndex = 1;
280 265
            this.splitPanelAVEVA.TabStop = false;
281 266
            this.splitPanelAVEVA.Text = "splitPanel5";
......
287 272
            this.designAVEVA.Location = new System.Drawing.Point(0, 0);
288 273
            this.designAVEVA.Name = "designAVEVA";
289 274
            this.designAVEVA.ProgressBar = progressBar2;
290
            this.designAVEVA.Size = new System.Drawing.Size(299, 302);
275
            this.designAVEVA.Size = new System.Drawing.Size(426, 334);
291 276
            this.designAVEVA.TabIndex = 0;
292 277
            this.designAVEVA.Text = "design1";
293 278
            this.designAVEVA.Viewports.Add(viewport2);
294 279
            // 
295
            // splitPanelComparision
296
            // 
297
            this.splitPanelComparision.Controls.Add(this.designComparision);
298
            this.splitPanelComparision.Location = new System.Drawing.Point(0, 306);
299
            this.splitPanelComparision.Name = "splitPanelComparision";
300
            // 
301
            // 
302
            // 
303
            this.splitPanelComparision.RootElement.MinSize = new System.Drawing.Size(25, 25);
304
            this.splitPanelComparision.Size = new System.Drawing.Size(602, 302);
305
            this.splitPanelComparision.TabIndex = 1;
306
            this.splitPanelComparision.TabStop = false;
307
            this.splitPanelComparision.Text = "splitPanel3";
308
            // 
309
            // designComparision
310
            // 
311
            this.designComparision.Cursor = System.Windows.Forms.Cursors.Default;
312
            this.designComparision.Dock = System.Windows.Forms.DockStyle.Fill;
313
            this.designComparision.Location = new System.Drawing.Point(0, 0);
314
            this.designComparision.Name = "designComparision";
315
            this.designComparision.ProgressBar = progressBar3;
316
            this.designComparision.Size = new System.Drawing.Size(602, 302);
317
            this.designComparision.TabIndex = 0;
318
            this.designComparision.Text = "design1";
319
            this.designComparision.Viewports.Add(viewport3);
320
            // 
321 280
            // splitPanelData
322 281
            // 
323
            this.splitPanelData.Location = new System.Drawing.Point(606, 0);
282
            this.splitPanelData.Controls.Add(this.radGridViewData);
283
            this.splitPanelData.Location = new System.Drawing.Point(0, 338);
324 284
            this.splitPanelData.Name = "splitPanelData";
325 285
            // 
326 286
            // 
327 287
            // 
328 288
            this.splitPanelData.RootElement.MinSize = new System.Drawing.Size(25, 25);
329
            this.splitPanelData.Size = new System.Drawing.Size(250, 608);
289
            this.splitPanelData.Size = new System.Drawing.Size(856, 200);
330 290
            this.splitPanelData.SizeInfo.AbsoluteSize = new System.Drawing.Size(250, 200);
331 291
            this.splitPanelData.SizeInfo.AutoSizeScale = new System.Drawing.SizeF(-0.2820976F, 0F);
332 292
            this.splitPanelData.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute;
......
339 299
            this.radSplitContainerMain.Controls.Add(this.splitPanelDocument);
340 300
            this.radSplitContainerMain.Controls.Add(this.splitPanel4);
341 301
            this.radSplitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill;
342
            this.radSplitContainerMain.Location = new System.Drawing.Point(0, 0);
302
            this.radSplitContainerMain.Location = new System.Drawing.Point(0, 70);
343 303
            this.radSplitContainerMain.Name = "radSplitContainerMain";
344 304
            // 
345 305
            // 
346 306
            // 
347 307
            this.radSplitContainerMain.RootElement.MinSize = new System.Drawing.Size(25, 25);
348
            this.radSplitContainerMain.Size = new System.Drawing.Size(1110, 608);
308
            this.radSplitContainerMain.Size = new System.Drawing.Size(1110, 538);
349 309
            this.radSplitContainerMain.TabIndex = 1;
350 310
            this.radSplitContainerMain.TabStop = false;
351 311
            // 
......
358 318
            // 
359 319
            // 
360 320
            this.splitPanelDocument.RootElement.MinSize = new System.Drawing.Size(25, 25);
361
            this.splitPanelDocument.Size = new System.Drawing.Size(250, 608);
321
            this.splitPanelDocument.Size = new System.Drawing.Size(250, 538);
362 322
            this.splitPanelDocument.SizeInfo.AbsoluteSize = new System.Drawing.Size(250, 200);
363 323
            this.splitPanelDocument.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute;
364 324
            this.splitPanelDocument.TabIndex = 0;
365 325
            this.splitPanelDocument.TabStop = false;
366 326
            // 
367
            // splitPanel4
368
            // 
369
            this.splitPanel4.Controls.Add(this.radSplitContainer1);
370
            this.splitPanel4.Location = new System.Drawing.Point(254, 0);
371
            this.splitPanel4.Name = "splitPanel4";
372
            // 
373
            // 
374
            // 
375
            this.splitPanel4.RootElement.MinSize = new System.Drawing.Size(25, 25);
376
            this.splitPanel4.Size = new System.Drawing.Size(856, 608);
377
            this.splitPanel4.TabIndex = 1;
378
            this.splitPanel4.TabStop = false;
379
            this.splitPanel4.Text = "splitPanel4";
380
            // 
381 327
            // radGridViewDocument
382 328
            // 
383 329
            this.radGridViewDocument.Dock = System.Windows.Forms.DockStyle.Fill;
......
393 339
            gridViewTextBoxColumn1.Name = "columnDocumentNo";
394 340
            this.radGridViewDocument.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
395 341
            gridViewTextBoxColumn1});
396
            this.radGridViewDocument.MasterTemplate.ViewDefinition = tableViewDefinition1;
342
            this.radGridViewDocument.MasterTemplate.ViewDefinition = tableViewDefinition2;
397 343
            this.radGridViewDocument.Name = "radGridViewDocument";
398
            this.radGridViewDocument.Size = new System.Drawing.Size(250, 608);
344
            this.radGridViewDocument.Size = new System.Drawing.Size(250, 538);
399 345
            this.radGridViewDocument.TabIndex = 0;
400 346
            // 
347
            // splitPanel4
348
            // 
349
            this.splitPanel4.Controls.Add(this.radSplitContainer1);
350
            this.splitPanel4.Location = new System.Drawing.Point(254, 0);
351
            this.splitPanel4.Name = "splitPanel4";
352
            // 
353
            // 
354
            // 
355
            this.splitPanel4.RootElement.MinSize = new System.Drawing.Size(25, 25);
356
            this.splitPanel4.Size = new System.Drawing.Size(856, 538);
357
            this.splitPanel4.TabIndex = 1;
358
            this.splitPanel4.TabStop = false;
359
            this.splitPanel4.Text = "splitPanel4";
360
            // 
361
            // tableLayoutPanelMain
362
            // 
363
            this.tableLayoutPanelMain.ColumnCount = 1;
364
            this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
365
            this.tableLayoutPanelMain.Controls.Add(this.radSplitContainerMain, 0, 2);
366
            this.tableLayoutPanelMain.Controls.Add(this.tableLayoutPanel1, 0, 0);
367
            this.tableLayoutPanelMain.Controls.Add(this.tableLayoutPanel2, 0, 1);
368
            this.tableLayoutPanelMain.Dock = System.Windows.Forms.DockStyle.Fill;
369
            this.tableLayoutPanelMain.Location = new System.Drawing.Point(0, 0);
370
            this.tableLayoutPanelMain.Name = "tableLayoutPanelMain";
371
            this.tableLayoutPanelMain.RowCount = 3;
372
            this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
373
            this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
374
            this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
375
            this.tableLayoutPanelMain.Size = new System.Drawing.Size(1110, 608);
376
            this.tableLayoutPanelMain.TabIndex = 2;
377
            // 
378
            // tableLayoutPanel1
379
            // 
380
            this.tableLayoutPanel1.ColumnCount = 2;
381
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
382
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
383
            this.tableLayoutPanel1.Controls.Add(this.radLabel1, 0, 0);
384
            this.tableLayoutPanel1.Controls.Add(this.radTextBoxID2DrawingFolder, 1, 0);
385
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
386
            this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
387
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
388
            this.tableLayoutPanel1.RowCount = 1;
389
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
390
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F));
391
            this.tableLayoutPanel1.Size = new System.Drawing.Size(1104, 29);
392
            this.tableLayoutPanel1.TabIndex = 2;
393
            // 
394
            // radLabel1
395
            // 
396
            this.radLabel1.Anchor = System.Windows.Forms.AnchorStyles.Left;
397
            this.radLabel1.Location = new System.Drawing.Point(3, 5);
398
            this.radLabel1.Name = "radLabel1";
399
            this.radLabel1.Size = new System.Drawing.Size(111, 18);
400
            this.radLabel1.TabIndex = 0;
401
            this.radLabel1.Text = "ID2 Drawing Folder : ";
402
            // 
403
            // radTextBoxID2DrawingFolder
404
            // 
405
            this.radTextBoxID2DrawingFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
406
            this.radTextBoxID2DrawingFolder.Enabled = false;
407
            this.radTextBoxID2DrawingFolder.Location = new System.Drawing.Point(123, 4);
408
            this.radTextBoxID2DrawingFolder.Name = "radTextBoxID2DrawingFolder";
409
            this.radTextBoxID2DrawingFolder.Size = new System.Drawing.Size(978, 20);
410
            this.radTextBoxID2DrawingFolder.TabIndex = 1;
411
            // 
412
            // tableLayoutPanel2
413
            // 
414
            this.tableLayoutPanel2.ColumnCount = 2;
415
            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
416
            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
417
            this.tableLayoutPanel2.Controls.Add(this.radLabel2, 0, 0);
418
            this.tableLayoutPanel2.Controls.Add(this.radBrowseEditorAVEVAPIDFolder, 1, 0);
419
            this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
420
            this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 38);
421
            this.tableLayoutPanel2.Name = "tableLayoutPanel2";
422
            this.tableLayoutPanel2.RowCount = 1;
423
            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
424
            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F));
425
            this.tableLayoutPanel2.Size = new System.Drawing.Size(1104, 29);
426
            this.tableLayoutPanel2.TabIndex = 3;
427
            // 
428
            // radLabel2
429
            // 
430
            this.radLabel2.Anchor = System.Windows.Forms.AnchorStyles.Left;
431
            this.radLabel2.Location = new System.Drawing.Point(3, 5);
432
            this.radLabel2.Name = "radLabel2";
433
            this.radLabel2.Size = new System.Drawing.Size(104, 18);
434
            this.radLabel2.TabIndex = 0;
435
            this.radLabel2.Text = "AVEVA P&ID Folder : ";
436
            // 
437
            // radBrowseEditorAVEVAPIDFolder
438
            // 
439
            this.radBrowseEditorAVEVAPIDFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
440
            this.radBrowseEditorAVEVAPIDFolder.DialogType = Telerik.WinControls.UI.BrowseEditorDialogType.FolderBrowseDialog;
441
            this.radBrowseEditorAVEVAPIDFolder.Location = new System.Drawing.Point(123, 4);
442
            this.radBrowseEditorAVEVAPIDFolder.Name = "radBrowseEditorAVEVAPIDFolder";
443
            this.radBrowseEditorAVEVAPIDFolder.Size = new System.Drawing.Size(978, 20);
444
            this.radBrowseEditorAVEVAPIDFolder.TabIndex = 1;
445
            // 
446
            // radGridViewData
447
            // 
448
            this.radGridViewData.Dock = System.Windows.Forms.DockStyle.Fill;
449
            this.radGridViewData.Location = new System.Drawing.Point(0, 0);
450
            // 
451
            // 
452
            // 
453
            this.radGridViewData.MasterTemplate.ViewDefinition = tableViewDefinition1;
454
            this.radGridViewData.Name = "radGridViewData";
455
            this.radGridViewData.Size = new System.Drawing.Size(856, 200);
456
            this.radGridViewData.TabIndex = 0;
457
            // 
401 458
            // Verification
402 459
            // 
403 460
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
404 461
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
405
            this.Controls.Add(this.radSplitContainerMain);
462
            this.Controls.Add(this.tableLayoutPanelMain);
406 463
            this.Name = "Verification";
407 464
            this.Size = new System.Drawing.Size(1110, 608);
408 465
            ((System.ComponentModel.ISupportInitialize)(this.radSplitContainer1)).EndInit();
......
421 478
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelAVEVA)).EndInit();
422 479
            this.splitPanelAVEVA.ResumeLayout(false);
423 480
            ((System.ComponentModel.ISupportInitialize)(this.designAVEVA)).EndInit();
424
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelComparision)).EndInit();
425
            this.splitPanelComparision.ResumeLayout(false);
426
            ((System.ComponentModel.ISupportInitialize)(this.designComparision)).EndInit();
427 481
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelData)).EndInit();
482
            this.splitPanelData.ResumeLayout(false);
428 483
            ((System.ComponentModel.ISupportInitialize)(this.radSplitContainerMain)).EndInit();
429 484
            this.radSplitContainerMain.ResumeLayout(false);
430 485
            ((System.ComponentModel.ISupportInitialize)(this.splitPanelDocument)).EndInit();
431 486
            this.splitPanelDocument.ResumeLayout(false);
432
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel4)).EndInit();
433
            this.splitPanel4.ResumeLayout(false);
434 487
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewDocument.MasterTemplate)).EndInit();
435 488
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewDocument)).EndInit();
489
            ((System.ComponentModel.ISupportInitialize)(this.splitPanel4)).EndInit();
490
            this.splitPanel4.ResumeLayout(false);
491
            this.tableLayoutPanelMain.ResumeLayout(false);
492
            this.tableLayoutPanel1.ResumeLayout(false);
493
            this.tableLayoutPanel1.PerformLayout();
494
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
495
            ((System.ComponentModel.ISupportInitialize)(this.radTextBoxID2DrawingFolder)).EndInit();
496
            this.tableLayoutPanel2.ResumeLayout(false);
497
            this.tableLayoutPanel2.PerformLayout();
498
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit();
499
            ((System.ComponentModel.ISupportInitialize)(this.radBrowseEditorAVEVAPIDFolder)).EndInit();
500
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewData.MasterTemplate)).EndInit();
501
            ((System.ComponentModel.ISupportInitialize)(this.radGridViewData)).EndInit();
436 502
            this.ResumeLayout(false);
437 503

  
438 504
        }
......
444 510
        private Telerik.WinControls.UI.SplitPanel splitPanelData;
445 511
        private Telerik.WinControls.UI.RadSplitContainer radSplitContainer2;
446 512
        private Telerik.WinControls.UI.SplitPanel splitPanel2;
447
        private Telerik.WinControls.UI.SplitPanel splitPanelComparision;
448 513
        private Telerik.WinControls.UI.RadSplitContainer radSplitContainer3;
449 514
        private Telerik.WinControls.UI.SplitPanel splitPanelAutoCAD;
450 515
        private Telerik.WinControls.UI.SplitPanel splitPanelAVEVA;
451 516
        private devDept.Eyeshot.Design designAutoCAD;
452 517
        private devDept.Eyeshot.Design designAVEVA;
453
        private devDept.Eyeshot.Design designComparision;
454 518
        private Telerik.WinControls.UI.RadSplitContainer radSplitContainerMain;
455 519
        private Telerik.WinControls.UI.SplitPanel splitPanelDocument;
456 520
        private Telerik.WinControls.UI.SplitPanel splitPanel4;
457 521
        private Telerik.WinControls.UI.RadGridView radGridViewDocument;
522
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanelMain;
523
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
524
        private Telerik.WinControls.UI.RadLabel radLabel1;
525
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
526
        private Telerik.WinControls.UI.RadLabel radLabel2;
527
        private Telerik.WinControls.UI.RadTextBox radTextBoxID2DrawingFolder;
528
        private Telerik.WinControls.UI.RadBrowseEditor radBrowseEditorAVEVAPIDFolder;
529
        private Telerik.WinControls.UI.RadGridView radGridViewData;
458 530
    }
459 531
}
ID2.Manager/ID2.Manager/Controls/Verification.cs
1
using ID2.Manager.Common;
1
using devDept.Eyeshot;
2
using devDept.Eyeshot.Entities;
3
using devDept.Geometry.Entities;
4
using ID2.Manager.Common;
2 5
using ID2.Manager.Data.Models;
3 6
using System;
4 7
using System.Collections.Generic;
......
6 9
using System.Data;
7 10
using System.Drawing;
8 11
using System.Linq;
12
using System.Runtime.InteropServices;
9 13
using System.Text;
10 14
using System.Threading.Tasks;
11 15
using System.Windows.Forms;
......
15 19
    public partial class Verification : UserControl
16 20
    {
17 21
        readonly Informations informations = Informations.Instance;
22
        readonly string IniFilePath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), 
23
            Application.ProductName, $"{Application.ProductName}.ini");
24
        private static readonly Color NOT_MODIFIED_COLOR = Color.FromArgb(44, 44, 44);
18 25

  
19 26
        public Verification()
20 27
        {
21 28
            InitializeComponent();
22 29
            this.radGridViewDocument.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
23 30

  
31
            this.Load += Verification_Load;
24 32
            this.radGridViewDocument.SelectionChanged += RadGridViewDocument_SelectionChanged;
33
            this.radBrowseEditorAVEVAPIDFolder.ValueChanged += RadBrowseEditorAVEVAPIDFolder_ValueChanged;
34

  
35
            #region Camera Sync
36
            this.designAutoCAD.ActiveViewport.Rotate.Enabled = false;
37
            this.designAVEVA.ActiveViewport.Rotate.Enabled = false;
38

  
39
            this.designAutoCAD.ActiveViewport.ViewCubeIcon.Visible = false;
40
            this.designAVEVA.ActiveViewport.ViewCubeIcon.Visible = false;
41

  
42
            this.designAutoCAD.AnimateCamera = false;
43
            this.designAVEVA.AnimateCamera = false;
44

  
45
            this.designAutoCAD.CameraChangedFrequency = 200;
46
            this.designAVEVA.CameraChangedFrequency = 200;
47

  
48
            this.designAutoCAD.CameraChanged += CameraChanged;
49
            this.designAVEVA.CameraChanged += CameraChanged;
50
            #endregion
51
        }
52

  
53
        private void RadBrowseEditorAVEVAPIDFolder_ValueChanged(object sender, EventArgs e)
54
        {
55
            string AVEVAPIDFolder = this.radBrowseEditorAVEVAPIDFolder.Value;
56
            if (System.IO.Directory.Exists(AVEVAPIDFolder))
57
            {
58
                Classes.ID2Helper.IniWriteValue(IniFilePath, "Path", "AVEVA P&ID Folder", AVEVAPIDFolder);
59
            }
60
        }
61

  
62
        private void Verification_Load(object sender, EventArgs e)
63
        {
64
            string AVEVAPIDFolder = Classes.ID2Helper.IniReadValue(IniFilePath, "Path", "AVEVA P&ID Folder");
65
            if (!string.IsNullOrEmpty(AVEVAPIDFolder)) this.radBrowseEditorAVEVAPIDFolder.Value = AVEVAPIDFolder;
66
        }
67

  
68
        public void ColorEntities(Design design, EntityList list)
69
        {
70
            foreach (Entity ent in list)
71
            {
72
                if (ent is BlockReference blkref)
73
                {
74
                    var blk = design.Blocks.FirstOrDefault(x => x.Name == blkref.BlockName);
75
                    if(blk != null)
76
                    {
77
                        foreach(Entity _ent in blk.Entities)
78
                        {
79
                            _ent.Color = NOT_MODIFIED_COLOR;
80
                            _ent.ColorMethod = colorMethodType.byEntity;
81
                        }
82
                    }
83
                }
84
                else
85
                {
86
                    ent.Color = NOT_MODIFIED_COLOR;
87
                    ent.ColorMethod = colorMethodType.byEntity;
88
                }
89
            }
25 90
        }
26 91

  
27 92
        private void RadGridViewDocument_SelectionChanged(object sender, EventArgs e)
28 93
        {
29 94
            void ShowAutoCADFile(string FilePath)
30 95
            {
96
                this.designAutoCAD.Clear();
31 97
                if (System.IO.File.Exists(FilePath))
32 98
                {
33
                    this.designAutoCAD.Clear();
34

  
35 99
                    devDept.Eyeshot.Translators.ReadAutodesk ra = new devDept.Eyeshot.Translators.ReadAutodesk(FilePath);
36 100
                    ra.DoWork();
37

  
38 101
                    ra.AddToScene(this.designAutoCAD);
102

  
103
                    ///Entity[] toAdd = this.designAutoCAD.Entities.Explode();
104
                    ///this.designAutoCAD.Entities.AddRange(toAdd, NOT_MODIFIED_COLOR);
105
                    ColorEntities(this.designAutoCAD, this.designAutoCAD.Entities);
106

  
107
                    // Sets the view as Top
108
                    this.designAutoCAD.SetView(viewType.Top);
39 109
                    this.designAutoCAD.ZoomFit();
40 110
                    this.designAutoCAD.Invalidate();
41 111
                }
42 112
            }
43 113

  
114
            void ShowAVEVAPIDFile(string FilePath)
115
            {
116
                this.designAVEVA.Clear();
117
                if (System.IO.File.Exists(FilePath))
118
                {
119
                    devDept.Eyeshot.Translators.ReadAutodesk ra = new devDept.Eyeshot.Translators.ReadAutodesk(FilePath);
120
                    ra.DoWork();
121
                    ra.AddToScene(this.designAVEVA);
122

  
123
                    ///Entity[] toAdd = this.designAVEVA.Entities.Explode();
124
                    ///this.designAVEVA.Entities.AddRange(toAdd, NOT_MODIFIED_COLOR);
125
                    ColorEntities(this.designAVEVA, this.designAVEVA.Entities);
126

  
127
                    this.designAVEVA.SetView(viewType.Top);
128
                    this.designAVEVA.ZoomFit();
129
                    this.designAVEVA.Invalidate();
130
                }
131
            }
132

  
44 133
            if (this.radGridViewDocument.SelectedRows.Any() && this.radGridViewDocument.SelectedRows.First().DataBoundItem is Documents doc)
45 134
            {
46 135
                string dwgExtension = ".dwg";
47
                string dwgFilePath = System.IO.Path.Combine(informations.FindID2LocalPath(doc.RefProjectCode), "drawings", "Native", $"{doc.DocumentNo}{dwgExtension}");
136
                string ID2DrawingFolder = System.IO.Path.Combine(informations.FindID2LocalPath(doc.RefProjectCode), "drawings", "Native");
137
                string dwgFilePath = System.IO.Path.Combine(ID2DrawingFolder, $"{doc.DocumentNo}{dwgExtension}");
138
                this.radTextBoxID2DrawingFolder.Text = ID2DrawingFolder;
48 139
                ShowAutoCADFile(dwgFilePath);
140

  
141
                string AVEVAPIDFolder = this.radBrowseEditorAVEVAPIDFolder.Value;
142
                string AVEVAPIDFilePath = System.IO.Path.Combine(AVEVAPIDFolder, $"{doc.DocumentNo}{dwgExtension}");
143
                ShowAVEVAPIDFile(AVEVAPIDFilePath);
144

  
145
                if(System.IO.File.Exists(dwgFilePath) && System.IO.File.Exists(AVEVAPIDFilePath))
146
                {
147
                    CompareAndMark(this.designAutoCAD.Entities, this.designAVEVA.Entities);
148
                }
49 149
            }
50 150
        }
51 151

  
......
54 154
            this.radGridViewDocument.FilterDescriptors.Clear();
55 155
            this.radGridViewDocument.DataSource = new BindingList<ID2.Manager.Data.Models.Documents>(docs);
56 156
        }
157

  
158
        private void CompareAndMark(IList<Entity> entList1, IList<Entity> entList2)
159
        {
160
            bool[] equalEntitiesInV2 = new bool[entList2.Count];
161

  
162
            try
163
            {
164
                for (int i = 0; i < entList1.Count(); i++)
165
                {
166
                    Entity entVp1 = entList1[i];
167
                    bool foundEqual = false;
168

  
169
                    for (int j = 0; j < entList2.Count(); j++)
170
                    {
171
                        Entity entVp2 = entList2[j];
172

  
173
                        if (!equalEntitiesInV2[j] && entVp1.GetType() == entVp2.GetType() && CompareIfEqual(entVp1, entVp2))
174
                        {
175
                            equalEntitiesInV2[j] = true;
176
                            foundEqual = true;
177
                            break;
178
                        }
179
                    }
180
                    if (!foundEqual)
181
                    {
182
                        entList1[i].Color = Color.Yellow;
183
                        entList1[i].ColorMethod = colorMethodType.byEntity;
184
                    }
185
                }
186

  
187
                for (int j = 0; j < entList2.Count; j++)
188
                {
189
                    if (!equalEntitiesInV2[j])
190
                    {
191
                        entList2[j].Color = Color.Yellow;
192
                        entList2[j].ColorMethod = colorMethodType.byEntity;
193
                    }
194
                }
195
            }
196
            catch(Exception ex)
197
            {
198
                Console.Write($"Error : {ex.Message}");
199
            }
200
        }
201

  
202
        private bool CompareIfEqual(Entity entVp1, Entity entVp2)
203
        {
204
            bool areEqualAttributes = AreEqualAttributes(entVp1, entVp2);
205
            bool areEqual = AreEqual(entVp1, entVp2);
206

  
207
            return areEqualAttributes && areEqual;
208
        }
209

  
210
        private bool CompareGEntityIfEqual(GEntity entVp1, GEntity entVp2)
211
        {
212
            return AreGEntityEqual(entVp1, entVp2);
213
        }
214

  
215
        private bool AreEqual(Entity ent1, Entity ent2)
216
        {
217
            if (ent1 is CompositeCurve)
218
            {
219
                CompositeCurve cc1 = (CompositeCurve)ent1;
220
                CompositeCurve cc2 = (CompositeCurve)ent2;
221

  
222
                if (cc1.CurveList.Count == cc2.CurveList.Count)
223
                {
224
                    int equalCurvesInListCount = 0;
225
                    foreach (var entC in cc1.CurveList)
226
                    {
227
                        foreach (var entC2 in cc2.CurveList)
228
                        {
229
                            if (entC.GetType() == entC2.GetType())
230
                            {
231
                                if (entC is Entity && entC2 is Entity && CompareIfEqual(entC as Entity, entC2 as Entity))
232
                                {
233
                                    equalCurvesInListCount++;
234
                                    break;
235
                                }
236
                                else if (entC is GEntity && entC2 is GEntity && CompareGEntityIfEqual(entC as GEntity, entC2 as GEntity))
237
                                {
238
                                    equalCurvesInListCount++;
239
                                    break;
240
                                }
241
                            }
242
                        }
243
                    }
244

  
245
                    if (cc1.CurveList.Count == equalCurvesInListCount)
246
                    {
247
                        return true;
248
                    }
249
                }
250
            }
251
            else if (ent1 is LinearPath)
252
            {
253
                LinearPath lp1 = (LinearPath)ent1;
254
                LinearPath lp2 = (LinearPath)ent2;
255

  
256
                if (lp1.Vertices.Length == lp2.Vertices.Length)
257
                {
258
                    for (int i = 0; i < lp1.Vertices.Length; i++)
259
                    {
260
                        if (!(lp1.Vertices[i] == lp2.Vertices[i]))
261
                            return false;
262
                    }
263
                    return true;
264
                }
265
            }
266

  
267
            else if (ent1 is PlanarEntity)
268
            {
269
                PlanarEntity pe1 = (PlanarEntity)ent1;
270
                PlanarEntity pe2 = (PlanarEntity)ent2;
271
                if (
272
                    pe1.Plane.AxisZ == pe2.Plane.AxisZ &&
273
                    pe1.Plane.AxisX == pe2.Plane.AxisX
274
                    )
275
                {
276
                    if (ent1 is Arc)
277
                    {
278
                        Arc arc1 = (Arc)ent1;
279
                        Arc arc2 = (Arc)ent2;
280

  
281
                        if (
282
                            arc1.Center == arc2.Center &&
283
                            arc1.Radius == arc2.Radius &&
284
                            arc1.Domain.Min == arc2.Domain.Min &&
285
                            arc1.Domain.Max == arc2.Domain.Max
286
                            )
287
                        {
288
                            return true;
289
                        }
290
                    }
291
                    else if (ent1 is Circle)
292
                    {
293
                        Circle c1 = (Circle)ent1;
294
                        Circle c2 = (Circle)ent2;
295

  
296
                        if (
297
                            c1.Center == c2.Center &&
298
                            c1.Radius == c2.Radius
299
                            )
300
                        {
301
                            return true;
302
                        }
303
                    }
304
                    else if (ent1 is EllipticalArc)
305
                    {
306
                        EllipticalArc e1 = (EllipticalArc)ent1;
307
                        EllipticalArc e2 = (EllipticalArc)ent2;
308

  
309
                        if (
310
                            e1.Center == e2.Center &&
311
                            e1.RadiusX == e2.RadiusX &&
312
                            e1.RadiusY == e2.RadiusY &&
313
                            e1.Domain.Low == e2.Domain.Low &&
314
                            e1.Domain.High == e2.Domain.High
315
                        )
316
                        {
317
                            return true;
318
                        }
319
                    }
320
                    else if (ent1 is Ellipse)
321
                    {
322
                        Ellipse e1 = (Ellipse)ent1;
323
                        Ellipse e2 = (Ellipse)ent2;
324

  
325
                        if (
326
                            e1.Center == e2.Center &&
327
                            e1.RadiusX == e2.RadiusX &&
328
                            e1.RadiusY == e2.RadiusY
329
                        )
330
                        {
331
                            return true;
332
                        }
333
                    }
334

  
335
                    else if (ent1 is Text)
336
                    {
337
                        if (ent1 is Dimension)
338
                        {
339
                            Dimension dim1 = (Dimension)ent1;
340
                            Dimension dim2 = (Dimension)ent2;
341

  
342
                            if (
343
                                dim1.InsertionPoint == dim2.InsertionPoint &&
344
                                dim1.DimLinePosition == dim2.DimLinePosition
345
                                )
346
                            {
347

  
348
                                if (ent1 is AngularDim)
349
                                {
350
                                    AngularDim ad1 = (AngularDim)ent1;
351
                                    AngularDim ad2 = (AngularDim)ent2;
352

  
353
                                    if (
354
                                        ad1.ExtLine1 == ad2.ExtLine1 &&
355
                                        ad1.ExtLine2 == ad2.ExtLine2 &&
356
                                        ad1.StartAngle == ad2.StartAngle &&
357
                                        ad1.EndAngle == ad2.EndAngle &&
358
                                        ad1.Radius == ad2.Radius
359
                                        )
360
                                    {
361
                                        return true;
362
                                    }
363
                                }
364
                                else if (ent1 is LinearDim)
365
                                {
366
                                    LinearDim ld1 = (LinearDim)ent1;
367
                                    LinearDim ld2 = (LinearDim)ent2;
368

  
369
                                    if (
370
                                        ld1.ExtLine1 == ld2.ExtLine1 &&
371
                                        ld1.ExtLine2 == ld2.ExtLine2
372
                                        )
373
                                    {
374
                                        return true;
375
                                    }
376
                                }
377
                                else if (ent1 is DiametricDim)
378
                                {
379
                                    DiametricDim dd1 = (DiametricDim)ent1;
380
                                    DiametricDim dd2 = (DiametricDim)ent2;
381

  
382
                                    if (
383
                                        dd1.Distance == dd2.Distance &&
384
                                        dd1.Radius == dd2.Radius &&
385
                                        dd1.CenterMarkSize == dd2.CenterMarkSize
386
                                    )
387
                                    {
388
                                        return true;
389
                                    }
390
                                }
391
                                else if (ent1 is RadialDim)
392
                                {
393
                                    RadialDim rd1 = (RadialDim)ent1;
394
                                    RadialDim rd2 = (RadialDim)ent2;
395

  
396
                                    if (
397
                                        rd1.Radius == rd2.Radius &&
398
                                        rd1.CenterMarkSize == rd2.CenterMarkSize
399
                                    )
400
                                    {
401
                                        return true;
402
                                    }
403
                                }
404
                                else if (ent1 is OrdinateDim)
405
                                {
406
                                    OrdinateDim od1 = (OrdinateDim)ent1;
407
                                    OrdinateDim od2 = (OrdinateDim)ent2;
408

  
409
                                    if (
410
                                        od1.DefiningPoint == od2.DefiningPoint &&
411
                                        od1.Origin == od2.Origin &&
412
                                        od1.LeaderEndPoint == od2.LeaderEndPoint
413
                                    )
414
                                    {
415
                                        return true;
416
                                    }
417
                                }
418
                                else
419
                                {
420
                                    Console.Write("Type " + ent1.GetType() + " not implemented.");
421
                                    return true;
422
                                }
423
                            }
424
                        }
425

  
426
                        else if (ent1 is devDept.Eyeshot.Entities.Attribute)
427
                        {
428
                            devDept.Eyeshot.Entities.Attribute att1 = (devDept.Eyeshot.Entities.Attribute)ent1;
429
                            devDept.Eyeshot.Entities.Attribute att2 = (devDept.Eyeshot.Entities.Attribute)ent2;
430

  
431
                            if (
432
                                att1.Value == att2.Value &&
433
                                att1.InsertionPoint == att2.InsertionPoint
434
                                )
435
                            {
436
                                return true;
437
                            }
438
                        }
439

  
440
                        else
441
                        {
442
                            Text tx1 = (Text)ent1;
443
                            Text tx2 = (Text)ent2;
444

  
445
                            if (
446
                                tx1.InsertionPoint == tx2.InsertionPoint &&
447
                                tx1.TextString == tx2.TextString &&
448
                                tx1.StyleName == tx2.StyleName &&
449
                                tx1.WidthFactor == tx2.WidthFactor &&
450
                                tx1.Height == tx2.Height
451
                                )
452
                            {
453
                                return true;
454
                            }
455
                        }
456
                    }
457

  
458
                    else
459
                    {
460
                        Console.Write("Type " + ent1.GetType() + " not implemented.");
461
                        return true;
462
                    }
463
                }
464
            }
465

  
466
            else if (ent1 is Line)
467
            {
468
                Line line1 = (Line)ent1;
469
                Line line2 = (Line)ent2;
470

  
471
                if (
472
                    line1.StartPoint == line2.StartPoint &&
473
                    line1.EndPoint == line2.EndPoint
474
                )
475
                {
476
                    return true;
477
                }
478
            }
479

  
480
            else if (ent1 is devDept.Eyeshot.Entities.Point)
481
            {
482
                devDept.Eyeshot.Entities.Point point1 = (devDept.Eyeshot.Entities.Point)ent1;
483
                devDept.Eyeshot.Entities.Point point2 = (devDept.Eyeshot.Entities.Point)ent2;
484

  
485
                if (
486
                    point1.Position == point2.Position
487
                )
488
                {
489
                    return true;
490
                }
491
            }
492

  
493
#if NURBS
494
            else if (ent1 is Curve)
495
            {
496
                Curve cu1 = (Curve)ent1;
497
                Curve cu2 = (Curve)ent2;
498

  
499
                if (
500
                    cu1.ControlPoints.Length == cu2.ControlPoints.Length &&
501
                    cu1.KnotVector.Length == cu2.KnotVector.Length &&
502
                    cu1.Degree == cu2.Degree
503
                    )
504
                {
505
                    for (int k = 0; k < cu1.ControlPoints.Length; k++)
506
                    {
507
                        if (cu1.ControlPoints[k] != cu2.ControlPoints[k])
508
                        {
509
                            return false;
510
                        }
511
                    }
512

  
513
                    for (int k = 0; k < cu1.KnotVector.Length; k++)
514
                    {
515
                        if (cu1.KnotVector[k] != cu2.KnotVector[k])
516
                        {
517
                            return false;
518
                        }
519
                    }
520

  
521
                    return true;
522
                }
523
            }
524
#endif
525

  
526
            else
527
            {
528
                Console.Write("Type " + ent1.GetType() + " not implemented.");
529
                return true;
530
            }
531
            return false;
532
        }
533

  
534
        private bool AreGEntityEqual(GEntity ent1, GEntity ent2)
535
        {
536
            if (ent1 is GCompositeCurve)
537
            {
538
                GCompositeCurve cc1 = (GCompositeCurve)ent1;
539
                GCompositeCurve cc2 = (GCompositeCurve)ent2;
540

  
541
                if (cc1.CurveList.Count == cc2.CurveList.Count)
542
                {
543
                    int equalCurvesInListCount = 0;
544
                    foreach (var entC in cc1.CurveList)
545
                    {
546
                        foreach (var entC2 in cc2.CurveList)
547
                        {
548
                            if (entC.GetType() == entC2.GetType())
549
                            {
550
                                if (entC is GEntity && entC2 is GEntity && CompareGEntityIfEqual(entC as GEntity, entC2 as GEntity))
551
                                {
552
                                    equalCurvesInListCount++;
553
                                    break;
554
                                }
555
                            }
556
                        }
557
                    }
558

  
559
                    if (cc1.CurveList.Count == equalCurvesInListCount)
560
                    {
561
                        return true;
562
                    }
563
                }
564
            }
565
            else if (ent1 is GLinearPath)
566
            {
567
                GLinearPath lp1 = (GLinearPath)ent1;
568
                GLinearPath lp2 = (GLinearPath)ent2;
569

  
570
                if (lp1.Vertices.Length == lp2.Vertices.Length)
571
                {
572
                    for (int i = 0; i < lp1.Vertices.Length; i++)
573
                    {
574
                        if (!(lp1.Vertices[i] == lp2.Vertices[i]))
575
                            return false;
576
                    }
577
                    return true;
578
                }
579
            }
580

  
581
            else if (ent1 is GPlanarEntity)
582
            {
583
                GPlanarEntity pe1 = (GPlanarEntity)ent1;
584
                GPlanarEntity pe2 = (GPlanarEntity)ent2;
585
                if (
586
                    pe1.Plane.AxisZ == pe2.Plane.AxisZ &&
587
                    pe1.Plane.AxisX == pe2.Plane.AxisX
588
                    )
589
                {
590
                    if (ent1 is GArc)
591
                    {
592
                        GArc arc1 = (GArc)ent1;
593
                        GArc arc2 = (GArc)ent2;
594

  
595
                        if (
596
                            arc1.Center == arc2.Center &&
597
                            arc1.Radius == arc2.Radius &&
598
                            arc1.Domain.Min == arc2.Domain.Min &&
599
                            arc1.Domain.Max == arc2.Domain.Max
600
                            )
601
                        {
602
                            return true;
603
                        }
604
                    }
605
                    else if (ent1 is GCircle)
606
                    {
607
                        GCircle c1 = (GCircle)ent1;
608
                        GCircle c2 = (GCircle)ent2;
609

  
610
                        if ( c1.Center == c2.Center && c1.Radius == c2.Radius )
611
                        {
612
                            return true;
613
                        }
614
                    }
615
                    else if (ent1 is GEllipticalArc)
616
                    {
617
                        GEllipticalArc e1 = (GEllipticalArc)ent1;
618
                        GEllipticalArc e2 = (GEllipticalArc)ent2;
619

  
620
                        if (
621
                            e1.Center == e2.Center &&
622
                            e1.RadiusX == e2.RadiusX &&
623
                            e1.RadiusY == e2.RadiusY &&
624
                            e1.Domain.Low == e2.Domain.Low &&
625
                            e1.Domain.High == e2.Domain.High
626
                        )
627
                        {
628
                            return true;
629
                        }
630
                    }
631
                    else if (ent1 is GEllipse)
632
                    {
633
                        GEllipse e1 = (GEllipse)ent1;
634
                        GEllipse e2 = (GEllipse)ent2;
635

  
636
                        if (
637
                            e1.Center == e2.Center &&
638
                            e1.RadiusX == e2.RadiusX &&
639
                            e1.RadiusY == e2.RadiusY
640
                        )
641
                        {
642
                            return true;
643
                        }
644
                    }
645
                    else
646
                    {
647
                        Console.Write("Type " + ent1.GetType() + " not implemented.");
648
                        return true;
649
                    }
650
                }
651
            }
652

  
653
            else if (ent1 is GLine)
654
            {
655
                GLine line1 = (GLine)ent1;
656
                GLine line2 = (GLine)ent2;
657

  
658
                if ( line1.StartPoint == line2.StartPoint && line1.EndPoint == line2.EndPoint
659
                )
660
                {
661
                    return true;
662
                }
663
            }
664
#if NURBS
665
            else if (ent1 is Curve)
666
            {
667
                Curve cu1 = (Curve)ent1;
668
                Curve cu2 = (Curve)ent2;
669

  
670
                if (
671
                    cu1.ControlPoints.Length == cu2.ControlPoints.Length &&
672
                    cu1.KnotVector.Length == cu2.KnotVector.Length &&
673
                    cu1.Degree == cu2.Degree
674
                    )
675
                {
676
                    for (int k = 0; k < cu1.ControlPoints.Length; k++)
677
                    {
678
                        if (cu1.ControlPoints[k] != cu2.ControlPoints[k])
679
                        {
680
                            return false;
681
                        }
682
                    }
683

  
684
                    for (int k = 0; k < cu1.KnotVector.Length; k++)
685
                    {
686
                        if (cu1.KnotVector[k] != cu2.KnotVector[k])
687
                        {
688
                            return false;
689
                        }
690
                    }
691

  
692
                    return true;
693
                }
694
            }
695
#endif
696

  
697
            else
698
            {
699
                Console.Write("Type " + ent1.GetType() + " not implemented.");
700
                return true;
701
            }
702
            return false;
703
        }
704

  
705
        private bool AreEqualAttributes(Entity ent1, Entity ent2)
706
        {
707
            return 
708
                ent1.LayerName == ent2.LayerName &&
709
                ent1.GroupIndex == ent2.GroupIndex &&
710
                ent1.ColorMethod == ent2.ColorMethod &&
711
                ent1.Color == ent2.Color &&
712
                ent1.LineWeightMethod == ent2.LineWeightMethod &&
713
                ent1.LineWeight == ent2.LineWeight &&
714
                ent1.LineTypeMethod == ent2.LineTypeMethod &&
715
                ent1.LineTypeName == ent2.LineTypeName &&
716
                ent1.LineTypeScale == ent2.LineTypeScale &&
717
                ent1.MaterialName == ent2.MaterialName;
718
        }
719

  
720
        #region Camera Sync
721
        private void CameraChanged(object sender, devDept.Eyeshot.Workspace.CameraMoveEventArgs e)
722
        {
723
            if (sender == this.designAutoCAD)
724
                SyncCamera(this.designAutoCAD, this.designAVEVA);
725
            else
726
                SyncCamera(this.designAVEVA, this.designAutoCAD);
727
        }
728

  
729
        private void SyncCamera(Design designMovedCamera, Design designCameraToMove)
730
        {
731
            Camera savedCamera;
732
            designMovedCamera.SaveView(out savedCamera);
733

  
734
            // restores the camera to the other model
735
            designCameraToMove.RestoreView(savedCamera);
736
            designCameraToMove.AdjustNearAndFarPlanes();
737
            designCameraToMove.Invalidate();
738
        }
739
        #endregion
57 740
    }
58 741
}

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)