3 次代码提交

作者 SHA1 备注 提交日期
  rmy 4cf7fb185d 20250928更新后的中误差计算 3 周前
  rmy 8b81bcd945 Merge branch 'master' of http://oa.sccehui.com:6101//QYX-RMY/Tools 3 周前
  rmy de5da9db5c 修改了中误差计算 3 周前
共有 89 个文件被更改,包括 0 次插入10442 次删除
  1. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/TestStore/0/000.testlog
  2. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/TestStore/0/testlog.manifest
  3. 0
    25
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools.sln
  4. 0
    123
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/AttributeForm.resx
  5. 0
    263
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Attributeget.cs
  6. 0
    171
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Chaginfos.Designer.cs
  7. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Chaginfos.resx
  8. 0
    95
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckContourLine.cs
  9. 0
    147
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckL.Designer.cs
  10. 0
    101
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckL.cs
  11. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckL.resx
  12. 0
    422
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckPLOverlay.cs
  13. 0
    154
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Conn.Designer.cs
  14. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Conn.resx
  15. 0
    479
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Connect.cs
  16. 0
    856
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutContourLine.cs
  17. 0
    244
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutCountL.Designer.cs
  18. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutCountL.cs
  19. 0
    143
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutCountL.resx
  20. 0
    131
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneral.Designer.cs
  21. 0
    76
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneral.cs
  22. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneral.resx
  23. 0
    193
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneralization.cs
  24. 0
    150
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeleteElept.Designer.cs
  25. 0
    93
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeleteElept.cs
  26. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeleteElept.resx
  27. 0
    149
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeletePts.cs
  28. 0
    153
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnnck.cs
  29. 0
    170
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnno.Designer.cs
  30. 0
    101
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnno.cs
  31. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnno.resx
  32. 0
    288
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ElePtCheck.cs
  33. 0
    124
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRd.Designer.cs
  34. 0
    85
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRd.cs
  35. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRd.resx
  36. 0
    71
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRound.cs
  37. 0
    156
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDenck.cs
  38. 0
    170
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDensity.Designer.cs
  39. 0
    100
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDensity.cs
  40. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDensity.resx
  41. 0
    612
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/FeatureOverlap.cs
  42. 0
    126
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierak.Designer.cs
  43. 0
    87
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierak.cs
  44. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierak.resx
  45. 0
    91
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierarchy.cs
  46. 0
    132
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InstDOM.Designer.cs
  47. 0
    45
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InstDOM.cs
  48. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InstDOM.resx
  49. 0
    579
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Inters.cs
  50. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Layerchange_Form.resx
  51. 0
    186
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PLError_Overlay.Designer.cs
  52. 0
    177
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PLError_Overlay.cs
  53. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PLError_Overlay.resx
  54. 0
    114
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PicPts.Designer.cs
  55. 0
    43
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PicPts.cs
  56. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PicPts.resx
  57. 0
    174
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PickupPoint.cs
  58. 0
    36
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/AssemblyInfo.cs
  59. 0
    70
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Resources.Designer.cs
  60. 0
    117
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Resources.resx
  61. 0
    136
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtCheck.Designer.cs
  62. 0
    90
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtCheck.cs
  63. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtCheck.resx
  64. 0
    102
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Scale.Designer.cs
  65. 0
    48
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Scale.cs
  66. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Scale.resx
  67. 0
    120
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.resx
  68. 0
    4
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
  69. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.AttributeForm.resources
  70. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Chaginfos.resources
  71. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.CheckL.resources
  72. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Conn.resources
  73. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.CutCountL.resources
  74. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.DGXGeneral.resources
  75. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.DeleteElept.resources
  76. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.DgxAnno.resources
  77. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.EleRd.resources
  78. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.EleptDensity.resources
  79. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Hierak.resources
  80. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.InstDOM.resources
  81. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Layerchange_Form.resources
  82. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.PLError_Overlay.resources
  83. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.PicPts.resources
  84. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Properties.Resources.resources
  85. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.PtCheck.resources
  86. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Scale.resources
  87. 二进制
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.TKInfo.resources
  88. 二进制
      未加密软件工具/arcgis工具箱/中误差计算2023_12_15.tbx
  89. 二进制
      未加密软件工具/arcgis工具箱/中误差计算2024_11_28_1.tbx

二进制
加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/TestStore/0/000.testlog 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/TestStore/0/testlog.manifest 查看文件


+ 0
- 25
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools.sln 查看文件

@@ -1,25 +0,0 @@
1
-
2
-Microsoft Visual Studio Solution File, Format Version 12.00
3
-# Visual Studio Version 16
4
-VisualStudioVersion = 16.0.33130.400
5
-MinimumVisualStudioVersion = 10.0.40219.1
6
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HCTools", "HCTools\HCTools.csproj", "{ABB97F2C-1CCA-4782-B144-A796879EBE66}"
7
-EndProject
8
-Global
9
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
10
-		Debug|Any CPU = Debug|Any CPU
11
-		Release|Any CPU = Release|Any CPU
12
-	EndGlobalSection
13
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
14
-		{ABB97F2C-1CCA-4782-B144-A796879EBE66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15
-		{ABB97F2C-1CCA-4782-B144-A796879EBE66}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
-		{ABB97F2C-1CCA-4782-B144-A796879EBE66}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
-		{ABB97F2C-1CCA-4782-B144-A796879EBE66}.Release|Any CPU.Build.0 = Release|Any CPU
18
-	EndGlobalSection
19
-	GlobalSection(SolutionProperties) = preSolution
20
-		HideSolutionNode = FALSE
21
-	EndGlobalSection
22
-	GlobalSection(ExtensibilityGlobals) = postSolution
23
-		SolutionGuid = {26C276F7-933E-4026-8DCF-62A02D00430D}
24
-	EndGlobalSection
25
-EndGlobal

+ 0
- 123
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/AttributeForm.resx 查看文件

@@ -1,123 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-  <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
-    <value>17, 17</value>
122
-  </metadata>
123
-</root>

+ 0
- 263
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Attributeget.cs 查看文件

@@ -1,263 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using System;
5
-using System.Collections.Generic;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-
10
-namespace HCTools
11
-{
12
-    class Attributeget
13
-    {
14
-        private static List<ObjectId> objid_all = new List<ObjectId>();
15
-        public void attribt()
16
-        {
17
-            //存放所有图层名
18
-            List<string> alllayername = new List<string>();
19
-            List<List<string>> info_all = new List<List<string>>();
20
-
21
-            Database db = HostApplicationServices.WorkingDatabase;
22
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
23
-
24
-            using (Transaction trans = db.TransactionManager.StartTransaction())
25
-            {
26
-                LayerTable layertable = trans.GetObject(db.LayerTableId, OpenMode.ForRead) as LayerTable;
27
-                foreach (ObjectId objid in layertable)
28
-                {
29
-                    LayerTableRecord layertablerecord = trans.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
30
-                    alllayername.Add(layertablerecord.Name);
31
-                }
32
-                alllayername.Sort();
33
-                trans.Commit();
34
-            }
35
-
36
-            int num = 0;
37
-            for (int i = 0; i < alllayername.Count; i++)
38
-            {
39
-                List<List<string>> info = Getlyobjinfo(alllayername[i], num);
40
-                num = num + info.Count;
41
-                for (int j = 0; j < info.Count; j++)
42
-                {
43
-                    string id = info[j][0];
44
-                    string name = info[j][1];
45
-                    string type = info[j][2];
46
-                    string X = info[j][3];
47
-                    string Y = info[j][4];
48
-                    string Z = info[j][5];
49
-                    string lenth = info[j][6];
50
-                    string area = info[j][7];
51
-                    List<string> temp = new List<string>();
52
-                    temp.Add(id);
53
-                    temp.Add(name);
54
-                    temp.Add(alllayername[i]);
55
-                    temp.Add(type);
56
-                    temp.Add(X);
57
-                    temp.Add(Y);
58
-                    temp.Add(Z);
59
-                    temp.Add(lenth);
60
-                    temp.Add(area);
61
-                    info_all.Add(temp);
62
-                }
63
-            }
64
-
65
-            AttributeForm Frm = new AttributeForm();
66
-            Frm.GetInfo(info_all,objid_all);
67
-            Frm.Show();
68
-        }
69
-
70
-        private static List<List<string>> Getlyobjinfo(string layername, int num)
71
-        {
72
-            List<List<string>> info = new List<List<string>>();//图层中obj信息
73
-
74
-            Database database = HostApplicationServices.WorkingDatabase;
75
-            using (Transaction traction = database.TransactionManager.StartTransaction())
76
-            {
77
-                // 获得当前文档的编辑器  
78
-                Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
79
-                // 创建一个 TypedValue 数组,用于定义过滤条件
80
-                TypedValue[] typedvalue = new TypedValue[1];
81
-                typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, layername), 0);
82
-                // 赋值过滤条件给 SelectionFilter 对象
83
-                SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
84
-                // 要求在图形区域中手动选择对象
85
-                PromptSelectionResult psr = editor.SelectAll(selectionfilter);
86
-
87
-                if (psr.Status == PromptStatus.OK)
88
-                {
89
-                    SelectionSet selectionset = psr.Value;
90
-                    ObjectId[] obj = new ObjectId[selectionset.Count];
91
-                    obj = selectionset.GetObjectIds();
92
-
93
-                    for (int i = 0; i < obj.Length; i++)
94
-                    {
95
-                        //获取实体
96
-                        ObjectId objid = obj[i];
97
-                        Entity entity = (Entity)traction.GetObject(objid, OpenMode.ForRead);
98
-                        objid_all.Add(objid);
99
-
100
-                        if (entity is Polyline)
101
-                        {
102
-                            num++;
103
-                            Polyline pll = (Polyline)entity;
104
-                            string name = "无";
105
-                            string type = "多段线";
106
-                            double X = pll.StartPoint.X;
107
-                            double Y = pll.StartPoint.Y;
108
-                            double Z = pll.Elevation;
109
-                            double length = pll.Length;
110
-                            string area;
111
-                            if(pll.Closed)
112
-                            {
113
-                                area = pll.Area.ToString("0.000");
114
-                            }
115
-                            else
116
-                            {
117
-                                area = "无";
118
-                            }
119
-                            List<string> temp = new List<string>();
120
-                            temp.Add(num.ToString());
121
-                            temp.Add(name);
122
-                            temp.Add(type);
123
-                            temp.Add(X.ToString("0.000"));
124
-                            temp.Add(Y.ToString("0.000"));
125
-                            temp.Add(Z.ToString("0.000"));
126
-                            temp.Add(length.ToString("0.000"));
127
-                            temp.Add(area);
128
-                            info.Add(temp);
129
-                        }
130
-                        if (entity is Polyline2d)
131
-                        {
132
-                            num++;
133
-                            Polyline2d pll = (Polyline2d)entity;
134
-                            string name = "无";
135
-                            string type = "二维多段线";
136
-                            double X = pll.StartPoint.X;
137
-                            double Y = pll.StartPoint.Y;
138
-                            double Z = pll.Elevation;
139
-                            double length = pll.Length;
140
-                            string area;
141
-                            if (pll.Closed)
142
-                            {
143
-                                area = pll.Area.ToString("0.000");
144
-                            }
145
-                            else
146
-                            {
147
-                                area = "无";
148
-                            }
149
-                            List<string> temp = new List<string>();
150
-                            temp.Add(num.ToString());
151
-                            temp.Add(name);
152
-                            temp.Add(type);
153
-                            temp.Add(X.ToString("0.000"));
154
-                            temp.Add(Y.ToString("0.000"));
155
-                            temp.Add(Z.ToString("0.000"));
156
-                            temp.Add(length.ToString("0.000"));
157
-                            temp.Add(area);
158
-                            info.Add(temp);
159
-                        }
160
-                        else if (entity is Line)
161
-                        {
162
-                            num++;
163
-                            Line line = (Line)entity;
164
-                            string name = "无";
165
-                            string type = "直线";
166
-                            double X = line.StartPoint.X;
167
-                            double Y = line.StartPoint.Y;
168
-                            double Z = line.StartPoint.Z;
169
-                            double length = line.Length;
170
-                            string area;
171
-                            if (line.Closed)
172
-                            {
173
-                                area = line.Area.ToString("0.000");
174
-                            }
175
-                            else
176
-                            {
177
-                                area = "无";
178
-                            }
179
-                            List<string> temp = new List<string>();
180
-                            temp.Add(num.ToString());
181
-                            temp.Add(name);
182
-                            temp.Add(type);
183
-                            temp.Add(X.ToString("0.000"));
184
-                            temp.Add(Y.ToString("0.000"));
185
-                            temp.Add(Z.ToString("0.000"));
186
-                            temp.Add(length.ToString("0.000"));
187
-                            temp.Add(area);
188
-                            info.Add(temp);
189
-                        }
190
-                        else if (entity is DBText)
191
-                        {
192
-                            num++;
193
-                            DBText txt = (DBText)entity;
194
-                            string name = txt.TextString;
195
-                            string type = "文字";
196
-                            double X = txt.Position.X;
197
-                            double Y = txt.Position.Y;
198
-                            double Z = txt.Position.Z;
199
-                            string length = "无";
200
-                            string area = "无";
201
-                            List<string> temp = new List<string>();
202
-                            temp.Add(num.ToString());
203
-                            temp.Add(name);
204
-                            temp.Add(type);
205
-                            temp.Add(X.ToString("0.000"));
206
-                            temp.Add(Y.ToString("0.000"));
207
-                            temp.Add(Z.ToString("0.000"));
208
-                            temp.Add(length);
209
-                            temp.Add(area);
210
-                            info.Add(temp);
211
-                        }
212
-                        else if (entity is BlockReference)
213
-                        {
214
-                            num++;
215
-                            BlockReference blk = (BlockReference)entity;
216
-                            string name = blk.Name;
217
-                            string type = "块参照";
218
-                            double X = blk.Position.X;
219
-                            double Y = blk.Position.Y;
220
-                            double Z = blk.Position.Z;
221
-                            string length = "无";
222
-                            string area = "无";
223
-                            List<string> temp = new List<string>();
224
-                            temp.Add(num.ToString());
225
-                            temp.Add(name);
226
-                            temp.Add(type);
227
-                            temp.Add(X.ToString("0.000"));
228
-                            temp.Add(Y.ToString("0.000"));
229
-                            temp.Add(Z.ToString("0.000"));
230
-                            temp.Add(length);
231
-                            temp.Add(area);
232
-                            info.Add(temp);
233
-                        }
234
-                        else if(entity is Hatch)
235
-                        {
236
-                            num++;
237
-                            Hatch hc = (Hatch)entity;
238
-                            string name = hc.PatternName;
239
-                            string type = "图案填充";
240
-                            double X = hc.Origin.X;
241
-                            double Y = hc.Origin.Y;
242
-                            double Z = 0;
243
-                            string length = "无";
244
-                            string area = hc.Area.ToString();
245
-                            List<string> temp = new List<string>();
246
-                            temp.Add(num.ToString());
247
-                            temp.Add(name);
248
-                            temp.Add(type);
249
-                            temp.Add(X.ToString("0.000"));
250
-                            temp.Add(Y.ToString("0.000"));
251
-                            temp.Add(Z.ToString("0.000"));
252
-                            temp.Add(length);
253
-                            temp.Add(area);
254
-                            info.Add(temp);
255
-                        }
256
-                    }
257
-                }
258
-                traction.Commit();
259
-            }
260
-            return info;
261
-        }
262
-    }
263
-}

+ 0
- 171
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Chaginfos.Designer.cs 查看文件

@@ -1,171 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class Chaginfos
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.btn_BrowseSave = new System.Windows.Forms.Button();
33
-            this.btn_BrowseNdupdate = new System.Windows.Forms.Button();
34
-            this.label_Save = new System.Windows.Forms.Label();
35
-            this.label_Update = new System.Windows.Forms.Label();
36
-            this.txtbox_SaveLocation = new System.Windows.Forms.TextBox();
37
-            this.txtbox_nDupdateLocation = new System.Windows.Forms.TextBox();
38
-            this.dataGridView_Update = new System.Windows.Forms.DataGridView();
39
-            this.btn_Update = new System.Windows.Forms.Button();
40
-            this.label1 = new System.Windows.Forms.Label();
41
-            this.comboBox_layer = new System.Windows.Forms.ComboBox();
42
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Update)).BeginInit();
43
-            this.SuspendLayout();
44
-            // 
45
-            // btn_BrowseSave
46
-            // 
47
-            this.btn_BrowseSave.Location = new System.Drawing.Point(494, 90);
48
-            this.btn_BrowseSave.Name = "btn_BrowseSave";
49
-            this.btn_BrowseSave.Size = new System.Drawing.Size(47, 30);
50
-            this.btn_BrowseSave.TabIndex = 18;
51
-            this.btn_BrowseSave.Text = "浏览";
52
-            this.btn_BrowseSave.UseVisualStyleBackColor = true;
53
-            this.btn_BrowseSave.Click += new System.EventHandler(this.btn_BrowseSave_Click);
54
-            // 
55
-            // btn_BrowseNdupdate
56
-            // 
57
-            this.btn_BrowseNdupdate.Location = new System.Drawing.Point(494, 38);
58
-            this.btn_BrowseNdupdate.Name = "btn_BrowseNdupdate";
59
-            this.btn_BrowseNdupdate.Size = new System.Drawing.Size(47, 29);
60
-            this.btn_BrowseNdupdate.TabIndex = 17;
61
-            this.btn_BrowseNdupdate.Text = "浏览";
62
-            this.btn_BrowseNdupdate.UseVisualStyleBackColor = true;
63
-            this.btn_BrowseNdupdate.Click += new System.EventHandler(this.btn_BrowseNdupdate_Click);
64
-            // 
65
-            // label_Save
66
-            // 
67
-            this.label_Save.AutoSize = true;
68
-            this.label_Save.Location = new System.Drawing.Point(74, 98);
69
-            this.label_Save.Name = "label_Save";
70
-            this.label_Save.Size = new System.Drawing.Size(82, 15);
71
-            this.label_Save.TabIndex = 16;
72
-            this.label_Save.Text = "保存路径:";
73
-            // 
74
-            // label_Update
75
-            // 
76
-            this.label_Update.Location = new System.Drawing.Point(74, 29);
77
-            this.label_Update.Name = "label_Update";
78
-            this.label_Update.Size = new System.Drawing.Size(77, 55);
79
-            this.label_Update.TabIndex = 15;
80
-            this.label_Update.Text = "需修改的文件所在路径:";
81
-            // 
82
-            // txtbox_SaveLocation
83
-            // 
84
-            this.txtbox_SaveLocation.Location = new System.Drawing.Point(157, 95);
85
-            this.txtbox_SaveLocation.Name = "txtbox_SaveLocation";
86
-            this.txtbox_SaveLocation.Size = new System.Drawing.Size(319, 25);
87
-            this.txtbox_SaveLocation.TabIndex = 14;
88
-            // 
89
-            // txtbox_nDupdateLocation
90
-            // 
91
-            this.txtbox_nDupdateLocation.Location = new System.Drawing.Point(157, 41);
92
-            this.txtbox_nDupdateLocation.Name = "txtbox_nDupdateLocation";
93
-            this.txtbox_nDupdateLocation.Size = new System.Drawing.Size(319, 25);
94
-            this.txtbox_nDupdateLocation.TabIndex = 13;
95
-            // 
96
-            // dataGridView_Update
97
-            // 
98
-            this.dataGridView_Update.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
99
-            this.dataGridView_Update.Location = new System.Drawing.Point(77, 197);
100
-            this.dataGridView_Update.Margin = new System.Windows.Forms.Padding(4);
101
-            this.dataGridView_Update.Name = "dataGridView_Update";
102
-            this.dataGridView_Update.RowHeadersWidth = 51;
103
-            this.dataGridView_Update.RowTemplate.Height = 23;
104
-            this.dataGridView_Update.Size = new System.Drawing.Size(473, 195);
105
-            this.dataGridView_Update.TabIndex = 12;
106
-            // 
107
-            // btn_Update
108
-            // 
109
-            this.btn_Update.Location = new System.Drawing.Point(252, 411);
110
-            this.btn_Update.Name = "btn_Update";
111
-            this.btn_Update.Size = new System.Drawing.Size(89, 31);
112
-            this.btn_Update.TabIndex = 19;
113
-            this.btn_Update.Text = "确定更新";
114
-            this.btn_Update.UseVisualStyleBackColor = true;
115
-            this.btn_Update.Click += new System.EventHandler(this.btn_Update_Click);
116
-            // 
117
-            // label1
118
-            // 
119
-            this.label1.Location = new System.Drawing.Point(74, 138);
120
-            this.label1.Name = "label1";
121
-            this.label1.Size = new System.Drawing.Size(77, 55);
122
-            this.label1.TabIndex = 20;
123
-            this.label1.Text = "待修改信息所在图层:";
124
-            // 
125
-            // comboBox_layer
126
-            // 
127
-            this.comboBox_layer.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
128
-            this.comboBox_layer.FormattingEnabled = true;
129
-            this.comboBox_layer.Location = new System.Drawing.Point(157, 151);
130
-            this.comboBox_layer.Name = "comboBox_layer";
131
-            this.comboBox_layer.Size = new System.Drawing.Size(184, 23);
132
-            this.comboBox_layer.TabIndex = 21;
133
-            // 
134
-            // Chaginfos
135
-            // 
136
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
137
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
138
-            this.ClientSize = new System.Drawing.Size(624, 466);
139
-            this.Controls.Add(this.comboBox_layer);
140
-            this.Controls.Add(this.label1);
141
-            this.Controls.Add(this.btn_Update);
142
-            this.Controls.Add(this.btn_BrowseSave);
143
-            this.Controls.Add(this.btn_BrowseNdupdate);
144
-            this.Controls.Add(this.label_Save);
145
-            this.Controls.Add(this.label_Update);
146
-            this.Controls.Add(this.txtbox_SaveLocation);
147
-            this.Controls.Add(this.txtbox_nDupdateLocation);
148
-            this.Controls.Add(this.dataGridView_Update);
149
-            this.Name = "Chaginfos";
150
-            this.Text = "批量修改图框信息";
151
-            this.Load += new System.EventHandler(this.Chaginfos_Load);
152
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Update)).EndInit();
153
-            this.ResumeLayout(false);
154
-            this.PerformLayout();
155
-
156
-        }
157
-
158
-        #endregion
159
-
160
-        private System.Windows.Forms.Button btn_BrowseSave;
161
-        private System.Windows.Forms.Button btn_BrowseNdupdate;
162
-        private System.Windows.Forms.Label label_Save;
163
-        private System.Windows.Forms.Label label_Update;
164
-        private System.Windows.Forms.TextBox txtbox_SaveLocation;
165
-        private System.Windows.Forms.TextBox txtbox_nDupdateLocation;
166
-        private System.Windows.Forms.DataGridView dataGridView_Update;
167
-        private System.Windows.Forms.Button btn_Update;
168
-        private System.Windows.Forms.Label label1;
169
-        private System.Windows.Forms.ComboBox comboBox_layer;
170
-    }
171
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Chaginfos.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 95
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckContourLine.cs 查看文件

@@ -1,95 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-using GrxCAD.ApplicationServices;
8
-using GrxCAD.DatabaseServices;
9
-using GrxCAD.EditorInput;
10
-using GrxCAD.Geometry;
11
-
12
-namespace HCTools
13
-{
14
-    class CheckContourLine
15
-    {
16
-        public static int gap;
17
-        public static string jqx;
18
-        public static string sqx;
19
-
20
-        public void Valuecheck()
21
-        {
22
-            Document doc = Application.DocumentManager.MdiActiveDocument;
23
-            string LayerName = jqx + "," +sqx;
24
-            ObjectId[] ids = BasicFunction.getHeight(LayerName);//存放获取的等高线id
25
-
26
-
27
-            //如果没有等高线则返回
28
-            if (ids == null)
29
-                return;
30
-
31
-            //检查是否有错误曲线图层,没有则创建
32
-            LayerControl layerscontrol = new LayerControl();
33
-            string layname = "等高线有误";
34
-            if (!layerscontrol.haslayername(layname))
35
-            {
36
-                colorgb col = new colorgb(255, 0, 225);
37
-                layerscontrol.creatlayer(layname, col);
38
-                layerscontrol.movelayertofront(layname);
39
-            }
40
-            else
41
-                layerscontrol.movelayertofront(layname);
42
-
43
-            int j = 0;
44
-            int num = 0;
45
-            for (int i = 0; i < ids.Length; i++)
46
-            {
47
-                Polyline pll = BasicFunction.GetDBObject(ids[i]) as Polyline;
48
-                if (pll.Elevation <= 0)
49
-                {
50
-                    ChangeLayer(pll.Id, layname);
51
-                    j++;
52
-                }
53
-                else
54
-                {
55
-                    if (int.TryParse(Math.Round(pll.Elevation, 3, MidpointRounding.AwayFromZero).ToString(), out num))
56
-                    {
57
-                        if (Math.Round(pll.Elevation,3, MidpointRounding.AwayFromZero) % gap == 0)
58
-                        {
59
-                            continue;
60
-                        }
61
-                        else
62
-                        {
63
-                            ChangeLayer(pll.Id, layname);
64
-                            j++;
65
-                        }
66
-                    }
67
-                    else
68
-                    {
69
-                        ChangeLayer(pll.Id, layname);
70
-                        j++;
71
-                    }
72
-                }
73
-            }
74
-            Editor ed = doc.Editor; ed.WriteMessage("共有" + j + "处错误");
75
-        }
76
-
77
-
78
-        private void ChangeLayer(ObjectId c1Id, string lyname)
79
-        {
80
-            Database db = HostApplicationServices.WorkingDatabase;
81
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
82
-            using (Transaction trans = db.TransactionManager.StartTransaction())
83
-            {
84
-                BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);
85
-                BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
86
-                Entity ent1 = (Entity)c1Id.GetObject(OpenMode.ForWrite);
87
-                ent1.Layer = lyname;
88
-                trans.Commit();
89
-            }
90
-            doclock.Dispose();
91
-        }
92
-    }
93
-}
94
-
95
-

+ 0
- 147
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckL.Designer.cs 查看文件

@@ -1,147 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class CheckL
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.textBox_Gap = new System.Windows.Forms.TextBox();
33
-            this.label_Gap = new System.Windows.Forms.Label();
34
-            this.btn_Cancel = new System.Windows.Forms.Button();
35
-            this.btn_OK = new System.Windows.Forms.Button();
36
-            this.label1 = new System.Windows.Forms.Label();
37
-            this.label2 = new System.Windows.Forms.Label();
38
-            this.comboBox_sqx = new System.Windows.Forms.ComboBox();
39
-            this.comboBox_jqx = new System.Windows.Forms.ComboBox();
40
-            this.SuspendLayout();
41
-            // 
42
-            // textBox_Gap
43
-            // 
44
-            this.textBox_Gap.Location = new System.Drawing.Point(167, 127);
45
-            this.textBox_Gap.Name = "textBox_Gap";
46
-            this.textBox_Gap.Size = new System.Drawing.Size(169, 25);
47
-            this.textBox_Gap.TabIndex = 3;
48
-            // 
49
-            // label_Gap
50
-            // 
51
-            this.label_Gap.AutoSize = true;
52
-            this.label_Gap.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
53
-            this.label_Gap.Location = new System.Drawing.Point(94, 130);
54
-            this.label_Gap.Name = "label_Gap";
55
-            this.label_Gap.Size = new System.Drawing.Size(67, 15);
56
-            this.label_Gap.TabIndex = 2;
57
-            this.label_Gap.Text = "等高距:";
58
-            // 
59
-            // btn_Cancel
60
-            // 
61
-            this.btn_Cancel.Location = new System.Drawing.Point(255, 171);
62
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
63
-            this.btn_Cancel.Name = "btn_Cancel";
64
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
65
-            this.btn_Cancel.TabIndex = 34;
66
-            this.btn_Cancel.Text = "取 消";
67
-            this.btn_Cancel.UseVisualStyleBackColor = true;
68
-            this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
69
-            // 
70
-            // btn_OK
71
-            // 
72
-            this.btn_OK.Location = new System.Drawing.Point(77, 171);
73
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
74
-            this.btn_OK.Name = "btn_OK";
75
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
76
-            this.btn_OK.TabIndex = 33;
77
-            this.btn_OK.Text = "确 定";
78
-            this.btn_OK.UseVisualStyleBackColor = true;
79
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
80
-            // 
81
-            // label1
82
-            // 
83
-            this.label1.AutoSize = true;
84
-            this.label1.Location = new System.Drawing.Point(64, 25);
85
-            this.label1.Name = "label1";
86
-            this.label1.Size = new System.Drawing.Size(97, 15);
87
-            this.label1.TabIndex = 35;
88
-            this.label1.Text = "首曲线图层:";
89
-            // 
90
-            // label2
91
-            // 
92
-            this.label2.AutoSize = true;
93
-            this.label2.Location = new System.Drawing.Point(64, 74);
94
-            this.label2.Name = "label2";
95
-            this.label2.Size = new System.Drawing.Size(97, 15);
96
-            this.label2.TabIndex = 36;
97
-            this.label2.Text = "计曲线图层:";
98
-            // 
99
-            // comboBox_sqx
100
-            // 
101
-            this.comboBox_sqx.FormattingEnabled = true;
102
-            this.comboBox_sqx.Location = new System.Drawing.Point(167, 22);
103
-            this.comboBox_sqx.Name = "comboBox_sqx";
104
-            this.comboBox_sqx.Size = new System.Drawing.Size(169, 23);
105
-            this.comboBox_sqx.TabIndex = 37;
106
-            // 
107
-            // comboBox_jqx
108
-            // 
109
-            this.comboBox_jqx.FormattingEnabled = true;
110
-            this.comboBox_jqx.Location = new System.Drawing.Point(167, 71);
111
-            this.comboBox_jqx.Name = "comboBox_jqx";
112
-            this.comboBox_jqx.Size = new System.Drawing.Size(169, 23);
113
-            this.comboBox_jqx.TabIndex = 38;
114
-            // 
115
-            // CheckL
116
-            // 
117
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
118
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
119
-            this.ClientSize = new System.Drawing.Size(434, 213);
120
-            this.Controls.Add(this.comboBox_jqx);
121
-            this.Controls.Add(this.comboBox_sqx);
122
-            this.Controls.Add(this.label2);
123
-            this.Controls.Add(this.label1);
124
-            this.Controls.Add(this.btn_Cancel);
125
-            this.Controls.Add(this.btn_OK);
126
-            this.Controls.Add(this.textBox_Gap);
127
-            this.Controls.Add(this.label_Gap);
128
-            this.Name = "CheckL";
129
-            this.Text = "等高线检查";
130
-            this.Load += new System.EventHandler(this.CheckL_Load);
131
-            this.ResumeLayout(false);
132
-            this.PerformLayout();
133
-
134
-        }
135
-
136
-        #endregion
137
-
138
-        private System.Windows.Forms.TextBox textBox_Gap;
139
-        private System.Windows.Forms.Label label_Gap;
140
-        private System.Windows.Forms.Button btn_Cancel;
141
-        private System.Windows.Forms.Button btn_OK;
142
-        private System.Windows.Forms.Label label1;
143
-        private System.Windows.Forms.Label label2;
144
-        private System.Windows.Forms.ComboBox comboBox_sqx;
145
-        private System.Windows.Forms.ComboBox comboBox_jqx;
146
-    }
147
-}

+ 0
- 101
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckL.cs 查看文件

@@ -1,101 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.ComponentModel;
5
-using System.Data;
6
-using System.Drawing;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    public partial class CheckL : Form
15
-    {
16
-        public CheckL()
17
-        {
18
-            InitializeComponent();
19
-        }
20
-
21
-        private void btn_OK_Click(object sender, EventArgs e)
22
-        {
23
-            int num = 0;
24
-            if (comboBox_jqx.Text == "")
25
-            {
26
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择计曲线所在图层");
27
-                return;
28
-            }
29
-            if (comboBox_sqx.Text == "")
30
-            {
31
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择首曲线所在图层");
32
-                return;
33
-            }
34
-            if (textBox_Gap.Text == "")
35
-            {
36
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入等高距");
37
-                return;
38
-            }
39
-
40
-            if (int.TryParse(textBox_Gap.Text.ToString(), out num) == false)
41
-            {
42
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("等高距必须为整数");
43
-                return;
44
-            }
45
-
46
-            CheckContourLine.gap = Convert.ToInt32(textBox_Gap.Text);
47
-            CheckContourLine.jqx = comboBox_jqx.Text;
48
-            CheckContourLine.sqx = comboBox_sqx.Text;
49
-
50
-            this.Close();
51
-            CheckContourLine ccline = new CheckContourLine();
52
-            ccline.Valuecheck();
53
-            this.Close();
54
-        }
55
-
56
-        private void CheckL_Load(object sender, EventArgs e)
57
-        {
58
-            this.comboBox_jqx.DropDownStyle = ComboBoxStyle.DropDownList;
59
-            this.comboBox_sqx.DropDownStyle = ComboBoxStyle.DropDownList;
60
-
61
-            //自动填充下拉框
62
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
63
-            using (Transaction traction = database.TransactionManager.StartTransaction())
64
-            {
65
-                //存放所有图层名
66
-                List<string> alllayername = new List<string>();
67
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
68
-                foreach (ObjectId objid in layertable)
69
-                {
70
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
71
-                    alllayername.Add(layertablerecord.Name);
72
-                }
73
-
74
-                alllayername.Sort();
75
-
76
-                for (int i = 0; i < alllayername.Count; i++)
77
-                {
78
-                    this.comboBox_jqx.Items.Add(alllayername[i]);
79
-                    this.comboBox_sqx.Items.Add(alllayername[i]);
80
-                }
81
-
82
-                if (alllayername.Contains("8110"))
83
-                {
84
-                    int index = alllayername.IndexOf("8110");
85
-                    this.comboBox_sqx.SelectedIndex = index;
86
-                }
87
-                if (alllayername.Contains("8120"))
88
-                {
89
-                    int index = alllayername.IndexOf("8120");
90
-                    this.comboBox_jqx.SelectedIndex = index;
91
-                }
92
-                traction.Commit();
93
-            }
94
-        }
95
-
96
-        private void btn_Cancel_Click(object sender, EventArgs e)
97
-        {
98
-            this.Close();
99
-        }
100
-    }
101
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckL.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 422
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CheckPLOverlay.cs 查看文件

@@ -1,422 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Diagnostics;
6
-
7
-using GrxCAD.Geometry;
8
-using GrxCAD.DatabaseServices;
9
-using GrxCAD.ApplicationServices;
10
-using GrxCAD.EditorInput;
11
-
12
-
13
-
14
-namespace HCTools
15
-{
16
-
17
-    public struct CPoint
18
-    {
19
-        public double x;
20
-        public double y;
21
-        public double z;
22
-        public object objID;
23
-    }
24
-
25
-
26
-    /// <summary>
27
-    /// 判断点和线是否重叠
28
-    /// </summary>
29
-    class CheckPLOverlay
30
-    {
31
-        public static int blc;//比例尺
32
-        public static string sqx;//首曲线
33
-        public static string jqx;//计曲线
34
-        public const int looptimes = 15;//循环查找次数
35
-        public static string EleLayerName;//高程点图层名
36
-
37
-        public int windowwidth;//当前可视范围
38
-        public int windowheight;
39
-
40
-
41
-        public double radius;//半径
42
-
43
-        public double length;//搜索半径
44
-        //存放所有高程点数组
45
-        public List<CPoint> pointarrlist = new List<CPoint>();
46
-
47
-        //存放有问题的高程点数组
48
-        public List<CPoint> errorpointarrlist = new List<CPoint>();
49
-
50
-
51
-
52
-
53
-
54
-
55
-        /// <summary>
56
-        /// 检测点线矛盾,并画圆标记出错误点
57
-        /// </summary>
58
-
59
-        public void contourch()
60
-        {
61
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
62
-
63
-            //清空各数组
64
-            pointarrlist.Clear();
65
-            errorpointarrlist.Clear();
66
-
67
-            double flagradius = 4.0 * blc / 1000;//画圆标记半径
68
-            windowwidth = 30 * 4 * blc / 1000;//确定可视范围
69
-            windowheight = 30 * 4 * blc / 1000;
70
-
71
-            if (blc == 500)
72
-            {
73
-                radius = 0.125;
74
-            }
75
-            else if (blc == 1000)
76
-            {
77
-                radius = 0.25;
78
-            }
79
-            else if (blc == 2000)
80
-            {
81
-                radius = 0.5;
82
-            }
83
-            else if (blc == 5000)
84
-            {
85
-                radius = 1.25;
86
-            }
87
-
88
-
89
-            //外切圆半径
90
-            length = radius * Math.Pow(2, 0.5);
91
-
92
-            selectcontourpoint(EleLayerName);//选出高程点
93
-            if (pointarrlist.Count == 0)
94
-            {
95
-                return;
96
-            }
97
-
98
-            //开始计时
99
-            Stopwatch watch = new Stopwatch();
100
-            watch.Start();
101
-
102
-            LayerControl layerscontrol = new LayerControl();
103
-            string layname = "点线重叠标记符号";
104
-            if (!layerscontrol.haslayername(layname))
105
-            {
106
-                colorgb col = new colorgb(255, 0, 255);
107
-                layerscontrol.creatlayer(layname, col);
108
-                layerscontrol.movelayertofront(layname);
109
-            }
110
-            else
111
-                layerscontrol.movelayertofront(layname);
112
-
113
-            layname = "点线重叠高程点";
114
-            if (layerscontrol.haslayername(layname) == false)
115
-            {
116
-                colorgb col = new colorgb(255, 0, 255);
117
-                layerscontrol.creatlayer(layname, col);
118
-            }
119
-
120
-
121
-
122
-            for (int i = 0; i < pointarrlist.Count; i++)
123
-            {
124
-                CPoint p = pointarrlist[i];
125
-                bool flag = check(p.x, p.y, p.z);
126
-                if (flag == false)
127
-                {
128
-                    errorpointarrlist.Add(p);
129
-                }
130
-            }
131
-
132
-
133
-
134
-
135
-            Database database = HostApplicationServices.WorkingDatabase;
136
-            using (Transaction traction = database.TransactionManager.StartTransaction())
137
-            {
138
-
139
-                DocumentLock documentlock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
140
-                BlockTable blocktable = traction.GetObject(database.BlockTableId,
141
-                                         OpenMode.ForWrite) as BlockTable;
142
-
143
-
144
-                string decimals = "";
145
-                if (blc == 2000 || blc == 5000)
146
-                {
147
-                    decimals = "F1";
148
-                }
149
-                else
150
-                {
151
-                    decimals = "F2";
152
-                }
153
-
154
-                for (int i = 0; i < errorpointarrlist.Count; i++)
155
-                {
156
-                    CPoint p = errorpointarrlist[i];
157
-
158
-                    BasicFunction functions = new BasicFunction();
159
-                    functions.makeflag(p.x, p.y, 0, flagradius, "点线重叠标记符号");
160
-
161
-
162
-                    ObjectId id = (ObjectId)p.objID;
163
-                    Entity entity = (Entity)traction.GetObject(id, OpenMode.ForWrite);
164
-                    entity.Layer = "点线重叠高程点";
165
-
166
-                    double z = p.z;
167
-                    string ele = z.ToString(decimals);
168
-
169
-
170
-                    Point3d p1 = new Point3d(p.x, p.y - 2.5, 0);
171
-                    Point3d p2 = new Point3d(p.x + 10, p.y + 2.5, 0);
172
-                    TypedValue[] typedvalue = new TypedValue[2];
173
-
174
-                    typedvalue.SetValue(new TypedValue((int)DxfCode.Start, "Text"), 0);
175
-                    typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, EleLayerName), 1);
176
-
177
-                    SelectionFilter filter = new SelectionFilter(typedvalue);
178
-                    PromptSelectionResult psr = editor.SelectCrossingWindow(p1, p2, filter);
179
-                    if (psr.Status == PromptStatus.OK)
180
-                    {
181
-                        SelectionSet set = psr.Value;
182
-                        ObjectId[] objs = new ObjectId[set.Count];
183
-                        objs = set.GetObjectIds();
184
-                        for (int ii = 0; ii < objs.Length; ii++)
185
-                        {
186
-                            Entity Text = (Entity)traction.GetObject(objs[ii], OpenMode.ForWrite);
187
-
188
-                            DBText T = (DBText)Text;
189
-                            if (T.TextString == ele)
190
-                            {
191
-                                T.Layer = "点线重叠高程点";
192
-                                T.Color = GrxCAD.Colors.Color.FromRgb(255, 0, 255);
193
-                            }
194
-                        }
195
-                    }
196
-
197
-
198
-                }
199
-
200
-                traction.Commit();
201
-                documentlock.Dispose();
202
-                traction.Dispose();
203
-            }
204
-
205
-
206
-
207
-
208
-            //耗时
209
-            watch.Stop();
210
-            long times = watch.ElapsedMilliseconds;
211
-            //editor.Regen();
212
-            //editor.UpdateScreen();
213
-
214
-            editor.WriteMessage("\n" + "耗时:" + times.ToString() + "毫秒");
215
-            editor.WriteMessage("\n" + "检测到压线高程点" + errorpointarrlist.Count.ToString());
216
-            editor.WriteMessage("\n");
217
-
218
-        }
219
-
220
-
221
-
222
-
223
-        /// <summary>
224
-        /// 选出所有高程点,并取出其x,y,z坐标
225
-        /// </summary>
226
-        /// <param name="layername">高程点图层名</param>
227
-        private void selectcontourpoint(string layername)
228
-        {
229
-            Document document = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
230
-            Database database = HostApplicationServices.WorkingDatabase;
231
-            using (Transaction traction = database.TransactionManager.StartTransaction())
232
-            {
233
-                // 获得当前文档的编辑器  
234
-                Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
235
-                // 创建一个 TypedValue 数组,用于定义过滤条件
236
-                TypedValue[] typedvalue = new TypedValue[1];
237
-                typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, layername), 0);
238
-                // 赋值过滤条件给 SelectionFilter 对象
239
-                SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
240
-
241
-                // 要求在图形区域中手动选择对象
242
-                PromptSelectionResult psr = editor.GetSelection(selectionfilter);
243
-
244
-                //自动选择图像区域全部对象
245
-                //PromptSelectionResult psr = editor.SelectAll(selectionfilter);
246
-
247
-
248
-                if (psr.Status == PromptStatus.OK)
249
-                {
250
-                    SelectionSet selectionset = psr.Value;
251
-
252
-                    ObjectId[] obj = new ObjectId[selectionset.Count];
253
-                    obj = selectionset.GetObjectIds();
254
-
255
-
256
-                    for (int i = 0; i < obj.Length; i++)
257
-                    {
258
-                        ObjectId objid = obj[i];
259
-
260
-                        //找到实体,取出高程点的x,y,z
261
-                        Entity entity = (Entity)traction.GetObject(objid, OpenMode.ForRead);
262
-
263
-                        if (entity is BlockReference)
264
-                        {
265
-                            BlockReference blockreference = (BlockReference)entity;
266
-                            CPoint cp = new CPoint();
267
-
268
-                            cp.x = blockreference.Position.X;
269
-                            cp.y = blockreference.Position.Y;
270
-                            cp.z = blockreference.Position.Z;
271
-                            cp.objID = objid;
272
-
273
-                            pointarrlist.Add(cp);
274
-                        }
275
-
276
-                    }
277
-                    editor.WriteMessage("\n" + "选中高程点数量:" + pointarrlist.Count.ToString());
278
-
279
-                }
280
-
281
-
282
-
283
-                traction.Commit();
284
-                traction.Dispose();
285
-            }
286
-        }
287
-
288
-
289
-        /// <summary>
290
-        /// 检查是否压线 
291
-        /// </summary>
292
-        /// <param name="x">高程点x坐标</param>
293
-        /// <param name="y">高程点y坐标</param>
294
-        /// <param name="z">高程点z坐标</param>
295
-        private bool check(double x, double y, double z)
296
-        {
297
-
298
-            Database database = HostApplicationServices.WorkingDatabase;
299
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
300
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
301
-            using (Transaction acTrans = database.TransactionManager.StartTransaction())
302
-            {
303
-                ViewTableRecord currview = editor.GetCurrentView();
304
-                currview.CenterPoint = new Point2d(x, y);
305
-                currview.ViewDirection = new Vector3d(0, 0, 1);
306
-                currview.Width = windowwidth;
307
-                currview.Height = windowheight;
308
-                editor.SetCurrentView(currview);
309
-                acTrans.Commit();
310
-            }
311
-
312
-            Transaction traction = database.TransactionManager.StartTransaction();
313
-            List<double> elevation = new List<double>();
314
-            try
315
-            {
316
-
317
-                BlockTable blocktable = traction.GetObject(database.BlockTableId,
318
-                                             OpenMode.ForWrite) as BlockTable;
319
-
320
-
321
-                BlockTableRecord blocktablerecord = traction.GetObject(blocktable[BlockTableRecord.ModelSpace],
322
-                                                OpenMode.ForWrite) as BlockTableRecord;
323
-
324
-
325
-                //ViewTableRecord currview = editor.GetCurrentView();
326
-                //currview.CenterPoint = new Point2d(x, y);
327
-                //currview.ViewDirection = new Vector3d(0, 0, 1);
328
-                //currview.Width = windowwidth;
329
-                //currview.Height = windowheight;
330
-                //editor.SetCurrentView(currview);
331
-
332
-
333
-                string filttext = sqx + "," + jqx;
334
-                TypedValue[] filterlist = new TypedValue[1]
335
-                    {
336
-                        new TypedValue((int)DxfCode.LayerName,filttext)
337
-                    };
338
-                //filterelist.SetValue(new TypedValue((int)DxfCode.LayerName, "8110,8120"),0);
339
-                // 赋值过滤条件给 SelectionFilter 对象
340
-                SelectionFilter filter = new SelectionFilter(filterlist);
341
-
342
-                Point3d p1 = new Point3d(x - length, y - length, 0);
343
-                Point3d p2 = new Point3d(x + length, y + length, 0);
344
-
345
-
346
-                PromptSelectionResult pselectresult;
347
-                pselectresult = editor.SelectCrossingWindow(p1, p2, filter);
348
-
349
-                if (pselectresult.Status == PromptStatus.OK)
350
-                {
351
-                    SelectionSet selectionset = pselectresult.Value;
352
-                    ObjectId[] obj = new ObjectId[selectionset.Count];
353
-                    obj = selectionset.GetObjectIds();
354
-                    for (int i = 0; i < obj.Length; i++)
355
-                    {
356
-                        ObjectId objid = obj[i];
357
-                        Entity entity = (Entity)traction.GetObject(objid, OpenMode.ForRead);
358
-
359
-                        if (entity is Polyline)
360
-                        {
361
-                            Polyline pline = (Polyline)entity;
362
-                            Point3d p = pline.GetClosestPointTo(new Point3d(x, y, z), new Vector3d(0, 0, 1), false);
363
-                            double distance = System.Math.Sqrt((p.X - x) * (p.X - x) + (p.Y - y) * (p.Y - y));
364
-                            if (distance < radius)
365
-                            {
366
-                                if ((distance == 0 || pline.Elevation != z) == true)
367
-                                {
368
-
369
-                                    return false;
370
-                                    //cpoint cp = new cpoint();
371
-                                    //cp.x = x;
372
-                                    //cp.y = y;
373
-                                    //cp.z = z;
374
-                                    //errorpointarrlist.Add(cp);
375
-                                }
376
-                            }
377
-                        }
378
-                        else if (entity is Polyline2d)
379
-                        {
380
-                            Polyline2d pline2d = (Polyline2d)entity;
381
-                            Point3d p = pline2d.GetClosestPointTo(new Point3d(x, y, z), new Vector3d(0, 0, 1), false);
382
-                            double distance = System.Math.Sqrt((p.X - x) * (p.X - x) + (p.Y - y) * (p.Y - y));
383
-                            if (distance < radius)
384
-                            {
385
-                                if ((distance == 0 && pline2d.Elevation == z) == false)
386
-                                {
387
-                                    return false;
388
-                                    //cpoint cp = new cpoint();
389
-                                    //cp.x = x;
390
-                                    //cp.y = y;
391
-                                    //cp.z = z;
392
-                                    //errorpointarrlist.Add(cp);
393
-                                }
394
-                            }
395
-                        }
396
-
397
-                    }
398
-
399
-                }
400
-
401
-
402
-            }
403
-            catch (GrxCAD.Runtime.Exception ex)
404
-            {
405
-                string str = ex.ToString();
406
-                Application.ShowAlertDialog(str);
407
-            }
408
-            finally
409
-            {
410
-                doclock.Dispose();
411
-                traction.Dispose();
412
-            }
413
-
414
-            return true;
415
-
416
-        }
417
-
418
-
419
-
420
-
421
-    }
422
-}

+ 0
- 154
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Conn.Designer.cs 查看文件

@@ -1,154 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class Conn
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.comboBox_blc = new System.Windows.Forms.ComboBox();
33
-            this.label_Blc = new System.Windows.Forms.Label();
34
-            this.btn_Cancel = new System.Windows.Forms.Button();
35
-            this.btn_OK = new System.Windows.Forms.Button();
36
-            this.comboBox_jqx = new System.Windows.Forms.ComboBox();
37
-            this.label2 = new System.Windows.Forms.Label();
38
-            this.comboBox_sqx = new System.Windows.Forms.ComboBox();
39
-            this.label1 = new System.Windows.Forms.Label();
40
-            this.SuspendLayout();
41
-            // 
42
-            // comboBox_blc
43
-            // 
44
-            this.comboBox_blc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
45
-            this.comboBox_blc.FormattingEnabled = true;
46
-            this.comboBox_blc.Items.AddRange(new object[] {
47
-            "1:500",
48
-            "1:1000",
49
-            "1:2000",
50
-            "1:5000"});
51
-            this.comboBox_blc.Location = new System.Drawing.Point(186, 28);
52
-            this.comboBox_blc.Margin = new System.Windows.Forms.Padding(4);
53
-            this.comboBox_blc.Name = "comboBox_blc";
54
-            this.comboBox_blc.Size = new System.Drawing.Size(160, 23);
55
-            this.comboBox_blc.TabIndex = 53;
56
-            // 
57
-            // label_Blc
58
-            // 
59
-            this.label_Blc.AutoSize = true;
60
-            this.label_Blc.Location = new System.Drawing.Point(83, 31);
61
-            this.label_Blc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
62
-            this.label_Blc.Name = "label_Blc";
63
-            this.label_Blc.Size = new System.Drawing.Size(97, 15);
64
-            this.label_Blc.TabIndex = 52;
65
-            this.label_Blc.Text = "比例尺选择:";
66
-            // 
67
-            // btn_Cancel
68
-            // 
69
-            this.btn_Cancel.Location = new System.Drawing.Point(246, 167);
70
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
71
-            this.btn_Cancel.Name = "btn_Cancel";
72
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
73
-            this.btn_Cancel.TabIndex = 55;
74
-            this.btn_Cancel.Text = "取 消";
75
-            this.btn_Cancel.UseVisualStyleBackColor = true;
76
-            // 
77
-            // btn_OK
78
-            // 
79
-            this.btn_OK.Location = new System.Drawing.Point(83, 167);
80
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
81
-            this.btn_OK.Name = "btn_OK";
82
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
83
-            this.btn_OK.TabIndex = 54;
84
-            this.btn_OK.Text = "确 定";
85
-            this.btn_OK.UseVisualStyleBackColor = true;
86
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
87
-            // 
88
-            // comboBox_jqx
89
-            // 
90
-            this.comboBox_jqx.FormattingEnabled = true;
91
-            this.comboBox_jqx.Location = new System.Drawing.Point(186, 77);
92
-            this.comboBox_jqx.Name = "comboBox_jqx";
93
-            this.comboBox_jqx.Size = new System.Drawing.Size(160, 23);
94
-            this.comboBox_jqx.TabIndex = 59;
95
-            // 
96
-            // label2
97
-            // 
98
-            this.label2.AutoSize = true;
99
-            this.label2.Location = new System.Drawing.Point(83, 80);
100
-            this.label2.Name = "label2";
101
-            this.label2.Size = new System.Drawing.Size(97, 15);
102
-            this.label2.TabIndex = 58;
103
-            this.label2.Text = "计曲线图层:";
104
-            // 
105
-            // comboBox_sqx
106
-            // 
107
-            this.comboBox_sqx.FormattingEnabled = true;
108
-            this.comboBox_sqx.Location = new System.Drawing.Point(186, 123);
109
-            this.comboBox_sqx.Name = "comboBox_sqx";
110
-            this.comboBox_sqx.Size = new System.Drawing.Size(160, 23);
111
-            this.comboBox_sqx.TabIndex = 61;
112
-            // 
113
-            // label1
114
-            // 
115
-            this.label1.AutoSize = true;
116
-            this.label1.Location = new System.Drawing.Point(83, 126);
117
-            this.label1.Name = "label1";
118
-            this.label1.Size = new System.Drawing.Size(97, 15);
119
-            this.label1.TabIndex = 60;
120
-            this.label1.Text = "首曲线图层:";
121
-            // 
122
-            // Conn
123
-            // 
124
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
125
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
126
-            this.ClientSize = new System.Drawing.Size(432, 223);
127
-            this.Controls.Add(this.comboBox_sqx);
128
-            this.Controls.Add(this.label1);
129
-            this.Controls.Add(this.comboBox_jqx);
130
-            this.Controls.Add(this.label2);
131
-            this.Controls.Add(this.btn_Cancel);
132
-            this.Controls.Add(this.btn_OK);
133
-            this.Controls.Add(this.comboBox_blc);
134
-            this.Controls.Add(this.label_Blc);
135
-            this.Name = "Conn";
136
-            this.Text = "线相交检查";
137
-            this.Load += new System.EventHandler(this.Conn_Load);
138
-            this.ResumeLayout(false);
139
-            this.PerformLayout();
140
-
141
-        }
142
-
143
-        #endregion
144
-
145
-        private System.Windows.Forms.ComboBox comboBox_blc;
146
-        private System.Windows.Forms.Label label_Blc;
147
-        private System.Windows.Forms.Button btn_Cancel;
148
-        private System.Windows.Forms.Button btn_OK;
149
-        private System.Windows.Forms.ComboBox comboBox_jqx;
150
-        private System.Windows.Forms.Label label2;
151
-        private System.Windows.Forms.ComboBox comboBox_sqx;
152
-        private System.Windows.Forms.Label label1;
153
-    }
154
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Conn.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 479
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Connect.cs 查看文件

@@ -1,479 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-using GrxCAD.DatabaseServices;
8
-using GrxCAD.Geometry;
9
-using GrxCAD.ApplicationServices;
10
-using GrxCAD.EditorInput;
11
-using System.Windows.Forms;
12
-
13
-namespace HCTools
14
-{
15
-    class Connect
16
-    {
17
-        Point3dCollection joinpoint = new Point3dCollection();//连接点
18
-
19
-        #region 连接
20
-        /// <summary>
21
-        /// 连接线
22
-        /// </summary>
23
-        public void joinplline()
24
-        {
25
-            ObjectId[] line = BasicFunction.getPll();//获取待连接线
26
-            if (line == null)
27
-                return;
28
-
29
-            //遍历比较待连接线,连接高程相同的两等高线
30
-            Database db = HostApplicationServices.WorkingDatabase;
31
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
32
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
33
-
34
-            using (Transaction trans = db.TransactionManager.StartTransaction())
35
-            {
36
-                if (line.Length == 1)
37
-                {
38
-                    ed.WriteMessage("请选择另一条连接线");
39
-                    return;
40
-                }
41
-
42
-                try
43
-                {
44
-                    Entity entity1 = line[0].GetObject(OpenMode.ForWrite)as Entity;
45
-                    Entity entity2 = line[1].GetObject(OpenMode.ForWrite) as Entity;
46
-                    if (entity1 is Polyline2d && entity2 is Polyline)
47
-                    {
48
-                        Polyline2d pll1 = (Polyline2d)entity1;
49
-                        Polyline pll2 = (Polyline)trans.GetObject(entity2.Id, OpenMode.ForWrite);
50
-                        pll2.Elevation = pll1.Elevation;
51
-                        Calculate(pll1.StartPoint, pll1.EndPoint, pll2.StartPoint, pll2.EndPoint);
52
-                        Polyline pline = new Polyline();
53
-                        pline.AddVertexAt(0, new Point2d(joinpoint[0].X, joinpoint[0].Y), 0, 0, 0);
54
-                        pline.AddVertexAt(1, new Point2d(joinpoint[1].X, joinpoint[1].Y), 0, 0, 0);//创建连接线
55
-
56
-                        if (pll2.Elevation == pll1.Elevation)
57
-                        {
58
-                            //pll1.JoinEntity(pline);//浩辰的JoinEntity函数会报enotemplementedyet,不知道原因。
59
-                            Polyline pll_temp = PllConn(pll2, pline);
60
-                            //pll1.JoinEntity(pll2);
61
-                            Polyline pll_final = Pllpll2d(pll_temp, pll1, trans);
62
-                            pll1.Erase();
63
-                            pll2.Erase();
64
-                            BlockTable bt = (BlockTable)(trans.GetObject(db.BlockTableId, OpenMode.ForRead));
65
-                            BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
66
-                            btr.AppendEntity(pll_final);
67
-                            trans.AddNewlyCreatedDBObject(pll_final, true);
68
-                        }
69
-                        else
70
-                            MessageBox.Show("两线高程不一致!", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
71
-                    }
72
-                    else if (entity1 is Polyline && entity2 is Polyline2d)
73
-                    {
74
-                        Polyline pll1 = (Polyline)entity1;
75
-                        Polyline2d pll2 = (Polyline2d)entity2;
76
-                        Calculate(pll1.StartPoint, pll1.EndPoint, pll2.StartPoint, pll2.EndPoint);
77
-                        Polyline pline = new Polyline();
78
-                        pline.AddVertexAt(0, new Point2d(joinpoint[0].X, joinpoint[0].Y), 0, 0, 0);
79
-                        pline.AddVertexAt(1, new Point2d(joinpoint[1].X, joinpoint[1].Y), 0, 0, 0);//创建连接线
80
-
81
-                        if (pll2.Elevation == pll1.Elevation)
82
-                        {
83
-                            //pll1.JoinEntity(pline);//浩辰的JoinEntity函数会报enotemplementedyet,不知道原因。
84
-                            Polyline pll_temp = PllConn(pll1,pline);
85
-                            //pll1.JoinEntity(pll2);
86
-                            Polyline pll_final = Pllpll2d(pll_temp, pll2, trans);
87
-                            pll1.Erase();
88
-                            pll2.Erase();
89
-                            BlockTable bt = (BlockTable)(trans.GetObject(db.BlockTableId, OpenMode.ForRead));
90
-                            BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
91
-                            btr.AppendEntity(pll_final);
92
-                            trans.AddNewlyCreatedDBObject(pll_final, true);
93
-                        }
94
-                        else
95
-                            MessageBox.Show("两线高程不一致!", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
96
-                    }
97
-                    else if (entity1 is Polyline2d && entity2 is Polyline2d)
98
-                    {
99
-                        Polyline2d pll1 = (Polyline2d)entity1;
100
-                        Polyline2d pll2 = (Polyline2d)entity2;
101
-                        Calculate(pll1.StartPoint, pll1.EndPoint, pll2.StartPoint, pll2.EndPoint);
102
-                        Point3dCollection pos = new Point3dCollection{joinpoint[0], joinpoint[1]};
103
-                        DoubleCollection doubles = new DoubleCollection{0,0,0,0};
104
-                        Polyline2d pline = new Polyline2d(Poly2dType.SimplePoly, pos, 0, false, 0, 0, doubles);
105
-                        BlockTable bt = (BlockTable)(trans.GetObject(db.BlockTableId, OpenMode.ForRead));
106
-                        BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
107
-                        btr.AppendEntity(pline);
108
-                        trans.AddNewlyCreatedDBObject(pline, true);
109
-                        //pline.AddVertexAt(0, new Point2d(joinpoint[0].X, joinpoint[0].Y), 0, 0, 0);
110
-                        //pline.AddVertexAt(1, new Point2d(joinpoint[1].X, joinpoint[1].Y), 0, 0, 0);//创建连接线
111
-
112
-                        if (pll2.Elevation == pll1.Elevation)
113
-                        {
114
-                            Polyline2d pll_temp = Pll2dConn(pll1, pline,trans);
115
-                            btr.AppendEntity(pll_temp);
116
-                            trans.AddNewlyCreatedDBObject(pll_temp, true);
117
-                            //pll1.JoinEntity(pline);
118
-                            //pll1.JoinEntity(pll2);
119
-                            Polyline2d pll_final = Pll2dConn(pll_temp, pll2,trans);
120
-                            pll1.Erase();
121
-                            pline.Erase();
122
-                            pll2.Erase();
123
-                            pll_temp.Erase();
124
-                            btr.AppendEntity(pll_final);
125
-                            trans.AddNewlyCreatedDBObject(pll_final, true);
126
-                        }
127
-                        else
128
-                            MessageBox.Show("两线高程不一致!", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
129
-                    }
130
-                    else
131
-                    {
132
-                        Polyline pll1 = (Polyline)entity1;
133
-                        Polyline pll2 = (Polyline)entity2;
134
-                        Calculate(pll1.StartPoint, pll1.EndPoint, pll2.StartPoint, pll2.EndPoint);
135
-                        Polyline pline = new Polyline();
136
-                        pline.AddVertexAt(0, new Point2d(joinpoint[0].X, joinpoint[0].Y), 0, 0, 0);
137
-                        pline.AddVertexAt(1, new Point2d(joinpoint[1].X, joinpoint[1].Y), 0, 0, 0);//创建连接线
138
-
139
-                        if (pll2.Elevation == pll1.Elevation)
140
-                        {
141
-                            //pll1.JoinEntity(pline);//浩辰的JoinEntity函数会报enotemplementedyet,不知道原因。
142
-                            Polyline pll_temp = PllConn(pll1, pline);
143
-                            //pll1.JoinEntity(pll2);
144
-                            Polyline pll_final = PllConn(pll_temp, pll2);
145
-                            pll1.Erase();
146
-                            pll2.Erase();
147
-                            BlockTable bt = (BlockTable)(trans.GetObject(db.BlockTableId, OpenMode.ForRead));
148
-                            BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
149
-                            btr.AppendEntity(pll_final);
150
-                            trans.AddNewlyCreatedDBObject(pll_final, true);
151
-                        }
152
-                        else
153
-                            MessageBox.Show("两线高程不一致!", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
154
-                    }
155
-                    trans.Commit();
156
-                }
157
-
158
-
159
-                catch (GrxCAD.Runtime.Exception ex)
160
-                {
161
-                    string str = ex.ToString();
162
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog(str);
163
-                }
164
-            }
165
-        }
166
-
167
-
168
-        /// <summary>
169
-        /// 计算获得连接点
170
-        /// </summary>
171
-        private Point3dCollection Calculate(Point3d startpt1, Point3d endpt1, Point3d startpt2, Point3d endpt2)
172
-        {
173
-            Double[] distance=new Double[4];
174
-            joinpoint.Clear();
175
-            int i = 0;
176
-
177
-            //两线段四个端点之间的距离
178
-            distance[0] = Math.Sqrt(Math.Pow((startpt1.X - startpt2.X), 2) + Math.Pow((startpt1.Y - startpt2.Y), 2));
179
-            distance[1] = Math.Sqrt(Math.Pow((startpt1.X - endpt2.X), 2) + Math.Pow((startpt1.Y - endpt2.Y), 2));
180
-            distance[2] = Math.Sqrt(Math.Pow((endpt1.X - startpt2.X), 2) + Math.Pow((endpt1.Y - startpt2.Y), 2));
181
-            distance[3] = Math.Sqrt(Math.Pow((endpt1.X - endpt2.X), 2) + Math.Pow((endpt1.Y - endpt2.Y), 2));
182
-
183
-            //比较获取最小的距离,得到连接点
184
-            for (i = 0; i < distance.Length; i++)
185
-            {
186
-                if (distance[i] == distance.Min())
187
-                    break;
188
-            }
189
-            switch (i.ToString())
190
-            {
191
-                case "0":
192
-                    joinpoint.Add(startpt1);
193
-                    joinpoint.Add(startpt2);
194
-                    break;
195
-
196
-                case "1":
197
-                    joinpoint.Add(startpt1);
198
-                    joinpoint.Add(endpt2);
199
-                    break;
200
-
201
-                case "2":
202
-                    joinpoint.Add(endpt1);
203
-                    joinpoint.Add(startpt2);
204
-                    break;
205
-
206
-                case "3":
207
-                    joinpoint.Add(endpt1);
208
-                    joinpoint.Add(endpt2);
209
-                    break;
210
-            }
211
-            return joinpoint;
212
-        }
213
-
214
-        /// <summary>
215
-        /// 连接两条线(两条都是Polyline)
216
-        /// </summary>
217
-        private Polyline PllConn(Polyline pll1, Polyline pll2)
218
-        {
219
-            List<Point2d> pllpt = new List<Point2d>();
220
-            List<Point2d> pll1pt = new List<Point2d>();
221
-            for (int i = 0; i < pll1.NumberOfVertices; i++)
222
-            {
223
-                pllpt.Add(pll1.GetPoint2dAt(i));
224
-            }
225
-            for (int i = 0; i < pll2.NumberOfVertices; i++)
226
-            {
227
-                pll1pt.Add(pll2.GetPoint2dAt(i));
228
-            }
229
-            //if (pllpt[pllpt.Count - 1] != pll1pt[pll1pt.Count - 1])
230
-            //    pllpt.Reverse();
231
-            //else if (pllpt[0] != pll1pt[0])
232
-            //    pll1pt.Reverse();
233
-            if (pllpt[pllpt.Count - 1] == pll1pt[pll1pt.Count - 1])
234
-                pll1pt.Reverse();
235
-            else if (pllpt[0] == pll1pt[pll1pt.Count - 1])
236
-            {
237
-                pllpt.Reverse();
238
-                pll1pt.Reverse();
239
-            }
240
-            else if (pllpt[0] == pll1pt[0])
241
-                pllpt.Reverse();
242
-                for (int i = 0; i < pll1pt.Count; i++)
243
-            {
244
-                if (pllpt.Contains(pll1pt[i]))
245
-                    continue;
246
-                else
247
-                    pllpt.Add(pll1pt[i]);
248
-            }
249
-            Polyline pline = new Polyline();
250
-            for (int i = 0; i < pllpt.Count; i++)
251
-            {
252
-                pline.AddVertexAt(i, new Point2d(pllpt[i].X, pllpt[i].Y), 0, 0, 0);
253
-            }
254
-            pline.Elevation = pll1.Elevation;
255
-            pline.LinetypeId = pll1.LinetypeId;
256
-            pline.Color = pll1.Color;
257
-            pline.Layer = pll1.Layer;
258
-            return pline;
259
-        }
260
-
261
-
262
-        /// <summary>
263
-        /// 连接两条线(两条都是Polyline2d)
264
-        /// </summary>
265
-        private Polyline2d Pll2dConn(Polyline2d pll1, Polyline2d pll2, Transaction tr)
266
-        {
267
-            List<Point3d> pllpt = new List<Point3d>();
268
-            List<Point3d> pll1pt = new List<Point3d>();
269
-            List<double> bulgeList = new List<double>();//存凸度
270
-            List<double> bulgeList1 = new List<double>();
271
-            Point3dCollection ptcoll = new Point3dCollection();
272
-            DoubleCollection dbcoll = new DoubleCollection();
273
-            foreach(ObjectId id in pll1)
274
-            {
275
-                Vertex2d vx = (Vertex2d)tr.GetObject(id, OpenMode.ForRead);
276
-                if (vx.VertexType != Vertex2dType.SplineControlVertex)
277
-                { 
278
-                    pllpt.Add(vx.Position);
279
-                    bulgeList.Add(vx.Bulge);
280
-                }
281
-            }
282
-            foreach (ObjectId id in pll2)
283
-            {
284
-                Vertex2d vx = (Vertex2d)tr.GetObject(id, OpenMode.ForRead);
285
-                if (vx.VertexType != Vertex2dType.SplineControlVertex)
286
-                {
287
-                    pll1pt.Add(vx.Position);
288
-                    bulgeList1.Add(vx.Bulge);
289
-                }
290
-            }
291
-            //if (pllpt[pllpt.Count - 1] != pll1pt[pll1pt.Count - 1])
292
-            //{
293
-            //    pllpt.Reverse();
294
-            //    bulgeList.Reverse();
295
-            //}
296
-            //else if (pllpt[0] != pll1pt[0])
297
-            //{ 
298
-            //    pll1pt.Reverse();
299
-            //    bulgeList1.Reverse();
300
-            //}
301
-            if (pllpt[pllpt.Count - 1] == pll1pt[pll1pt.Count - 1])
302
-            { 
303
-                pll1pt.Reverse();
304
-                bulgeList1.Reverse();
305
-            }
306
-            else if (pllpt[0] == pll1pt[pll1pt.Count - 1])
307
-            {
308
-                pllpt.Reverse();
309
-                pll1pt.Reverse();
310
-                bulgeList.Reverse();
311
-                bulgeList1.Reverse();
312
-            }
313
-            else if (pllpt[0] == pll1pt[0])
314
-            { 
315
-                pllpt.Reverse();
316
-                bulgeList1.Reverse();
317
-            }
318
-            for (int i = 0; i < pll1pt.Count; i++)
319
-            {
320
-                if (pllpt.Contains(pll1pt[i]))
321
-                    continue;
322
-                else
323
-                { 
324
-                    pllpt.Add(pll1pt[i]);
325
-                    bulgeList.Add(bulgeList1[i]);
326
-                }
327
-            }
328
-            for (int i = 0; i < pllpt.Count; i++)
329
-            {
330
-                ptcoll.Add(pllpt[i]);
331
-            }
332
-            for (int i = 0; i < bulgeList.Count; i++)
333
-            {
334
-                dbcoll.Add(bulgeList[i]);
335
-            }
336
-            Polyline2d pline = new Polyline2d(pll1.PolyType, ptcoll, 0, false, 0, 0, dbcoll);
337
-            pline.Elevation = pll1.Elevation;
338
-            pline.LinetypeId = pll1.LinetypeId;
339
-            pline.Color = pll1.Color;
340
-            pline.Layer = pll1.Layer;
341
-            return pline;
342
-        }
343
-
344
-
345
-        /// <summary>
346
-        /// 连接两条线(一条是Polyline,一条是Polyline2d,连接后的线为Polyline)
347
-        /// </summary>
348
-        private Polyline Pllpll2d(Polyline pll1, Polyline2d pll2, Transaction tr)
349
-        {
350
-            List<Point3d> pllpt = new List<Point3d>();
351
-            List<Point3d> pll1pt = new List<Point3d>();
352
-            for (int i = 0; i < pll1.NumberOfVertices; i++)
353
-            {
354
-                pllpt.Add(pll1.GetPoint3dAt(i));
355
-            }
356
-            foreach (ObjectId id in pll2)
357
-            {
358
-                Vertex2d vx = (Vertex2d)tr.GetObject(id, OpenMode.ForRead);
359
-                if (vx.VertexType != Vertex2dType.SplineControlVertex)
360
-                {
361
-                    pll1pt.Add(vx.Position);
362
-                }
363
-            }
364
-            //if (pllpt[pllpt.Count - 1] != pll1pt[pll1pt.Count - 1])
365
-            //    pllpt.Reverse();
366
-            //else if (pllpt[0] != pll1pt[0])
367
-            //    pll1pt.Reverse();
368
-            if (pllpt[pllpt.Count - 1] == pll1pt[pll1pt.Count - 1])
369
-                pll1pt.Reverse();
370
-            else if (pllpt[0] == pll1pt[pll1pt.Count - 1])
371
-            {
372
-                pllpt.Reverse();
373
-                pll1pt.Reverse();
374
-            }
375
-            else if (pllpt[0] == pll1pt[0])
376
-                pllpt.Reverse();
377
-            for (int i = 0; i < pll1pt.Count; i++)
378
-            {
379
-                if (pllpt.Contains(pll1pt[i]))
380
-                    continue;
381
-                else
382
-                    pllpt.Add(pll1pt[i]);
383
-            }
384
-            Polyline pline = new Polyline();
385
-            for (int i = 0; i < pllpt.Count; i++)
386
-            {
387
-                pline.AddVertexAt(i, new Point2d(pllpt[i].X, pllpt[i].Y), 0, 0, 0);
388
-            }
389
-            pline.Elevation = pll1.Elevation;
390
-            pline.LinetypeId = pll1.LinetypeId;
391
-            pline.Color = pll1.Color;
392
-            pline.Layer = pll1.Layer;
393
-            return pline;
394
-        }
395
-
396
-        #endregion
397
-
398
-
399
-        //public void conn()
400
-        //{
401
-        //    ObjectIdCollection ids = getEntity();
402
-        //    BlockReference br = null;
403
-        //    Polyline pll = null;
404
-        //    DBObjectCollection objcoll = new DBObjectCollection();
405
-        //    string Brname = "";
406
-        //    Point3d Brposition = new Point3d();
407
-
408
-        //    Database db = HostApplicationServices.WorkingDatabase;
409
-        //    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
410
-        //    Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
411
-        //    using (Transaction trans = db.TransactionManager.StartTransaction())
412
-        //    {
413
-        //        foreach(ObjectId id in ids)
414
-        //        {
415
-        //            if (trans.GetObject(id, OpenMode.ForRead) is BlockReference)
416
-        //            {
417
-        //                br = trans.GetObject(id, OpenMode.ForRead)as BlockReference;
418
-        //                Brname = br.Name;
419
-        //                Brposition = br.Position;
420
-        //            }
421
-        //            if (trans.GetObject(id, OpenMode.ForRead) is Polyline)
422
-        //            {
423
-        //                pll = trans.GetObject(id, OpenMode.ForRead) as Polyline;
424
-        //            }
425
-        //        }
426
-        //        br.Explode(objcoll);
427
-        //        trans.Commit();
428
-        //    }
429
-
430
-        //    foreach (Entity ent in objcoll)
431
-        //    {
432
-        //        using (Transaction trans = db.TransactionManager.StartTransaction())
433
-        //        {
434
-        //            BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
435
-        //            BlockTableRecord blocktablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace],
436
-        //                OpenMode.ForWrite) as BlockTableRecord;
437
-        //            blocktablerecord.AppendEntity(ent);
438
-        //            trans.AddNewlyCreatedDBObject(ent, true);
439
-        //            trans.Commit();
440
-        //        }
441
-        //    }
442
-
443
-
444
-        //    doclock.Dispose();
445
-        //}
446
-
447
-
448
-        //private static ObjectIdCollection getEntity()
449
-        //{
450
-        //    ObjectIdCollection ids = new ObjectIdCollection();
451
-
452
-        //    Document doc = Application.DocumentManager.MdiActiveDocument;
453
-        //    Database db = doc.Database;
454
-        //    Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
455
-
456
-        //    TypedValue[] value = new TypedValue[]
457
-        //    {
458
-        //        new TypedValue((int)DxfCode.Start,"Insert,POLYLINE"),
459
-        //    };//设置筛选条件
460
-        //    SelectionFilter filter = new SelectionFilter(value);
461
-        //    //选择区域中全部对象
462
-        //    //PromptSelectionResult psr = ed.SelectAll(filter);
463
-        //    // 要求在图形区域中手动选择对象
464
-        //    PromptSelectionResult psr = ed.GetSelection(filter);
465
-
466
-
467
-        //    if (psr.Status == PromptStatus.OK)
468
-        //    {
469
-        //        using (Transaction trans = db.TransactionManager.StartTransaction())
470
-        //        {
471
-        //            SelectionSet ss = psr.Value;
472
-        //            ids = new ObjectIdCollection(ss.GetObjectIds());
473
-        //            trans.Commit();
474
-        //        }
475
-        //    }
476
-        //    return ids;
477
-        //}
478
-    }
479
-}

+ 0
- 856
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutContourLine.cs 查看文件

@@ -1,856 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using GrxCAD.Geometry;
5
-using System;
6
-using System.Collections.Generic;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    class CutContourLine
15
-    {
16
-        public static string sqxlayer;
17
-        public static string jqxlayer;
18
-        public static int mapscale;
19
-        public static double scalelen;
20
-        public static double lenIgnore;
21
-        public static double eledvalue;
22
-        public void ccls()
23
-        {
24
-            DocumentLock documentlock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
25
-            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
26
-            Database db = doc.Database;
27
-            //类全局变量
28
-            //存储地图图层
29
-            //System.Collections.ArrayList layerlist = new System.Collections.ArrayList();
30
-            LayerTable layertable = null;
31
-            bool openflag = true;
32
-            List<Entity> plentitycollection = new List<Entity>();
33
-            List<Entity> plentitycollection1 = new List<Entity>();
34
-            //保存裁剪掉的等高线
35
-            List<Entity> cdentity = new List<Entity>();
36
-
37
-
38
-            #region//第一个事务 获取计曲线
39
-            using (Transaction tran = doc.TransactionManager.StartTransaction())
40
-            {
41
-                
42
-                //layertable = tran.GetObject(db.LayerTableId, OpenMode.ForRead) as LayerTable;
43
-                ////获取图层
44
-                //foreach (ObjectId id in layertable)
45
-                //{
46
-                //    DocumentLock docLock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
47
-                //    LayerTableRecord lyrtbrec = tran.GetObject(id, OpenMode.ForWrite) as LayerTableRecord;
48
-                //    docLock.Dispose();
49
-                //    layerlist.Add(lyrtbrec.Name);
50
-                    
51
-                //}
52
-
53
-                //CLSelectForm clsf = new CLSelectForm(layerlist);
54
-                //if (clsf.ShowDialog() == DialogResult.OK)
55
-                //{
56
-                //    openflag = true;
57
-                //    mapscale = clsf.mapscale;
58
-                //    sqxlayer = clsf.SQX;
59
-                //    jqxlayer = clsf.JQX;
60
-                //    scalelen = clsf.ScaleLength;
61
-                //    lenIgnore = clsf.LenIgnore;
62
-                //    eledvalue = clsf.EleDValue;
63
-                //}
64
-
65
-
66
-                if (openflag == true)
67
-                {
68
-                    ///带1的为首曲线过滤,没有的是计曲线过滤
69
-                    TypedValue[] tv = new TypedValue[1];
70
-                    TypedValue[] tv1 = new TypedValue[1];
71
-                    tv.SetValue(new TypedValue((int)DxfCode.LayerName, jqxlayer), 0);
72
-                    tv1.SetValue(new TypedValue((int)DxfCode.LayerName, sqxlayer), 0);
73
-                    SelectionFilter sf = new SelectionFilter(tv);
74
-                    SelectionFilter sf1 = new SelectionFilter(tv1);
75
-                    //doc.Editor.WriteMessage("请选择计曲线!");
76
-
77
-                    //PromptSelectionResult psr = doc.Editor.GetSelection(sf);
78
-                    PromptSelectionResult psr = doc.Editor.SelectAll(sf);
79
-                    PromptSelectionResult psr1 = doc.Editor.SelectAll(sf1);
80
-
81
-                    if (psr.Status == PromptStatus.OK && psr1.Status == PromptStatus.OK)
82
-                    {
83
-                        //// 以只读方式打开块表记录   Open the Block table record for read
84
-                        BlockTable acbt = tran.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
85
-                        //// 以写方式打开模型空间块表记录   Open the Block table record Model space for write
86
-                        BlockTableRecord acblr = tran.GetObject(acbt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
87
-                        SelectionSet ss = psr.Value;
88
-                        //// 以只读方式打开块表记录   Open the Block table record for read
89
-                        SelectionSet ss1 = psr1.Value;
90
-
91
-
92
-                        foreach (ObjectId idpl in ss.GetObjectIds())
93
-                        {
94
-                            Entity enpl = tran.GetObject(idpl, OpenMode.ForWrite, true) as Entity;
95
-                            if (enpl is Polyline)
96
-                            {
97
-                                Polyline pl = enpl as Polyline;
98
-                                if (pl.Elevation != 0)
99
-                                {
100
-                                    plentitycollection.Add(enpl);
101
-                                }
102
-                            }
103
-                            else if (enpl is Polyline2d)
104
-                            {
105
-                                Polyline2d pl2d = enpl as Polyline2d;
106
-                                if (pl2d.Elevation != 0)
107
-                                {
108
-                                    plentitycollection.Add(enpl);
109
-                                }
110
-                            }
111
-                        }
112
-                        foreach (ObjectId idp2 in ss1.GetObjectIds())
113
-                        {
114
-                            Entity enp2 = tran.GetObject(idp2, OpenMode.ForWrite, true) as Entity;
115
-                            if (enp2 is Polyline)
116
-                            {
117
-                                Polyline pl = enp2 as Polyline;
118
-                                if (pl.Elevation != 0)
119
-                                {
120
-                                    plentitycollection1.Add(enp2);
121
-                                }
122
-                            }
123
-                            else if (enp2 is Polyline2d)
124
-                            {
125
-                                Polyline2d pl2d = enp2 as Polyline2d;
126
-                                if (pl2d.Elevation != 0)
127
-                                {
128
-                                    plentitycollection1.Add(enp2);
129
-                                }
130
-                            }
131
-                        }
132
-                    }
133
-                    else
134
-                        doc.Editor.WriteMessage("没有选择到任何实体\r\n");
135
-                    //////////////////////////////这个气死我了 
136
-
137
-                    doc.Editor.WriteMessage("程序开始运行\r\n.........\r\n......\r\n...\r\n");
138
-                    tran.Commit();
139
-                    tran.Dispose();
140
-                }
141
-                else
142
-                {
143
-                    MessageBox.Show("请选择相应的每一个参数!", "警告");
144
-                    return;
145
-
146
-                }
147
-            }//end using
148
-            #endregion
149
-
150
-            #region//检查、裁剪等高线
151
-            if (plentitycollection.Count > 0)
152
-            {
153
-                //根据高程将计曲线排序
154
-                plentitycollection.Sort(CompareDGXByElevation);
155
-                //删除重叠,重复的等高线
156
-                //int count = RemoveOverlapPolyline(ref plentitycollection);
157
-
158
-                ////////////////////方便调试 仅此而已
159
-                //List<Polyline2d> test = new List<Polyline2d>();
160
-                //foreach (Entity en in plentitycollection)
161
-                //{
162
-                //    Polyline2d pl = en as Polyline2d;
163
-                //    if (pl != null)
164
-                //        test.Add(pl);
165
-                //}
166
-
167
-                //List<Polyline> test00 = new List<Polyline>();
168
-                //foreach (Entity en in plentitycollection)
169
-                //{
170
-                //    Polyline pl = en as Polyline;
171
-                //    if (pl != null)
172
-                //        test00.Add(pl);
173
-                //}
174
-                ///////////////////
175
-
176
-
177
-
178
-                //以每条计曲线为循环变量
179
-                for (int i = 0; i < plentitycollection.Count - 1; i++)
180
-                {
181
-                    Point3dCollection pt3dcoll = new Point3dCollection();
182
-
183
-                    Entity en1 = plentitycollection[i];
184
-                    double ele1 = 0;
185
-                    Point2d pten1start = new Point2d();//
186
-                    Point2d pten1end = new Point2d();//
187
-
188
-                    if (en1 is Polyline)
189
-                    {
190
-                        Polyline pl = en1 as Polyline;
191
-                        pten1start = new Point2d(pl.StartPoint.X, pl.StartPoint.Y);
192
-                        pten1end = new Point2d(pl.EndPoint.X, pl.EndPoint.Y);
193
-
194
-                        ele1 = Convert.ToDouble(pl.Elevation.ToString("f1"));
195
-                        pl.GetStretchPoints(pt3dcoll);
196
-                    }
197
-                    else if (en1 is Polyline2d)
198
-                    {
199
-                        Polyline2d pl2d = en1 as Polyline2d;
200
-                        pten1start = new Point2d(pl2d.StartPoint.X, pl2d.StartPoint.Y);
201
-                        pten1end = new Point2d(pl2d.EndPoint.X, pl2d.EndPoint.Y);
202
-
203
-                        ele1 = Convert.ToDouble(pl2d.Elevation.ToString("f1"));
204
-                        pl2d.GetStretchPoints(pt3dcoll);
205
-                    }
206
-
207
-                    int j = 1;
208
-                    Entity en2 = null;
209
-                    double ele2 = 0, ele = 0;
210
-                    Point2d pten2start = new Point2d();
211
-                    Point2d pten2end = new Point2d();
212
-
213
-                    double startlength = 9999999, endlength = 9999999;
214
-
215
-                    //寻找一条等高线(计曲线)相邻的等高线
216
-                    while (ele <= ele1 + eledvalue)
217
-                    {
218
-                        Entity entemp = plentitycollection[j];
219
-                        if (entemp is Polyline)
220
-                        {
221
-                            Polyline pl = entemp as Polyline;
222
-                            ele = Convert.ToDouble(pl.Elevation.ToString("f1"));
223
-
224
-                            if (ele == ele1 + eledvalue)
225
-                            {
226
-                                pten2start = new Point2d(pl.StartPoint.X, pl.StartPoint.Y);
227
-                                pten2end = new Point2d(pl.EndPoint.X, pl.EndPoint.Y);
228
-
229
-                                double start = pten1start.GetDistanceTo(pten2start);
230
-                                double end = pten1end.GetDistanceTo(pten2end);
231
-
232
-                                //这段代码主要解决相邻有多条等高线时选择距离最近的
233
-                                if (startlength > start && endlength > end)
234
-                                {
235
-                                    startlength = start;
236
-                                    endlength = end;
237
-
238
-                                    en2 = entemp;
239
-                                    ele2 = ele;
240
-                                }
241
-                                else if (startlength > start)
242
-                                {
243
-                                    startlength = start;
244
-                                    endlength = end;
245
-
246
-                                    en2 = entemp;
247
-                                    ele2 = ele;
248
-                                }
249
-                                else if (endlength > end)
250
-                                {
251
-                                    startlength = start;
252
-                                    endlength = end;
253
-
254
-                                    en2 = entemp;
255
-                                    ele2 = ele;
256
-                                }
257
-                            }
258
-                        }
259
-                        else if (entemp is Polyline2d)
260
-                        {
261
-                            Polyline2d pl2d = entemp as Polyline2d;
262
-                            ele = Convert.ToDouble(pl2d.Elevation.ToString("f1"));
263
-
264
-                            if (ele == ele1 + eledvalue)
265
-                            {
266
-                                pten2start = new Point2d(pl2d.StartPoint.X, pl2d.StartPoint.Y);
267
-                                pten2end = new Point2d(pl2d.EndPoint.X, pl2d.EndPoint.Y);
268
-
269
-                                double start = pten1start.GetDistanceTo(pten2start);
270
-                                double end = pten1end.GetDistanceTo(pten2end);
271
-
272
-                                if (startlength > start && endlength > end)
273
-                                {
274
-                                    startlength = start;
275
-                                    endlength = end;
276
-
277
-                                    en2 = entemp;
278
-                                    ele2 = ele;
279
-                                }
280
-                                else if (startlength > start)
281
-                                {
282
-                                    startlength = start;
283
-                                    endlength = end;
284
-
285
-                                    en2 = entemp;
286
-                                    ele2 = ele;
287
-                                }
288
-                                else if (endlength > end)
289
-                                {
290
-                                    startlength = start;
291
-                                    endlength = end;
292
-
293
-                                    en2 = entemp;
294
-                                    ele2 = ele;
295
-                                }
296
-                            }
297
-                        }
298
-                        j++;
299
-                        if (j > plentitycollection.Count - 1)
300
-                            break;
301
-                    }
302
-
303
-                    //满足裁剪条件的节点
304
-                    Point3dCollection cjcoll = new Point3dCollection();
305
-                    bool flag = false;
306
-
307
-                    if (en2 != null)
308
-                    {
309
-                        //以计曲线节点为循环
310
-                        for (int ii = 0; ii < pt3dcoll.Count; ii++)
311
-                        {
312
-                            Point3d pt3d = pt3dcoll[ii];
313
-
314
-                            Point3d temppt3d = new Point3d();
315
-                            temppt3d = GetClosestPoint(pt3d, en2);
316
-
317
-                            //临时计算两个3d点之间的平面距离
318
-                            Point2d pt2d1 = new Point2d(pt3d.X, pt3d.Y);
319
-                            Point2d pt2d2 = new Point2d(temppt3d.X, temppt3d.Y);
320
-
321
-                            double length = pt2d1.GetDistanceTo(pt2d2);
322
-                            if (length < scalelen)
323
-                            {
324
-                                //flag为false标志继续添加满足条件节点
325
-                                //flag为true标志结束添加节点,进行后续计算
326
-                                
327
-                                if (ii == pt3dcoll.Count - 1)//最后一组节点
328
-                                {
329
-                                    flag = true;
330
-                                }
331
-                                else 
332
-                                {
333
-                                    cjcoll.Add(pt3d);
334
-                                    cjcoll.Add(temppt3d);
335
-                                }
336
-                            }
337
-                            else
338
-                            {
339
-                                flag = true;
340
-                            }
341
-                            if (flag == true)
342
-                            {
343
-                                if (cjcoll.Count > 0)
344
-                                {
345
-                                    if (cjcoll.Count > 3)
346
-                                    {
347
-                                        //矩形框四个角点
348
-                                        //选取2个为裁剪的两个节点
349
-                                        //为计曲线上的点
350
-                                        Point3d pt1cjnode = new Point3d();
351
-                                        Point3d pt2node = new Point3d();
352
-                                        Point3d pt3cjnode = new Point3d();
353
-                                        Point3d pt4node = new Point3d();
354
-
355
-                                        pt1cjnode = cjcoll[0];
356
-                                        pt2node = cjcoll[1];
357
-                                        pt3cjnode = cjcoll[cjcoll.Count - 2];
358
-                                        pt4node = cjcoll[cjcoll.Count - 1];
359
-
360
-                                        Point3dCollection rectcj = new Point3dCollection();
361
-                                        rectcj.Add(pt1cjnode);
362
-                                        rectcj.Add(pt2node);
363
-                                        rectcj.Add(pt3cjnode);
364
-                                        rectcj.Add(pt4node);
365
-
366
-                                        #region
367
-                                        Point2d pt2djudge1 = new Point2d(pt1cjnode.X, pt1cjnode.Y);
368
-                                        Point2d pt2djudge2 = new Point2d(pt3cjnode.X, pt3cjnode.Y);
369
-
370
-                                        if (pt2djudge1.GetDistanceTo(pt2djudge2) > lenIgnore)
371
-                                        {
372
-                                            #region//画裁剪线
373
-                                            ////using (Transaction tran = doc.TransactionManager.StartTransaction())
374
-                                            ////{
375
-
376
-                                            ////    //// 以只读方式打开块表记录   Open the Block table record for read
377
-                                            ////    BlockTable acbt = tran.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
378
-                                            ////    //// 以写方式打开模型空间块表记录   Open the Block table record Model space for write
379
-                                            ////    BlockTableRecord acblr = tran.GetObject(acbt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
380
-
381
-                                            ////    //设置激活图层
382
-                                            ////    layertable = tran.GetObject(db.LayerTableId, OpenMode.ForWrite) as LayerTable;
383
-                                            ////    if (!layertable.Has("CJX"))
384
-                                            ////    {
385
-                                            ////        LayerTableRecord ltr = new LayerTableRecord();
386
-                                            ////        ltr.Name = "CJX";
387
-                                            ////        ObjectId layerid = layertable.Add(ltr);
388
-                                            ////        tran.AddNewlyCreatedDBObject(ltr, true);
389
-                                            ////        db.Clayer = layerid;
390
-                                            ////    }
391
-                                            ////    else
392
-                                            ////    {
393
-                                            ////        //设置首曲线为当期激活图层
394
-                                            ////        foreach (ObjectId id in layertable)
395
-                                            ////        {
396
-                                            ////            LayerTableRecord lyrtbrec = tran.GetObject(id, OpenMode.ForWrite) as LayerTableRecord;
397
-                                            ////            if (lyrtbrec.Name == "CJX")
398
-                                            ////                db.Clayer = id;
399
-                                            ////        }
400
-                                            ////    }
401
-
402
-                                            ////    Polyline3d cjxpl = new Polyline3d(Poly3dType.SimplePoly, cjcoll, false);
403
-
404
-                                            ////    cjxpl.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.Blue);
405
-                                            ////    acblr.AppendEntity(cjxpl);
406
-                                            ////    cjxpl.Layer = "CJX";
407
-                                            ////    tran.AddNewlyCreatedDBObject(cjxpl, true);
408
-
409
-                                            ////    //doc.Editor.WriteMessage("");
410
-
411
-                                            ////    tran.Commit();
412
-                                            ////    tran.Dispose();
413
-                                            ////}
414
-                                            #endregion
415
-
416
-                                            double Xmin = 9999999999, Xmax = 0, Ymin = 9999999999, Ymax = 0;
417
-                                            //获取该点集的最大值最小值
418
-                                            foreach (Point3d pt3dcorner in cjcoll)
419
-                                            {
420
-                                                if (Xmin >= pt3dcorner.X)
421
-                                                    Xmin = pt3dcorner.X;
422
-                                                if (Xmax < pt3dcorner.X)
423
-                                                    Xmax = pt3dcorner.X;
424
-                                                if (Ymin >= pt3dcorner.Y)
425
-                                                    Ymin = pt3dcorner.Y;
426
-                                                if (Ymax < pt3dcorner.Y)
427
-                                                    Ymax = pt3dcorner.Y;
428
-                                            }
429
-                                            if (Xmin > Xmax)
430
-                                            {
431
-                                                double tempt = 0;
432
-                                                tempt = Xmin;
433
-                                                Xmin = Xmax;
434
-                                                Xmax = tempt;
435
-                                            }
436
-
437
-                                            if (Ymin > Ymax)
438
-                                            {
439
-                                                double tempt = 0;
440
-                                                tempt = Ymin;
441
-                                                Ymin = Ymax;
442
-                                                Ymax = tempt;
443
-                                            }
444
-                                            #region//设置视图
445
-                                            //设置当前视图
446
-                                            ViewTableRecord viewtr = new ViewTableRecord();
447
-                                            viewtr.CenterPoint = new Point2d(Xmin + (Xmax - Xmin) / 2, Ymin + (Ymax - Ymin) / 2);
448
-                                            viewtr.ViewDirection = new Vector3d(0, 0, 1);
449
-                                            viewtr.Height = Ymax - Ymin + 100;
450
-                                            viewtr.Width = Xmax - Xmin + 100;
451
-                                            doc.Editor.SetCurrentView(viewtr);
452
-                                            #endregion
453
-
454
-                                            //对选择到的首曲线进行处理
455
-                                            string stttr = "";
456
-                                            TypedValue[] tvtemp = new TypedValue[1];
457
-                                            tvtemp.SetValue(new TypedValue((int)DxfCode.LayerName, sqxlayer), 0);
458
-                                            SelectionFilter sftemp = new SelectionFilter(tvtemp);
459
-                                            PromptSelectionResult psrtempt = doc.Editor.SelectCrossingWindow(new Point3d(Xmin, Ymin, 0), new Point3d(Xmax, Ymax, 0), sftemp);
460
-                                            if (psrtempt.Status == PromptStatus.OK)
461
-                                            {
462
-                                                SelectionSet sstempt = psrtempt.Value;
463
-                                                #region
464
-                                                using (Transaction tran = doc.TransactionManager.StartTransaction())
465
-                                                {
466
-                                                    //// 以只读方式打开块表记录   Open the Block table record for read
467
-                                                    BlockTable acbt = tran.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
468
-                                                    //// 以写方式打开模型空间块表记录   Open the Block table record Model space for write
469
-                                                    BlockTableRecord acblr = tran.GetObject(acbt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
470
-
471
-                                                    //设置激活图层
472
-                                                    layertable = tran.GetObject(db.LayerTableId, OpenMode.ForWrite) as LayerTable;
473
-
474
-                                                    //设置首曲线为当期激活图层
475
-                                                    foreach (ObjectId id in layertable)
476
-                                                    {
477
-                                                        LayerTableRecord lyrtbrec = tran.GetObject(id, OpenMode.ForWrite) as LayerTableRecord;
478
-                                                        if (lyrtbrec.Name == sqxlayer)
479
-                                                            db.Clayer = id;
480
-                                                    }
481
-                                                    foreach (ObjectId oidtempt in sstempt.GetObjectIds())
482
-                                                    {
483
-                                                        Entity entempt = tran.GetObject(oidtempt, OpenMode.ForWrite) as Entity;
484
-
485
-                                                        //if (ele1 > ele2)
486
-                                                        //{
487
-                                                        //    double tempt = 0;
488
-                                                        //    tempt = ele1;
489
-                                                        //    ele1 = ele2;
490
-                                                        //    ele2 = tempt;
491
-                                                        //}
492
-
493
-                                                        if (entempt is Polyline)
494
-                                                        {
495
-                                                            Polyline pltempt = entempt as Polyline;
496
-                                                            if (Convert.ToDouble(pltempt.Elevation.ToString("f1")) > ele1 && Convert.ToDouble(pltempt.Elevation.ToString("f1")) < ele2)
497
-                                                            {
498
-                                                                //裁剪节点集
499
-                                                                Point3dCollection pt3dcolltempt = new Point3dCollection();
500
-                                                                //裁剪节点集
501
-                                                                Point3dCollection pt3dcolltempt2 = new Point3dCollection();
502
-
503
-
504
-                                                                //裁剪节点
505
-                                                                Point3d pt3dtt1 = pltempt.GetClosestPointTo(pt1cjnode, false);
506
-                                                                Point3d pt3dtt2 = pltempt.GetClosestPointTo(pt3cjnode, false);
507
-
508
-                                                                //将线端点以外的点添加进裁剪接节点
509
-                                                                if (pt3dtt1 != new Point3d())
510
-                                                                {
511
-                                                                    if (pt3dtt1 != pltempt.StartPoint && pt3dtt1 != pltempt.EndPoint)
512
-                                                                        pt3dcolltempt.Add(pt3dtt1);
513
-                                                                }
514
-                                                                if (pt3dtt2 != new Point3d())
515
-                                                                {
516
-                                                                    if (pt3dtt2 != pltempt.StartPoint && pt3dtt2 != pltempt.EndPoint)
517
-                                                                        pt3dcolltempt.Add(pt3dtt2);
518
-                                                                }
519
-                                                                stttr += pltempt.StartPoint.X + "," + pltempt.StartPoint.Y + "," + pltempt.StartPoint.Z + "!" + pltempt.EndPoint.X + ","
520
-                                                                    + pltempt.EndPoint.Y + "," + pltempt.EndPoint.Z + "\r\n";
521
-                                                                stttr += pt3dtt1.X + "@" + pt3dtt1.Y + "@" + pt3dtt1.Z + "!" + pt3dtt2.X + "@" + pt3dtt2.Y + "@" + pt3dtt2.Z + "\r\n";
522
-                                                                if (pt3dcolltempt.Count > 0)
523
-                                                                {
524
-                                                                    for (int ch = 0; ch < pt3dcolltempt.Count; ch++)
525
-                                                                    {
526
-                                                                        pt3dcolltempt2.Add(pt3dcolltempt[pt3dcolltempt.Count - 1 - ch]);
527
-                                                                    }
528
-
529
-
530
-                                                                    DBObjectCollection dbojcoll = null;
531
-                                                                    DBObjectCollection dbojcoll2 = null;
532
-                                                                    try
533
-                                                                    {
534
-                                                                        dbojcoll = pltempt.GetSplitCurves(pt3dcolltempt);
535
-                                                                    }
536
-                                                                    catch { }
537
-                                                                    try
538
-                                                                    {
539
-                                                                        dbojcoll2 = pltempt.GetSplitCurves(pt3dcolltempt2);
540
-                                                                    }
541
-                                                                    catch { }
542
-
543
-                                                                    if (dbojcoll2.Count > dbojcoll.Count)
544
-                                                                        dbojcoll = dbojcoll2;
545
-                                                                    //if (dbojcoll.Count >0)
546
-                                                                    if (dbojcoll.Count < 1)
547
-                                                                        continue;
548
-                                                                    //{
549
-                                                                    if (pltempt.Closed)//如果该线闭合
550
-                                                                    {
551
-                                                                        foreach (DBObject enen in dbojcoll)
552
-                                                                        {
553
-                                                                            Polyline plcjh = enen as Polyline;
554
-                                                                            Point3dCollection ptcolltempt3d = new Point3dCollection();
555
-                                                                            plcjh.GetStretchPoints(ptcolltempt3d);
556
-                                                                            Point3d ptptpt = ptcolltempt3d[(int)(ptcolltempt3d.Count / 2)];
557
-                                                                            //Point3d ptptpt = ptcolltempt3d[1];
558
-                                                                            Point2d ptinen1 = new Point2d();
559
-                                                                            Point2d ptinen2 = new Point2d();
560
-                                                                            //double llen = 9999;
561
-                                                                            if (en1 is Polyline)
562
-                                                                            {
563
-                                                                                Polyline plen1 = en1 as Polyline;
564
-                                                                                Point3d mypt = plen1.GetClosestPointTo(ptptpt, false);
565
-                                                                                ptinen1 = new Point2d(mypt.X, mypt.Y);
566
-
567
-                                                                                //llen = plen1.GetClosestPointTo(ptptpt, false).DistanceTo(ptptpt);
568
-                                                                            }
569
-                                                                            else if (en1 is Polyline2d)
570
-                                                                            {
571
-                                                                                Polyline2d pl2den1 = en1 as Polyline2d;
572
-
573
-                                                                                Point3d mypt = pl2den1.GetClosestPointTo(ptptpt, false);
574
-                                                                                ptinen1 = new Point2d(mypt.X, mypt.Y);
575
-                                                                                //llen = pl2den1.GetClosestPointTo(ptptpt, false).DistanceTo(ptptpt);
576
-                                                                            }
577
-                                                                            if (en2 is Polyline)
578
-                                                                            {
579
-                                                                                Polyline plen2 = en2 as Polyline;
580
-                                                                                Point3d mypt = plen2.GetClosestPointTo(ptptpt, false);
581
-                                                                                ptinen2 = new Point2d(mypt.X, mypt.Y);
582
-                                                                            }
583
-                                                                            else if (en2 is Polyline2d)
584
-                                                                            {
585
-                                                                                Polyline2d pl2den2 = en2 as Polyline2d;
586
-
587
-                                                                                Point3d mypt = pl2den2.GetClosestPointTo(ptptpt, false);
588
-                                                                                ptinen2 = new Point2d(mypt.X, mypt.Y);
589
-                                                                            }
590
-                                                                            double llen = 9999;
591
-                                                                            if ((ptinen1 != new Point2d()) && (ptinen2 != new Point2d()))
592
-                                                                            {
593
-                                                                                llen = ptinen1.GetDistanceTo(ptinen2);
594
-                                                                            }
595
-                                                                            if (llen < scalelen)
596
-                                                                            {
597
-                                                                                cdentity.Add(plcjh);
598
-                                                                            }
599
-                                                                            else
600
-                                                                            {
601
-                                                                                acblr.AppendEntity(plcjh);
602
-                                                                                plcjh.Layer = sqxlayer;
603
-                                                                                tran.AddNewlyCreatedDBObject(plcjh, true);
604
-                                                                            }
605
-                                                                        }
606
-                                                                    }
607
-                                                                    else
608
-                                                                    {
609
-                                                                        foreach (DBObject enen in dbojcoll)
610
-                                                                        {
611
-
612
-                                                                            Polyline plcjh = enen as Polyline;
613
-                                                                            Point2d startpoint = new Point2d(plcjh.StartPoint.X, plcjh.StartPoint.Y);
614
-                                                                            Point2d endpoint = new Point2d(plcjh.EndPoint.X, plcjh.EndPoint.Y);
615
-
616
-                                                                            double linelength = startpoint.GetDistanceTo(endpoint);
617
-
618
-                                                                            if (linelength > 1.5 * mapscale)
619
-                                                                            {
620
-                                                                                //if ((plcjh.GetClosestPointTo(pt3dtt1, false) == pt3dtt1) && (plcjh.GetClosestPointTo(pt3dtt2, false) == pt3dtt2))
621
-                                                                                if ((pt3dtt1 == plcjh.StartPoint || pt3dtt1 == plcjh.EndPoint) && (pt3dtt2 == plcjh.StartPoint || pt3dtt2 == plcjh.EndPoint))
622
-                                                                                {
623
-                                                                                    cdentity.Add(plcjh);
624
-                                                                                }
625
-                                                                                else
626
-                                                                                {
627
-                                                                                    acblr.AppendEntity(plcjh);
628
-                                                                                    plcjh.Layer = sqxlayer;
629
-                                                                                    tran.AddNewlyCreatedDBObject(plcjh, true);
630
-                                                                                }
631
-                                                                            }
632
-                                                                            else
633
-                                                                                cdentity.Add(plcjh);
634
-                                                                        }
635
-                                                                    }
636
-                                                                    //}
637
-                                                                    entempt.Erase(true);
638
-                                                                    //tran.Commit();
639
-                                                                }
640
-
641
-                                                            }
642
-                                                        }
643
-                                                        else if (entempt is Polyline2d)
644
-                                                        {
645
-                                                            ////裁剪二维多段线代码
646
-                                                            
647
-                                                            Polyline2d pl2dtempt = entempt as Polyline2d;
648
-                                                            if (Convert.ToDouble(pl2dtempt.Elevation.ToString("f1")) > ele1 && Convert.ToDouble(pl2dtempt.Elevation.ToString("f1")) < ele2)
649
-                                                            {
650
-                                                                Point3dCollection pt3dcolltempt = new Point3dCollection();
651
-                                                                Point3d pt3dtt1 = pl2dtempt.GetClosestPointTo(pt1cjnode, false);
652
-                                                                Point3d pt3dtt2 = pl2dtempt.GetClosestPointTo(pt3cjnode, false);
653
-
654
-                                                                //将线端点以外的点添加进裁剪接节点
655
-                                                                if (pt3dtt1 != new Point3d())
656
-                                                                {
657
-                                                                    if (pt3dtt1 != pl2dtempt.StartPoint && pt3dtt1 != pl2dtempt.EndPoint)
658
-                                                                        pt3dcolltempt.Add(pt3dtt1);
659
-                                                                }
660
-                                                                if (pt3dtt2 != new Point3d())
661
-                                                                {
662
-                                                                    if (pt3dtt2 != pl2dtempt.StartPoint && pt3dtt2 != pl2dtempt.EndPoint)
663
-                                                                        pt3dcolltempt.Add(pt3dtt2);
664
-                                                                }
665
-                                                                if (pt3dcolltempt.Count > 0)
666
-                                                                {
667
-                                                                    Polyline pltempt = new Polyline();                                                                   
668
-                                                                    Point3dCollection pt3dpl2dcoll = new Point3dCollection();
669
-                                                                    pl2dtempt.GetStretchPoints(pt3dpl2dcoll);
670
-                                                                    //foreach (Point3d pt in pt3dpl2dcoll)
671
-                                                                    //{
672
-                                                                    //    pltempt.AddVertexAt(0,pt,0,0,0);
673
-                                                                    //}
674
-
675
-                                                                    DBObjectCollection dbojcoll = pl2dtempt.GetSplitCurves(pt3dcolltempt);
676
-                                                                    if (dbojcoll.Count>0)
677
-                                                                    {
678
-                                                                    foreach (DBObject enen in dbojcoll)
679
-                                                                    {
680
-                                                                        Polyline2d pl2dcjh = enen as Polyline2d;
681
-
682
-                                                                        Point2d startpoint = new Point2d(pl2dcjh.StartPoint.X, pl2dcjh.StartPoint.Y);
683
-                                                                        Point2d endpoint = new Point2d(pl2dcjh.EndPoint.X, pl2dcjh.EndPoint.Y);
684
-
685
-                                                                        double linelength = startpoint.GetDistanceTo(endpoint);
686
-
687
-                                                                        if (linelength > 1.5 * mapscale)
688
-                                                                        {
689
-
690
-                                                                            if ((pl2dcjh.GetClosestPointTo(pt3dtt1, false) == pt3dtt1) && (pl2dcjh.GetClosestPointTo(pt3dtt2, false) == pt3dtt2))
691
-                                                                            if ((pt3dtt1 == pl2dcjh.StartPoint || pt3dtt1 == pl2dcjh.EndPoint) && (pt3dtt2 == pl2dcjh.StartPoint || pt3dtt2 == pl2dcjh.EndPoint))
692
-                                                                            {
693
-                                                                                cdentity.Add(pl2dcjh);
694
-                                                                            }
695
-                                                                            else
696
-                                                                            {
697
-                                                                                acblr.AppendEntity(pl2dcjh);
698
-                                                                                pl2dcjh.Layer = sqxlayer;
699
-                                                                                tran.AddNewlyCreatedDBObject(pl2dcjh, true);
700
-                                                                            }
701
-                                                                        }
702
-                                                                        else
703
-                                                                            cdentity.Add(pl2dcjh);
704
-                                                                    }
705
-
706
-                                                                    } 
707
-                                                                    entempt.Erase(true);
708
-                                                                    tran.Commit();
709
-                                                                }
710
-                                                            }
711
-
712
-                                                  
713
-                                                        }
714
-
715
-                                                        #region//画裁剪线
716
-                                                        //Polyline3d cjxpl = new Polyline3d(Poly3dType.SimplePoly, rectcj, false);
717
-                                                        //if (!layertable.Has("CJX"))
718
-                                                        //{
719
-                                                        //    LayerTableRecord ltr = new LayerTableRecord();
720
-                                                        //    ltr.Name = "CJX";
721
-                                                        //    ObjectId layerid = layertable.Add(ltr);
722
-                                                        //    tran.AddNewlyCreatedDBObject(ltr, true);
723
-                                                        //    //db.Clayer = layerid;
724
-                                                        //}
725
-
726
-                                                        //cjxpl.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.Blue);
727
-                                                        //acblr.AppendEntity(cjxpl);
728
-                                                        //cjxpl.Layer = "CJX";
729
-                                                        //tran.AddNewlyCreatedDBObject(cjxpl, true);
730
-                                                        ////doc.Editor.WriteMessage("");
731
-                                                        #endregion
732
-
733
-                                                    }
734
-
735
-                                                    tran.Commit();
736
-                                                    tran.Dispose();
737
-                                                }
738
-                                                #endregion
739
-                                            }
740
-
741
-                                        }
742
-
743
-                                    }
744
-                                    cjcoll.Clear();
745
-                                    cjcoll = new Point3dCollection();
746
-                                }
747
-
748
-                                flag = false;
749
-                                continue;
750
-                            }//end if
751
-                            else
752
-                            {
753
-                                continue;
754
-                            }
755
-                        }
756
-                    }
757
-                }
758
-            }
759
-            else
760
-                return;      
761
-       #endregion
762
-       #region
763
-            ///画裁剪掉的线
764
-            if (cdentity.Count > 0)
765
-            {
766
-                using (Transaction tran = doc.TransactionManager.StartTransaction())
767
-                {
768
-
769
-                    //// 以只读方式打开块表记录   Open the Block table record for read
770
-                    BlockTable acbt = tran.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
771
-                    //// 以写方式打开模型空间块表记录   Open the Block table record Model space for write
772
-                    BlockTableRecord acblr = tran.GetObject(acbt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
773
-
774
-                    //设置激活图层
775
-                    layertable = tran.GetObject(db.LayerTableId, OpenMode.ForWrite) as LayerTable;
776
-                    if (!layertable.Has("CJSQX"))
777
-                    {
778
-                        LayerTableRecord ltr = new LayerTableRecord();
779
-                        ltr.Name = "CJSQX";
780
-                        ObjectId layerid = layertable.Add(ltr);
781
-                        tran.AddNewlyCreatedDBObject(ltr, true);
782
-                        db.Clayer = layerid;
783
-                    }
784
-                    else
785
-                    {
786
-                        foreach (ObjectId id in layertable)
787
-                        {
788
-                            LayerTableRecord lyrtbrec = tran.GetObject(id, OpenMode.ForWrite) as LayerTableRecord;
789
-                            if (lyrtbrec.Name == "CJSQX")
790
-                                db.Clayer = id;
791
-                        }
792
-                    }
793
-
794
-                    foreach (Entity enenen in cdentity)
795
-                    {
796
-                        enenen.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.Red);
797
-                        acblr.AppendEntity(enenen);
798
-                        enenen.Layer = "CJSQX";
799
-                        tran.AddNewlyCreatedDBObject(enenen, true);
800
-                    }
801
-
802
-                    doc.Editor.WriteMessage("已完成裁剪\r\n裁剪掉的等高线都放在CJSQX图层中\r\n");
803
-
804
-                    tran.Commit();
805
-                    tran.Dispose();
806
-                }
807
-            }
808
-            #endregion
809
-            documentlock.Dispose();
810
-            doc.Editor.WriteMessage("程序运行结束");          
811
-        }
812
-        public static int CompareDGXByElevation(Entity en1, Entity en2)
813
-        {
814
-            double ele1 = 0, ele2 = 0;
815
-            //because just Polyline and Polyline2d two class in plentitycollection
816
-            if (en1 is Polyline)
817
-            {
818
-                Polyline pl = en1 as Polyline;
819
-                ele1 = Convert.ToDouble(pl.Elevation.ToString("f1"));
820
-            }
821
-            else
822
-            {
823
-                Polyline2d pl2d = en1 as Polyline2d;
824
-                ele1 = Convert.ToDouble(pl2d.Elevation.ToString("f1"));
825
-            }
826
-
827
-            if (en2 is Polyline)
828
-            {
829
-                Polyline pl = en2 as Polyline;
830
-                ele2 = Convert.ToDouble(pl.Elevation.ToString("f1"));
831
-            }
832
-            else
833
-            {
834
-                Polyline2d pl2d = en2 as Polyline2d;
835
-                ele2 = Convert.ToDouble(pl2d.Elevation.ToString("f1"));
836
-            }
837
-
838
-            return (int)(ele1 - ele2);
839
-
840
-        }
841
-        public static Point3d GetClosestPoint(Point3d pt, Entity enpl)
842
-        {
843
-            if (enpl is Polyline)
844
-            {
845
-                Polyline pl = enpl as Polyline;
846
-                return pl.GetClosestPointTo(pt, true);
847
-            }
848
-            else
849
-            {
850
-                Polyline2d pl2d = enpl as Polyline2d;
851
-                return pl2d.GetClosestPointTo(pt, true);
852
-            }
853
-        }
854
-       #endregion
855
-    }
856
-}

+ 0
- 244
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutCountL.Designer.cs 查看文件

@@ -1,244 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class CutCountL
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CutCountL));
33
-            this.label17 = new System.Windows.Forms.Label();
34
-            this.richTextBox2 = new System.Windows.Forms.RichTextBox();
35
-            this.dgxCJ_gcc_te = new System.Windows.Forms.TextBox();
36
-            this.dgxCJ_gcc_la = new System.Windows.Forms.Label();
37
-            this.dgxCJ_hlcd_te = new System.Windows.Forms.TextBox();
38
-            this.dgxCJ_hlcd_la = new System.Windows.Forms.Label();
39
-            this.dgxCJ_cjjl_te = new System.Windows.Forms.TextBox();
40
-            this.dgxCJ_cjjl_la = new System.Windows.Forms.Label();
41
-            this.dgxCJ_jqx_co = new System.Windows.Forms.ComboBox();
42
-            this.dgxCJ_jqx_la = new System.Windows.Forms.Label();
43
-            this.dgxCJ_sqx_co = new System.Windows.Forms.ComboBox();
44
-            this.dgxCJ_sqx_la = new System.Windows.Forms.Label();
45
-            this.dgxCJ_blc_co = new System.Windows.Forms.ComboBox();
46
-            this.dgxCJ_blc_la = new System.Windows.Forms.Label();
47
-            this.Cancel = new System.Windows.Forms.Button();
48
-            this.OK = new System.Windows.Forms.Button();
49
-            this.SuspendLayout();
50
-            // 
51
-            // label17
52
-            // 
53
-            this.label17.AutoSize = true;
54
-            this.label17.Location = new System.Drawing.Point(319, 20);
55
-            this.label17.Name = "label17";
56
-            this.label17.Size = new System.Drawing.Size(52, 15);
57
-            this.label17.TabIndex = 27;
58
-            this.label17.Text = "说明:";
59
-            // 
60
-            // richTextBox2
61
-            // 
62
-            this.richTextBox2.Location = new System.Drawing.Point(322, 44);
63
-            this.richTextBox2.Name = "richTextBox2";
64
-            this.richTextBox2.Size = new System.Drawing.Size(430, 319);
65
-            this.richTextBox2.TabIndex = 26;
66
-            this.richTextBox2.Text = resources.GetString("richTextBox2.Text");
67
-            // 
68
-            // dgxCJ_gcc_te
69
-            // 
70
-            this.dgxCJ_gcc_te.Location = new System.Drawing.Point(174, 313);
71
-            this.dgxCJ_gcc_te.Name = "dgxCJ_gcc_te";
72
-            this.dgxCJ_gcc_te.Size = new System.Drawing.Size(121, 25);
73
-            this.dgxCJ_gcc_te.TabIndex = 25;
74
-            // 
75
-            // dgxCJ_gcc_la
76
-            // 
77
-            this.dgxCJ_gcc_la.AutoSize = true;
78
-            this.dgxCJ_gcc_la.Location = new System.Drawing.Point(48, 285);
79
-            this.dgxCJ_gcc_la.Name = "dgxCJ_gcc_la";
80
-            this.dgxCJ_gcc_la.Size = new System.Drawing.Size(142, 15);
81
-            this.dgxCJ_gcc_la.TabIndex = 24;
82
-            this.dgxCJ_gcc_la.Text = "两计曲线间高程差:";
83
-            // 
84
-            // dgxCJ_hlcd_te
85
-            // 
86
-            this.dgxCJ_hlcd_te.Location = new System.Drawing.Point(174, 244);
87
-            this.dgxCJ_hlcd_te.Name = "dgxCJ_hlcd_te";
88
-            this.dgxCJ_hlcd_te.Size = new System.Drawing.Size(121, 25);
89
-            this.dgxCJ_hlcd_te.TabIndex = 23;
90
-            // 
91
-            // dgxCJ_hlcd_la
92
-            // 
93
-            this.dgxCJ_hlcd_la.AutoSize = true;
94
-            this.dgxCJ_hlcd_la.Location = new System.Drawing.Point(48, 217);
95
-            this.dgxCJ_hlcd_la.Name = "dgxCJ_hlcd_la";
96
-            this.dgxCJ_hlcd_la.Size = new System.Drawing.Size(180, 15);
97
-            this.dgxCJ_hlcd_la.TabIndex = 22;
98
-            this.dgxCJ_hlcd_la.Text = "可忽略的裁剪长度(m):";
99
-            // 
100
-            // dgxCJ_cjjl_te
101
-            // 
102
-            this.dgxCJ_cjjl_te.Location = new System.Drawing.Point(174, 176);
103
-            this.dgxCJ_cjjl_te.Name = "dgxCJ_cjjl_te";
104
-            this.dgxCJ_cjjl_te.Size = new System.Drawing.Size(121, 25);
105
-            this.dgxCJ_cjjl_te.TabIndex = 21;
106
-            // 
107
-            // dgxCJ_cjjl_la
108
-            // 
109
-            this.dgxCJ_cjjl_la.AutoSize = true;
110
-            this.dgxCJ_cjjl_la.Location = new System.Drawing.Point(48, 179);
111
-            this.dgxCJ_cjjl_la.Name = "dgxCJ_cjjl_la";
112
-            this.dgxCJ_cjjl_la.Size = new System.Drawing.Size(120, 15);
113
-            this.dgxCJ_cjjl_la.TabIndex = 20;
114
-            this.dgxCJ_cjjl_la.Text = "裁剪距离(m):";
115
-            // 
116
-            // dgxCJ_jqx_co
117
-            // 
118
-            this.dgxCJ_jqx_co.FormattingEnabled = true;
119
-            this.dgxCJ_jqx_co.Location = new System.Drawing.Point(174, 136);
120
-            this.dgxCJ_jqx_co.Name = "dgxCJ_jqx_co";
121
-            this.dgxCJ_jqx_co.Size = new System.Drawing.Size(121, 23);
122
-            this.dgxCJ_jqx_co.TabIndex = 19;
123
-            // 
124
-            // dgxCJ_jqx_la
125
-            // 
126
-            this.dgxCJ_jqx_la.AutoSize = true;
127
-            this.dgxCJ_jqx_la.Location = new System.Drawing.Point(48, 139);
128
-            this.dgxCJ_jqx_la.Name = "dgxCJ_jqx_la";
129
-            this.dgxCJ_jqx_la.Size = new System.Drawing.Size(97, 15);
130
-            this.dgxCJ_jqx_la.TabIndex = 18;
131
-            this.dgxCJ_jqx_la.Text = "计曲线图层:";
132
-            // 
133
-            // dgxCJ_sqx_co
134
-            // 
135
-            this.dgxCJ_sqx_co.FormattingEnabled = true;
136
-            this.dgxCJ_sqx_co.Location = new System.Drawing.Point(174, 93);
137
-            this.dgxCJ_sqx_co.Name = "dgxCJ_sqx_co";
138
-            this.dgxCJ_sqx_co.Size = new System.Drawing.Size(121, 23);
139
-            this.dgxCJ_sqx_co.TabIndex = 17;
140
-            // 
141
-            // dgxCJ_sqx_la
142
-            // 
143
-            this.dgxCJ_sqx_la.AutoSize = true;
144
-            this.dgxCJ_sqx_la.Location = new System.Drawing.Point(48, 97);
145
-            this.dgxCJ_sqx_la.Name = "dgxCJ_sqx_la";
146
-            this.dgxCJ_sqx_la.Size = new System.Drawing.Size(97, 15);
147
-            this.dgxCJ_sqx_la.TabIndex = 16;
148
-            this.dgxCJ_sqx_la.Text = "首曲线图层:";
149
-            // 
150
-            // dgxCJ_blc_co
151
-            // 
152
-            this.dgxCJ_blc_co.FormattingEnabled = true;
153
-            this.dgxCJ_blc_co.Items.AddRange(new object[] {
154
-            "1:200",
155
-            "1:500",
156
-            "1:1000",
157
-            "1:2000",
158
-            "1:5000",
159
-            "1:10000"});
160
-            this.dgxCJ_blc_co.Location = new System.Drawing.Point(174, 51);
161
-            this.dgxCJ_blc_co.Name = "dgxCJ_blc_co";
162
-            this.dgxCJ_blc_co.Size = new System.Drawing.Size(121, 23);
163
-            this.dgxCJ_blc_co.TabIndex = 15;
164
-            // 
165
-            // dgxCJ_blc_la
166
-            // 
167
-            this.dgxCJ_blc_la.AutoSize = true;
168
-            this.dgxCJ_blc_la.Location = new System.Drawing.Point(48, 54);
169
-            this.dgxCJ_blc_la.Name = "dgxCJ_blc_la";
170
-            this.dgxCJ_blc_la.Size = new System.Drawing.Size(90, 15);
171
-            this.dgxCJ_blc_la.TabIndex = 14;
172
-            this.dgxCJ_blc_la.Text = "地图比例尺:";
173
-            // 
174
-            // Cancel
175
-            // 
176
-            this.Cancel.Location = new System.Drawing.Point(506, 391);
177
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
178
-            this.Cancel.Name = "Cancel";
179
-            this.Cancel.Size = new System.Drawing.Size(100, 29);
180
-            this.Cancel.TabIndex = 34;
181
-            this.Cancel.Text = "取 消";
182
-            this.Cancel.UseVisualStyleBackColor = true;
183
-            this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
184
-            // 
185
-            // OK
186
-            // 
187
-            this.OK.Location = new System.Drawing.Point(196, 391);
188
-            this.OK.Margin = new System.Windows.Forms.Padding(4);
189
-            this.OK.Name = "OK";
190
-            this.OK.Size = new System.Drawing.Size(100, 29);
191
-            this.OK.TabIndex = 33;
192
-            this.OK.Text = "确 定";
193
-            this.OK.UseVisualStyleBackColor = true;
194
-            this.OK.Click += new System.EventHandler(this.OK_Click);
195
-            // 
196
-            // CutCountL
197
-            // 
198
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
199
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
200
-            this.ClientSize = new System.Drawing.Size(800, 442);
201
-            this.Controls.Add(this.Cancel);
202
-            this.Controls.Add(this.OK);
203
-            this.Controls.Add(this.label17);
204
-            this.Controls.Add(this.richTextBox2);
205
-            this.Controls.Add(this.dgxCJ_gcc_te);
206
-            this.Controls.Add(this.dgxCJ_gcc_la);
207
-            this.Controls.Add(this.dgxCJ_hlcd_te);
208
-            this.Controls.Add(this.dgxCJ_hlcd_la);
209
-            this.Controls.Add(this.dgxCJ_cjjl_te);
210
-            this.Controls.Add(this.dgxCJ_cjjl_la);
211
-            this.Controls.Add(this.dgxCJ_jqx_co);
212
-            this.Controls.Add(this.dgxCJ_jqx_la);
213
-            this.Controls.Add(this.dgxCJ_sqx_co);
214
-            this.Controls.Add(this.dgxCJ_sqx_la);
215
-            this.Controls.Add(this.dgxCJ_blc_co);
216
-            this.Controls.Add(this.dgxCJ_blc_la);
217
-            this.Name = "CutCountL";
218
-            this.Text = "等高线裁剪";
219
-            this.Load += new System.EventHandler(this.CutCountL_Load);
220
-            this.ResumeLayout(false);
221
-            this.PerformLayout();
222
-
223
-        }
224
-
225
-        #endregion
226
-
227
-        private System.Windows.Forms.Label label17;
228
-        private System.Windows.Forms.RichTextBox richTextBox2;
229
-        private System.Windows.Forms.TextBox dgxCJ_gcc_te;
230
-        private System.Windows.Forms.Label dgxCJ_gcc_la;
231
-        private System.Windows.Forms.TextBox dgxCJ_hlcd_te;
232
-        private System.Windows.Forms.Label dgxCJ_hlcd_la;
233
-        private System.Windows.Forms.TextBox dgxCJ_cjjl_te;
234
-        private System.Windows.Forms.Label dgxCJ_cjjl_la;
235
-        private System.Windows.Forms.ComboBox dgxCJ_jqx_co;
236
-        private System.Windows.Forms.Label dgxCJ_jqx_la;
237
-        private System.Windows.Forms.ComboBox dgxCJ_sqx_co;
238
-        private System.Windows.Forms.Label dgxCJ_sqx_la;
239
-        private System.Windows.Forms.ComboBox dgxCJ_blc_co;
240
-        private System.Windows.Forms.Label dgxCJ_blc_la;
241
-        private System.Windows.Forms.Button Cancel;
242
-        private System.Windows.Forms.Button OK;
243
-    }
244
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutCountL.cs 查看文件

@@ -1,120 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.ComponentModel;
5
-using System.Data;
6
-using System.Drawing;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    public partial class CutCountL : Form
15
-    {
16
-        public CutCountL()
17
-        {
18
-            InitializeComponent();
19
-        }
20
-
21
-        private void CutCountL_Load(object sender, EventArgs e)
22
-        {
23
-            this.dgxCJ_blc_co.DropDownStyle = ComboBoxStyle.DropDownList;
24
-            this.dgxCJ_jqx_co.DropDownStyle = ComboBoxStyle.DropDownList;
25
-            this.dgxCJ_sqx_co.DropDownStyle = ComboBoxStyle.DropDownList;
26
-
27
-            //自动填充下拉框
28
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
29
-            using (Transaction traction = database.TransactionManager.StartTransaction())
30
-            {
31
-                //存放所有图层名
32
-                List<string> alllayername = new List<string>();
33
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
34
-                foreach (ObjectId objid in layertable)
35
-                {
36
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
37
-                    alllayername.Add(layertablerecord.Name);
38
-                }
39
-
40
-                alllayername.Sort();
41
-
42
-                for (int i = 0; i < alllayername.Count; i++)
43
-                {
44
-                    this.dgxCJ_jqx_co.Items.Add(alllayername[i]);
45
-                    this.dgxCJ_sqx_co.Items.Add(alllayername[i]);
46
-                }
47
-
48
-                if (alllayername.Contains("8300"))
49
-                {
50
-                    int index = alllayername.IndexOf("8300");
51
-                }
52
-                if (alllayername.Contains("8110"))
53
-                {
54
-                    int index = alllayername.IndexOf("8110");
55
-                    this.dgxCJ_sqx_co.SelectedIndex = index;
56
-                }
57
-                if (alllayername.Contains("8120"))
58
-                {
59
-                    int index = alllayername.IndexOf("8120");
60
-                    this.dgxCJ_jqx_co.SelectedIndex = index;
61
-                }
62
-                traction.Commit();
63
-            }
64
-
65
-        }
66
-
67
-        private void OK_Click(object sender, EventArgs e)
68
-        {
69
-            if (dgxCJ_blc_co.Text == "")
70
-            {
71
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
72
-                return;
73
-            }
74
-            if (dgxCJ_sqx_co.Text == "")
75
-            {
76
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择首曲线图层");
77
-                return;
78
-            }
79
-            if (dgxCJ_jqx_co.Text == "")
80
-            {
81
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择计曲线图层");
82
-                return;
83
-            }
84
-            if (dgxCJ_gcc_te.Text == "")
85
-            {
86
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入计曲线高程差");
87
-                return;
88
-            }
89
-            if (dgxCJ_hlcd_te.Text == "")
90
-            {
91
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入可忽略的裁剪长度");
92
-                return;
93
-            }
94
-            if (dgxCJ_cjjl_te.Text == "")
95
-            {
96
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入裁剪距离");
97
-                return;
98
-            }
99
-            CutContourLine.sqxlayer = dgxCJ_sqx_co.Text;
100
-            CutContourLine.jqxlayer = dgxCJ_jqx_co.Text;
101
-            CutContourLine.eledvalue = double.Parse(dgxCJ_gcc_te.Text);
102
-            CutContourLine.lenIgnore = double.Parse(dgxCJ_hlcd_te.Text);
103
-            CutContourLine.scalelen = double.Parse(dgxCJ_cjjl_te.Text);
104
-            //比例尺
105
-            string blctext = dgxCJ_blc_co.Text;
106
-            int blcindex = blctext.LastIndexOf(':');
107
-            string strblc = blctext.Substring(blcindex + 1);
108
-            CutContourLine.mapscale = Convert.ToInt32(strblc);
109
-
110
-            this.Close();
111
-            CutContourLine chfeature = new CutContourLine();
112
-            chfeature.ccls();
113
-        }
114
-
115
-        private void Cancel_Click(object sender, EventArgs e)
116
-        {
117
-            this.Close();
118
-        }
119
-    }
120
-}

+ 0
- 143
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CutCountL.resx 查看文件

@@ -1,143 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-  <data name="richTextBox2.Text" xml:space="preserve">
121
-    <value>根据规范要求,地形图中计曲线间距小于2mm,首曲线可以不表示。
122
-
123
-各种比例尺地形图不用表示首曲线的计曲线间距为:
124
-1:500  	1m
125
-1:1000 	2m
126
-1:2000 	4m
127
-1:5000 	10m
128
-1:10000	15m
129
-该裁减距离只是参考,按成图需求,可自行设置不用表示首曲线的计曲线间距。
130
-
131
-可忽略裁剪长度是另一个是否表示首曲线的参数,当满足规范间距不用表示的首曲线长度太短,小于规范长度时,不予处理。
132
-其中1:1000的可忽略裁剪长度为1m,其他比例尺的地形图以1:1000为基准变化,也可以按出图需求,自行设定。
133
-
134
-根据规范要求,不同比例尺地形图计曲线间高程差为固定值。
135
-各种比例尺计曲线间高程差为:
136
-1:500  	2.5m
137
-1:1000 	5m
138
-1:2000 	10m
139
-1:5000 	50m
140
-1:10000	100m
141
-该参数只是参考,具体计曲线间高程差,根据其地形图来确定。</value>
142
-  </data>
143
-</root>

+ 0
- 131
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneral.Designer.cs 查看文件

@@ -1,131 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class DGXGeneral
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.checkedListBox_dgxtc = new System.Windows.Forms.CheckedListBox();
33
-            this.label1 = new System.Windows.Forms.Label();
34
-            this.label2 = new System.Windows.Forms.Label();
35
-            this.comboBox_dgj = new System.Windows.Forms.ComboBox();
36
-            this.butn_ok = new System.Windows.Forms.Button();
37
-            this.butn_cancel = new System.Windows.Forms.Button();
38
-            this.SuspendLayout();
39
-            // 
40
-            // checkedListBox_dgxtc
41
-            // 
42
-            this.checkedListBox_dgxtc.FormattingEnabled = true;
43
-            this.checkedListBox_dgxtc.Location = new System.Drawing.Point(44, 102);
44
-            this.checkedListBox_dgxtc.Name = "checkedListBox_dgxtc";
45
-            this.checkedListBox_dgxtc.Size = new System.Drawing.Size(235, 264);
46
-            this.checkedListBox_dgxtc.TabIndex = 0;
47
-            // 
48
-            // label1
49
-            // 
50
-            this.label1.AutoSize = true;
51
-            this.label1.Location = new System.Drawing.Point(25, 35);
52
-            this.label1.Name = "label1";
53
-            this.label1.Size = new System.Drawing.Size(112, 15);
54
-            this.label1.TabIndex = 1;
55
-            this.label1.Text = "转换后等高距:";
56
-            // 
57
-            // label2
58
-            // 
59
-            this.label2.AutoSize = true;
60
-            this.label2.Location = new System.Drawing.Point(25, 75);
61
-            this.label2.Name = "label2";
62
-            this.label2.Size = new System.Drawing.Size(127, 15);
63
-            this.label2.TabIndex = 2;
64
-            this.label2.Text = "选择等高线图层:";
65
-            // 
66
-            // comboBox_dgj
67
-            // 
68
-            this.comboBox_dgj.FormattingEnabled = true;
69
-            this.comboBox_dgj.Items.AddRange(new object[] {
70
-            "0.5",
71
-            "1",
72
-            "2",
73
-            "2.5",
74
-            "5",
75
-            "10",
76
-            "20",
77
-            "40",
78
-            "50"});
79
-            this.comboBox_dgj.Location = new System.Drawing.Point(134, 32);
80
-            this.comboBox_dgj.Name = "comboBox_dgj";
81
-            this.comboBox_dgj.Size = new System.Drawing.Size(155, 23);
82
-            this.comboBox_dgj.TabIndex = 3;
83
-            // 
84
-            // butn_ok
85
-            // 
86
-            this.butn_ok.Location = new System.Drawing.Point(28, 389);
87
-            this.butn_ok.Name = "butn_ok";
88
-            this.butn_ok.Size = new System.Drawing.Size(75, 23);
89
-            this.butn_ok.TabIndex = 4;
90
-            this.butn_ok.Text = "确 定";
91
-            this.butn_ok.UseVisualStyleBackColor = true;
92
-            this.butn_ok.Click += new System.EventHandler(this.butn_ok_Click);
93
-            // 
94
-            // butn_cancel
95
-            // 
96
-            this.butn_cancel.Location = new System.Drawing.Point(214, 389);
97
-            this.butn_cancel.Name = "butn_cancel";
98
-            this.butn_cancel.Size = new System.Drawing.Size(75, 23);
99
-            this.butn_cancel.TabIndex = 5;
100
-            this.butn_cancel.Text = "取 消";
101
-            this.butn_cancel.UseVisualStyleBackColor = true;
102
-            // 
103
-            // DGXGeneral
104
-            // 
105
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
106
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
107
-            this.ClientSize = new System.Drawing.Size(338, 424);
108
-            this.Controls.Add(this.butn_cancel);
109
-            this.Controls.Add(this.butn_ok);
110
-            this.Controls.Add(this.comboBox_dgj);
111
-            this.Controls.Add(this.label2);
112
-            this.Controls.Add(this.label1);
113
-            this.Controls.Add(this.checkedListBox_dgxtc);
114
-            this.Name = "DGXGeneral";
115
-            this.Text = "等高线缩编";
116
-            this.Load += new System.EventHandler(this.DGXGeneral_Load);
117
-            this.ResumeLayout(false);
118
-            this.PerformLayout();
119
-
120
-        }
121
-
122
-        #endregion
123
-
124
-        private System.Windows.Forms.CheckedListBox checkedListBox_dgxtc;
125
-        private System.Windows.Forms.Label label1;
126
-        private System.Windows.Forms.Label label2;
127
-        private System.Windows.Forms.ComboBox comboBox_dgj;
128
-        private System.Windows.Forms.Button butn_ok;
129
-        private System.Windows.Forms.Button butn_cancel;
130
-    }
131
-}

+ 0
- 76
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneral.cs 查看文件

@@ -1,76 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections;
4
-using System.Collections.Generic;
5
-using System.ComponentModel;
6
-using System.Data;
7
-using System.Drawing;
8
-using System.Linq;
9
-using System.Text;
10
-using System.Threading.Tasks;
11
-using System.Windows.Forms;
12
-
13
-namespace HCTools
14
-{
15
-    public partial class DGXGeneral : Form
16
-    {
17
-        public DGXGeneral()
18
-        {
19
-            InitializeComponent();
20
-        }
21
-
22
-        private void DGXGeneral_Load(object sender, EventArgs e)
23
-        {
24
-            this.comboBox_dgj.DropDownStyle = ComboBoxStyle.DropDownList;
25
-
26
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
27
-            using (Transaction traction = database.TransactionManager.StartTransaction())
28
-            {
29
-                //存放所有图层名
30
-                List<string> alllayername = new List<string>();
31
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
32
-                foreach (ObjectId objid in layertable)
33
-                {
34
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
35
-                    alllayername.Add(layertablerecord.Name);
36
-                }
37
-
38
-                alllayername.Sort();
39
-
40
-                for (int i = 0; i < alllayername.Count; i++)
41
-                {
42
-                    this.checkedListBox_dgxtc.Items.Add(alllayername[i]);
43
-                }
44
-                traction.Commit();
45
-            }
46
-        }
47
-
48
-        private void butn_ok_Click(object sender, EventArgs e)
49
-        {
50
-            ArrayList eplayerlist = new ArrayList();
51
-            if (checkedListBox_dgxtc.CheckedItems.Count > 0)
52
-            {
53
-                int count = checkedListBox_dgxtc.CheckedItems.Count;
54
-                for (int i = 0; i < count; i++)
55
-                {
56
-                    eplayerlist.Add(checkedListBox_dgxtc.CheckedItems[i].ToString());
57
-                }
58
-            }
59
-            else
60
-            {
61
-                MessageBox.Show("请选择处理等高线图层!", "警告");
62
-                return;
63
-            }
64
-            if (comboBox_dgj.Text == "")
65
-            {
66
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择等高距");
67
-                return;
68
-            }
69
-
70
-            DGXGeneralization.dgxlayerlist = eplayerlist;
71
-            DGXGeneralization.dgj = double.Parse(comboBox_dgj.Text);
72
-            DGXGeneralization.dgxGeneralization();
73
-            this.Close();
74
-        }
75
-    }
76
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneral.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 193
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DGXGeneralization.cs 查看文件

@@ -1,193 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using System;
5
-using System.Collections;
6
-using System.Collections.Generic;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    class DGXGeneralization
15
-    {
16
-        public static ArrayList dgxlayerlist;
17
-        public static double dgj;
18
-        public static bool openflag = true;
19
-        public static void dgxGeneralization()
20
-        {
21
-            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
22
-            Database db = doc.Database;
23
-            DocumentLock docLock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
24
-            //try
25
-            //{
26
-                //LayerTable lt = null;
27
-                //ArrayList layerlist = new ArrayList();
28
-
29
-                ////获取图层事务
30
-                //using (Transaction tran = doc.TransactionManager.StartTransaction())
31
-                //{
32
-                //    lt = tran.GetObject(db.LayerTableId, OpenMode.ForRead) as LayerTable;
33
-                //    foreach (ObjectId layerid in lt)
34
-                //    {
35
-                //        LayerTableRecord ltrec = tran.GetObject(layerid, OpenMode.ForWrite) as LayerTableRecord;
36
-                //        layerlist.Add(ltrec.Name);
37
-                //    }
38
-                //    doc.Editor.WriteMessage("程序开始运行\r\n......\r\n");
39
-                //    tran.Commit();
40
-                //    tran.Dispose();
41
-
42
-                //}
43
-                
44
-
45
-
46
-                //DGXSBForm sf = new DGXSBForm(layerlist);
47
-                //if (sf.ShowDialog() == DialogResult.OK)
48
-                //{
49
-                //    dgxlayerlist = sf.DGXlayerlist;
50
-                //    dgj = sf.DGJ;
51
-                //    openflag = true;
52
-                //}
53
-                if (openflag)
54
-                {
55
-                    string dgx1 = string.Empty, dgx2 = string.Empty;
56
-                    if (dgxlayerlist.Count > 0)
57
-                    {
58
-                        if (dgxlayerlist.Count == 1)
59
-                        {
60
-                            dgx1 = dgxlayerlist[0].ToString();
61
-                        }
62
-                        if (dgxlayerlist.Count == 2)
63
-                        {
64
-                            dgx1 = dgxlayerlist[0].ToString();
65
-                            dgx2 = dgxlayerlist[1].ToString();
66
-                        }
67
-                    }
68
-
69
-                    using (Transaction tran = doc.TransactionManager.StartTransaction())
70
-                    {
71
-                        
72
-                        //// 以只读方式打开块表记录   Open the Block table record for read
73
-                        BlockTable acbt = tran.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
74
-                        //// 以写方式打开模型空间块表记录   Open the Block table record Model space for write
75
-                        BlockTableRecord acblr = tran.GetObject(acbt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
76
-
77
-                        //设置激活图层
78
-                        LayerTable layertable = tran.GetObject(db.LayerTableId, OpenMode.ForWrite) as LayerTable;
79
-                        if (!layertable.Has("Delete"))
80
-                        {
81
-                            LayerTableRecord ltr = new LayerTableRecord();
82
-                            ltr.Name = "Delete";
83
-                            ObjectId layerid = layertable.Add(ltr);
84
-                            tran.AddNewlyCreatedDBObject(ltr, true);
85
-                            //db.Clayer = layerid;
86
-                        }
87
-                        if (!layertable.Has("8120"))
88
-                        {
89
-                            LayerTableRecord ltr = new LayerTableRecord();
90
-                            ltr.Name = "8120";
91
-                            ObjectId layerid = layertable.Add(ltr);
92
-                            tran.AddNewlyCreatedDBObject(ltr, true);
93
-                            //db.Clayer = layerid;
94
-                        }
95
-                        if (!layertable.Has("8110"))
96
-                        {
97
-                            LayerTableRecord ltr = new LayerTableRecord();
98
-                            ltr.Name = "8110";
99
-                            ObjectId layerid = layertable.Add(ltr);
100
-                            tran.AddNewlyCreatedDBObject(ltr, true);
101
-                            //db.Clayer = layerid;
102
-                        }
103
-                        tran.Commit();
104
-                        tran.Dispose();
105
-                        
106
-                    }
107
-                    PromptSelectionResult psr = doc.Editor.SelectAll();
108
-                    //doc.Editor.WriteMessage("请选择等高线!");
109
-                    //PromptSelectionResult psr = doc.Editor.GetSelection();
110
-                    if (psr.Status == PromptStatus.OK)
111
-                    {
112
-                        
113
-                        SelectionSet ss = psr.Value;
114
-                        foreach (ObjectId oid in ss.GetObjectIds())
115
-                        {
116
-                            using (Transaction tran = doc.TransactionManager.StartTransaction())
117
-                            {
118
-                                BlockTable acbt = tran.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
119
-                                BlockTableRecord acbtr = tran.GetObject(acbt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
120
-
121
-                                Entity en = tran.GetObject(oid, OpenMode.ForWrite) as Entity;
122
-
123
-                                if ((en.Layer == dgx1) || (en.Layer == dgx2))
124
-                                {
125
-                                    Polyline pl = new Polyline();
126
-                                    Polyline2d pl2d = new Polyline2d();
127
-                                    double elevation = 99999999;
128
-                                    if (en is Polyline)
129
-                                    {
130
-                                        pl = en as Polyline;
131
-                                        elevation = pl.Elevation;
132
-                                    }
133
-                                    else if (en is Polyline2d)
134
-                                    {
135
-                                        pl2d = en as Polyline2d;
136
-                                        elevation = pl2d.Elevation;
137
-                                    }
138
-                                    if (elevation != 99999999)
139
-                                    {
140
-                                        elevation = Convert.ToDouble(elevation.ToString("f1"));
141
-                                        if (dgj != 0)
142
-                                        {
143
-                                            double remainder = elevation % dgj;
144
-                                            if (remainder != 0.0)
145
-                                            {
146
-                                                en.Layer = "Delete";
147
-                                                en.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.Red);
148
-                                            }
149
-                                            else
150
-                                            {
151
-                                                double remainder2 = elevation % (dgj * 5);
152
-                                                if (remainder2 == 0.0)
153
-                                                {
154
-                                                    en.Layer = "8120";
155
-                                                    en.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.Yellow);
156
-                                                }
157
-                                                else
158
-                                                {
159
-                                                    en.Layer = "8110";
160
-                                                    en.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.White);
161
-                                                }
162
-                                            }
163
-                                        }
164
-
165
-                                    }
166
-
167
-                                }
168
-                                else
169
-                                    continue;
170
-                                //                            
171
-                                tran.Commit();
172
-                                tran.Dispose();
173
-                            }
174
-                        }
175
-                        doc.Editor.WriteMessage("程序运行结束,谢谢使用");
176
-                        
177
-                    }
178
-
179
-
180
-                }
181
-                else
182
-                {
183
-                    doc.Editor.WriteMessage("请选择相关参数\r\n");
184
-                }
185
-            //}
186
-            //catch (GrxCAD.Runtime.Exception ex)
187
-            //{
188
-            //    doc.Editor.WriteMessage(ex.ToString());
189
-            //}
190
-                docLock.Dispose();
191
-        }
192
-    }
193
-}

+ 0
- 150
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeleteElept.Designer.cs 查看文件

@@ -1,150 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class DeleteElept
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label1 = new System.Windows.Forms.Label();
33
-            this.comboBox_gcd = new System.Windows.Forms.ComboBox();
34
-            this.label2 = new System.Windows.Forms.Label();
35
-            this.checkedListBox_ly = new System.Windows.Forms.CheckedListBox();
36
-            this.button_ok = new System.Windows.Forms.Button();
37
-            this.button_cancel = new System.Windows.Forms.Button();
38
-            this.label3 = new System.Windows.Forms.Label();
39
-            this.comboBox_blc = new System.Windows.Forms.ComboBox();
40
-            this.SuspendLayout();
41
-            // 
42
-            // label1
43
-            // 
44
-            this.label1.AutoSize = true;
45
-            this.label1.Location = new System.Drawing.Point(54, 28);
46
-            this.label1.Name = "label1";
47
-            this.label1.Size = new System.Drawing.Size(127, 15);
48
-            this.label1.TabIndex = 0;
49
-            this.label1.Text = "高程点所在图层:";
50
-            // 
51
-            // comboBox_gcd
52
-            // 
53
-            this.comboBox_gcd.FormattingEnabled = true;
54
-            this.comboBox_gcd.Location = new System.Drawing.Point(180, 25);
55
-            this.comboBox_gcd.Name = "comboBox_gcd";
56
-            this.comboBox_gcd.Size = new System.Drawing.Size(222, 23);
57
-            this.comboBox_gcd.TabIndex = 1;
58
-            // 
59
-            // label2
60
-            // 
61
-            this.label2.AutoSize = true;
62
-            this.label2.Location = new System.Drawing.Point(16, 111);
63
-            this.label2.Name = "label2";
64
-            this.label2.Size = new System.Drawing.Size(202, 15);
65
-            this.label2.TabIndex = 2;
66
-            this.label2.Text = "需要删除内部高程点的图层:";
67
-            // 
68
-            // checkedListBox_ly
69
-            // 
70
-            this.checkedListBox_ly.FormattingEnabled = true;
71
-            this.checkedListBox_ly.Location = new System.Drawing.Point(91, 140);
72
-            this.checkedListBox_ly.Name = "checkedListBox_ly";
73
-            this.checkedListBox_ly.Size = new System.Drawing.Size(379, 184);
74
-            this.checkedListBox_ly.TabIndex = 3;
75
-            // 
76
-            // button_ok
77
-            // 
78
-            this.button_ok.Location = new System.Drawing.Point(133, 345);
79
-            this.button_ok.Name = "button_ok";
80
-            this.button_ok.Size = new System.Drawing.Size(75, 31);
81
-            this.button_ok.TabIndex = 4;
82
-            this.button_ok.Text = "确 定";
83
-            this.button_ok.UseVisualStyleBackColor = true;
84
-            this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
85
-            // 
86
-            // button_cancel
87
-            // 
88
-            this.button_cancel.Location = new System.Drawing.Point(355, 345);
89
-            this.button_cancel.Name = "button_cancel";
90
-            this.button_cancel.Size = new System.Drawing.Size(75, 31);
91
-            this.button_cancel.TabIndex = 5;
92
-            this.button_cancel.Text = "取 消";
93
-            this.button_cancel.UseVisualStyleBackColor = true;
94
-            this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click);
95
-            // 
96
-            // label3
97
-            // 
98
-            this.label3.AutoSize = true;
99
-            this.label3.Location = new System.Drawing.Point(114, 66);
100
-            this.label3.Name = "label3";
101
-            this.label3.Size = new System.Drawing.Size(67, 15);
102
-            this.label3.TabIndex = 6;
103
-            this.label3.Text = "比例尺:";
104
-            // 
105
-            // comboBox_blc
106
-            // 
107
-            this.comboBox_blc.FormattingEnabled = true;
108
-            this.comboBox_blc.Items.AddRange(new object[] {
109
-            "1:500",
110
-            "1:1000",
111
-            "1:2000",
112
-            "1:5000"});
113
-            this.comboBox_blc.Location = new System.Drawing.Point(180, 63);
114
-            this.comboBox_blc.Name = "comboBox_blc";
115
-            this.comboBox_blc.Size = new System.Drawing.Size(222, 23);
116
-            this.comboBox_blc.TabIndex = 7;
117
-            // 
118
-            // DeleteElept
119
-            // 
120
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
121
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
122
-            this.ClientSize = new System.Drawing.Size(535, 388);
123
-            this.Controls.Add(this.comboBox_blc);
124
-            this.Controls.Add(this.label3);
125
-            this.Controls.Add(this.button_cancel);
126
-            this.Controls.Add(this.button_ok);
127
-            this.Controls.Add(this.checkedListBox_ly);
128
-            this.Controls.Add(this.label2);
129
-            this.Controls.Add(this.comboBox_gcd);
130
-            this.Controls.Add(this.label1);
131
-            this.Name = "DeleteElept";
132
-            this.Text = "删除内部高程点";
133
-            this.Load += new System.EventHandler(this.DeleteElept_Load);
134
-            this.ResumeLayout(false);
135
-            this.PerformLayout();
136
-
137
-        }
138
-
139
-        #endregion
140
-
141
-        private System.Windows.Forms.Label label1;
142
-        private System.Windows.Forms.ComboBox comboBox_gcd;
143
-        private System.Windows.Forms.Label label2;
144
-        private System.Windows.Forms.CheckedListBox checkedListBox_ly;
145
-        private System.Windows.Forms.Button button_ok;
146
-        private System.Windows.Forms.Button button_cancel;
147
-        private System.Windows.Forms.Label label3;
148
-        private System.Windows.Forms.ComboBox comboBox_blc;
149
-    }
150
-}

+ 0
- 93
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeleteElept.cs 查看文件

@@ -1,93 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.ComponentModel;
5
-using System.Data;
6
-using System.Drawing;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    public partial class DeleteElept : Form
15
-    {
16
-        public DeleteElept()
17
-        {
18
-            InitializeComponent();
19
-        }
20
-
21
-        private void DeleteElept_Load(object sender, EventArgs e)
22
-        {
23
-            this.comboBox_gcd.DropDownStyle = ComboBoxStyle.DropDownList;
24
-            this.comboBox_blc.DropDownStyle = ComboBoxStyle.DropDownList;
25
-
26
-            //自动填充下拉框
27
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
28
-            using (Transaction traction = database.TransactionManager.StartTransaction())
29
-            {
30
-                //存放所有图层名
31
-                List<string> alllayername = new List<string>();
32
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
33
-                foreach (ObjectId objid in layertable)
34
-                {
35
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
36
-                    alllayername.Add(layertablerecord.Name);
37
-                }
38
-
39
-                alllayername.Sort();
40
-
41
-                for (int i = 0; i < alllayername.Count; i++)
42
-                {
43
-                    this.comboBox_gcd.Items.Add(alllayername[i]);
44
-                    this.checkedListBox_ly.Items.Add(alllayername[i]);
45
-                }
46
-
47
-                if (alllayername.Contains("8300"))
48
-                {
49
-                    int index = alllayername.IndexOf("8300");
50
-                    this.comboBox_gcd.SelectedIndex = index;
51
-                }
52
-                traction.Commit();
53
-            }
54
-        }
55
-
56
-        private void button_ok_Click(object sender, EventArgs e)
57
-        {
58
-            if (comboBox_gcd.Text == "")
59
-            { 
60
-                MessageBox.Show("请选择高程点所在图层!");
61
-                return;
62
-            }
63
-            if (comboBox_blc.Text == "")
64
-            { 
65
-                MessageBox.Show("请选择比例尺!");
66
-                return;
67
-            }
68
-            if (checkedListBox_ly.CheckedItems.Count == 0)
69
-            {
70
-                MessageBox.Show("请至少选择一个图层!");
71
-                return;
72
-            }
73
-            DeletePts.gcdly = comboBox_gcd.Text;
74
-            string blctext = comboBox_blc.Text;
75
-            int blcindex = blctext.LastIndexOf(':');
76
-            string strblc = blctext.Substring(blcindex + 1);
77
-            DeletePts.blc = Convert.ToInt32(strblc);
78
-
79
-            for (int i = 0; i < checkedListBox_ly.CheckedItems.Count; i++)
80
-            {
81
-                DeletePts.delely.Add(checkedListBox_ly.CheckedItems[i].ToString());
82
-            }
83
-            DeletePts delept = new DeletePts();
84
-            delept.delept();
85
-            this.Close();
86
-        }
87
-
88
-        private void button_cancel_Click(object sender, EventArgs e)
89
-        {
90
-            this.Close();
91
-        }
92
-    }
93
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeleteElept.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 149
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DeletePts.cs 查看文件

@@ -1,149 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using GrxCAD.Geometry;
5
-using System;
6
-using System.Collections.Generic;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-
11
-namespace HCTools
12
-{
13
-    class DeletePts
14
-    {
15
-        public static string gcdly;//高程点所在图层
16
-        public static List<string> delely = new List<string>();//需要删除的图层
17
-        public static int blc;//比例尺
18
-        public double radius;//半径
19
-
20
-        public void delept()
21
-        {
22
-            List<ObjectId> deleids = new List<ObjectId>();
23
-            if (blc == 500)
24
-            {
25
-                radius = 1.5;
26
-            }
27
-            else if (blc == 1000)
28
-            {
29
-                radius = 2.5;
30
-            }
31
-            else if (blc == 2000)
32
-            {
33
-                radius = 4;
34
-            }
35
-            else if (blc == 5000)
36
-            {
37
-                radius = 10.5;
38
-            }
39
-            //创建新图层
40
-            LayerControl layerscontrol = new LayerControl();
41
-            string layname = "已删除";
42
-            if (!layerscontrol.haslayername(layname))
43
-            {
44
-                colorgb col = new colorgb(255, 0, 255);
45
-                layerscontrol.creatlayer(layname, col);
46
-                layerscontrol.movelayertofront(layname);
47
-            }
48
-            else
49
-                layerscontrol.movelayertofront(layname);
50
-
51
-
52
-            for (int i = 0; i < delely.Count; i++)
53
-            {
54
-                List<ObjectId> temp = Idget(delely[i]);
55
-                for (int j = 0; j < temp.Count; j++)
56
-                {
57
-                    deleids.Add(temp[j]);
58
-                }
59
-            }
60
-            Database db = HostApplicationServices.WorkingDatabase;
61
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
62
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
63
-
64
-            TypedValue[] typedvalue = new TypedValue[]
65
-            {
66
-                new TypedValue((int)DxfCode.LayerName, gcdly),
67
-                new TypedValue((int)DxfCode.Start, "Insert")
68
-            };
69
-            SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
70
-
71
-            for (int i = 0; i < deleids.Count; i++)
72
-            {
73
-                using (Transaction trans = db.TransactionManager.StartTransaction())
74
-                {
75
-                    Entity ent = (Entity)trans.GetObject(deleids[i], OpenMode.ForWrite);
76
-                    if (ent is Polyline)
77
-                    {
78
-                        Polyline pll = (Polyline)trans.GetObject(deleids[i], OpenMode.ForWrite);
79
-                        Point3dCollection ptcoll = new Point3dCollection();
80
-                        for (int j = 0; j < pll.NumberOfVertices; j++)
81
-                        {
82
-                            ptcoll.Add(pll.GetPoint3dAt(j));
83
-                        }
84
-                        PromptSelectionResult psr = editor.SelectCrossingPolygon(ptcoll, selectionfilter);
85
-
86
-                        if (psr.Status == PromptStatus.OK)
87
-                        {
88
-                            SelectionSet selectionset = psr.Value;
89
-                            ObjectId[] ids = selectionset.GetObjectIds();
90
-                            for (int j = 0; j < ids.Count(); j++)
91
-                            {
92
-                                BlockReference br = (BlockReference)trans.GetObject(ids[j], OpenMode.ForWrite);
93
-                                br.Layer = "已删除";
94
-                                Point3d p1 = new Point3d(br.Position.X - radius, br.Position.Y - radius, 0);
95
-                                Point3d p2 = new Point3d(br.Position.X + radius, br.Position.Y + radius, 0);
96
-
97
-                                TypedValue[] tpvl = new TypedValue[]
98
-                                {
99
-                                    new TypedValue((int)DxfCode.Start, "Text"),
100
-                                    new TypedValue((int)DxfCode.LayerName, gcdly)
101
-                                };
102
-
103
-                                SelectionFilter filter = new SelectionFilter(tpvl);
104
-                                PromptSelectionResult prosr = editor.SelectCrossingWindow(p1, p2, filter);
105
-
106
-                                if (prosr.Status == PromptStatus.OK)
107
-                                {
108
-                                    SelectionSet seleset = prosr.Value;
109
-                                    ObjectId[] selid = seleset.GetObjectIds();
110
-                                    for (int ii = 0; ii < selid.Count(); ii++)
111
-                                    {
112
-                                        DBText text = trans.GetObject(selid[ii], OpenMode.ForWrite) as DBText;
113
-                                        text.Layer = "已删除";
114
-                                    }
115
-                                }
116
-                            }
117
-                        }
118
-                        trans.Commit();
119
-                    }
120
-                }
121
-            }
122
-            editor.WriteMessage("删除完成\n");
123
-            doclock.Dispose();
124
-        }
125
-
126
-        private static List<ObjectId> Idget(string ly)
127
-        {
128
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
129
-            TypedValue[] typedvalue = new TypedValue[1];
130
-            typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, ly), 0);
131
-
132
-            SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
133
-            PromptSelectionResult psr = editor.SelectAll(selectionfilter);
134
-            SelectionSet selectionset = psr.Value;
135
-            ObjectId[] obj = new ObjectId[selectionset.Count];
136
-            List<ObjectId> ids = new List<ObjectId>();
137
-
138
-            if (psr.Status == PromptStatus.OK)
139
-            {
140
-                obj = selectionset.GetObjectIds();
141
-                for (int i = 0; i < obj.Length; i++)
142
-                {
143
-                    ids.Add(obj[i]);
144
-                }
145
-            }
146
-            return ids;
147
-        }
148
-    }
149
-}

+ 0
- 153
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnnck.cs 查看文件

@@ -1,153 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using GrxCAD.Geometry;
5
-using System;
6
-using System.Collections.Generic;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-
11
-namespace HCTools
12
-{
13
-    class DgxAnnck
14
-    {
15
-        public static string ptlayer;
16
-        public static string tklayer;
17
-        public static double density;
18
-        public static int flag;
19
-
20
-        public void check()
21
-        {
22
-            ObjectId[] ids = TKget();
23
-
24
-            Database db = HostApplicationServices.WorkingDatabase;
25
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
26
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
27
-
28
-            TypedValue[] typedvalue = new TypedValue[1];
29
-            typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, ptlayer), 0);
30
-            SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
31
-
32
-            for (int i = 0; i < ids.Length; i++)
33
-            {
34
-                Entity current_entity = BasicFunction.GetDBObject(ids[i]);
35
-                ZoomToExtent(current_entity.GeometricExtents);
36
-                using (Transaction trans = db.TransactionManager.StartTransaction())
37
-                {
38
-                    Polyline pll = (Polyline)trans.GetObject(ids[i], OpenMode.ForWrite);
39
-                    Point3dCollection ptcoll = new Point3dCollection();
40
-                    for (int j = 0; j < pll.NumberOfVertices; j++)
41
-                    {
42
-                        ptcoll.Add(pll.GetPoint3dAt(j));
43
-                    }
44
-                    PromptSelectionResult psr = editor.SelectCrossingPolygon(ptcoll, selectionfilter);
45
-
46
-                    if (psr.Status == PromptStatus.OK)
47
-                    {
48
-                        SelectionSet selectionset = psr.Value;
49
-                        int ptnums = selectionset.Count;
50
-                        double den = ptnums / pll.Area;
51
-                        if (den < density && flag == 1)
52
-                        {
53
-                            LayerControl layerscontrol = new LayerControl();
54
-                            string layname = "小于密度";
55
-                            if (!layerscontrol.haslayername(layname))
56
-                            {
57
-                                colorgb col = new colorgb(0, 0, 255);
58
-                                layerscontrol.creatlayer(layname, col);
59
-                                pll.Layer = "小于密度";
60
-                            }
61
-                            else
62
-                                pll.Layer = "小于密度";
63
-                        }
64
-                        else if (den > density && flag == 2)
65
-                        {
66
-                            LayerControl layerscontrol = new LayerControl();
67
-                            string layname = "大于密度";
68
-                            if (!layerscontrol.haslayername(layname))
69
-                            {
70
-                                colorgb col = new colorgb(255, 0, 0);
71
-                                layerscontrol.creatlayer(layname, col);
72
-                                pll.Layer = "大于密度";
73
-                            }
74
-                            else
75
-                                pll.Layer = "大于密度";
76
-                        }
77
-                        else if (flag == 3)
78
-                        {
79
-                            if (den < density || den > density)
80
-                            {
81
-                                LayerControl layerscontrol = new LayerControl();
82
-                                string layname = "不等于密度";
83
-                                if (!layerscontrol.haslayername(layname))
84
-                                {
85
-                                    colorgb col = new colorgb(255, 255, 0);
86
-                                    layerscontrol.creatlayer(layname, col);
87
-                                    pll.Layer = "不等于密度";
88
-                                }
89
-                                else
90
-                                    pll.Layer = "不等于密度";
91
-                            }
92
-                        }
93
-                    }
94
-                    trans.Commit();
95
-                }
96
-            }
97
-            doclock.Dispose();
98
-        }
99
-
100
-        private static ObjectId[] TKget()
101
-        {
102
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
103
-            TypedValue[] typedvalue = new TypedValue[1];
104
-            typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, tklayer), 0);
105
-
106
-            SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
107
-            PromptSelectionResult psr = editor.SelectAll(selectionfilter);
108
-            SelectionSet selectionset = psr.Value;
109
-            ObjectId[] obj = new ObjectId[selectionset.Count];
110
-
111
-            if (psr.Status == PromptStatus.OK)
112
-            {
113
-                obj = selectionset.GetObjectIds();
114
-            }
115
-            return obj;
116
-        }
117
-
118
-        public static void ZoomToExtent(Extents3d extent)
119
-        {
120
-            try
121
-            {
122
-                Point3d pMin = extent.MinPoint;
123
-                Point3d pMax = extent.MaxPoint;
124
-                //获取当前文档及数据库
125
-                Document acDoc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
126
-                Database acCurDb = acDoc.Database;
127
-
128
-                // 启动事务
129
-                using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
130
-                {
131
-                    using (ViewTableRecord acView = acDoc.Editor.GetCurrentView())
132
-                    {
133
-                        //设置视图的高
134
-                        acView.Height = Math.Abs(pMin.Y - pMax.Y);
135
-                        //设置视图的宽
136
-                        acView.Width = Math.Abs(pMin.X - pMax.X);
137
-                        // 设置视图中心
138
-                        acView.CenterPoint = new Point2d((pMin.X + pMax.X) / 2, (pMin.Y + pMax.Y) / 2);
139
-                        // 更新当前视图
140
-                        acDoc.Editor.SetCurrentView(acView);
141
-                    }
142
-                    // 提交更改
143
-                    acTrans.Commit();
144
-                }
145
-            }
146
-            catch (Exception)
147
-            {
148
-
149
-                throw;
150
-            }
151
-        }
152
-    }
153
-}

+ 0
- 170
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnno.Designer.cs 查看文件

@@ -1,170 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class DgxAnno
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.checkBox_below = new System.Windows.Forms.CheckBox();
33
-            this.checkBox_upon = new System.Windows.Forms.CheckBox();
34
-            this.textBox_density = new System.Windows.Forms.TextBox();
35
-            this.label3 = new System.Windows.Forms.Label();
36
-            this.button_cancel = new System.Windows.Forms.Button();
37
-            this.button_ok = new System.Windows.Forms.Button();
38
-            this.comboBox_gw = new System.Windows.Forms.ComboBox();
39
-            this.comboBox_ptLayer = new System.Windows.Forms.ComboBox();
40
-            this.label2 = new System.Windows.Forms.Label();
41
-            this.label1 = new System.Windows.Forms.Label();
42
-            this.SuspendLayout();
43
-            // 
44
-            // checkBox_below
45
-            // 
46
-            this.checkBox_below.AutoSize = true;
47
-            this.checkBox_below.Location = new System.Drawing.Point(236, 135);
48
-            this.checkBox_below.Name = "checkBox_below";
49
-            this.checkBox_below.Size = new System.Drawing.Size(89, 19);
50
-            this.checkBox_below.TabIndex = 21;
51
-            this.checkBox_below.Text = "小于密度";
52
-            this.checkBox_below.UseVisualStyleBackColor = true;
53
-            // 
54
-            // checkBox_upon
55
-            // 
56
-            this.checkBox_upon.AutoSize = true;
57
-            this.checkBox_upon.Location = new System.Drawing.Point(346, 135);
58
-            this.checkBox_upon.Name = "checkBox_upon";
59
-            this.checkBox_upon.Size = new System.Drawing.Size(89, 19);
60
-            this.checkBox_upon.TabIndex = 20;
61
-            this.checkBox_upon.Text = "大于密度";
62
-            this.checkBox_upon.UseVisualStyleBackColor = true;
63
-            // 
64
-            // textBox_density
65
-            // 
66
-            this.textBox_density.Location = new System.Drawing.Point(104, 133);
67
-            this.textBox_density.Name = "textBox_density";
68
-            this.textBox_density.Size = new System.Drawing.Size(100, 25);
69
-            this.textBox_density.TabIndex = 19;
70
-            // 
71
-            // label3
72
-            // 
73
-            this.label3.AutoSize = true;
74
-            this.label3.Location = new System.Drawing.Point(46, 139);
75
-            this.label3.Name = "label3";
76
-            this.label3.Size = new System.Drawing.Size(52, 15);
77
-            this.label3.TabIndex = 18;
78
-            this.label3.Text = "密度:";
79
-            // 
80
-            // button_cancel
81
-            // 
82
-            this.button_cancel.Location = new System.Drawing.Point(290, 178);
83
-            this.button_cancel.Name = "button_cancel";
84
-            this.button_cancel.Size = new System.Drawing.Size(75, 29);
85
-            this.button_cancel.TabIndex = 17;
86
-            this.button_cancel.Text = "取 消";
87
-            this.button_cancel.UseVisualStyleBackColor = true;
88
-            this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click);
89
-            // 
90
-            // button_ok
91
-            // 
92
-            this.button_ok.Location = new System.Drawing.Point(100, 178);
93
-            this.button_ok.Name = "button_ok";
94
-            this.button_ok.Size = new System.Drawing.Size(75, 29);
95
-            this.button_ok.TabIndex = 16;
96
-            this.button_ok.Text = "确 定";
97
-            this.button_ok.UseVisualStyleBackColor = true;
98
-            this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
99
-            // 
100
-            // comboBox_gw
101
-            // 
102
-            this.comboBox_gw.FormattingEnabled = true;
103
-            this.comboBox_gw.Location = new System.Drawing.Point(185, 83);
104
-            this.comboBox_gw.Name = "comboBox_gw";
105
-            this.comboBox_gw.Size = new System.Drawing.Size(197, 23);
106
-            this.comboBox_gw.TabIndex = 15;
107
-            // 
108
-            // comboBox_ptLayer
109
-            // 
110
-            this.comboBox_ptLayer.FormattingEnabled = true;
111
-            this.comboBox_ptLayer.Location = new System.Drawing.Point(185, 34);
112
-            this.comboBox_ptLayer.Name = "comboBox_ptLayer";
113
-            this.comboBox_ptLayer.Size = new System.Drawing.Size(197, 23);
114
-            this.comboBox_ptLayer.TabIndex = 14;
115
-            // 
116
-            // label2
117
-            // 
118
-            this.label2.AutoSize = true;
119
-            this.label2.Location = new System.Drawing.Point(67, 86);
120
-            this.label2.Name = "label2";
121
-            this.label2.Size = new System.Drawing.Size(112, 15);
122
-            this.label2.TabIndex = 13;
123
-            this.label2.Text = "格网所在图层:";
124
-            // 
125
-            // label1
126
-            // 
127
-            this.label1.AutoSize = true;
128
-            this.label1.Location = new System.Drawing.Point(22, 37);
129
-            this.label1.Name = "label1";
130
-            this.label1.Size = new System.Drawing.Size(157, 15);
131
-            this.label1.TabIndex = 12;
132
-            this.label1.Text = "等高线注记所在图层:";
133
-            // 
134
-            // DgxAnno
135
-            // 
136
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
137
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
138
-            this.ClientSize = new System.Drawing.Size(478, 232);
139
-            this.Controls.Add(this.checkBox_below);
140
-            this.Controls.Add(this.checkBox_upon);
141
-            this.Controls.Add(this.textBox_density);
142
-            this.Controls.Add(this.label3);
143
-            this.Controls.Add(this.button_cancel);
144
-            this.Controls.Add(this.button_ok);
145
-            this.Controls.Add(this.comboBox_gw);
146
-            this.Controls.Add(this.comboBox_ptLayer);
147
-            this.Controls.Add(this.label2);
148
-            this.Controls.Add(this.label1);
149
-            this.Name = "DgxAnno";
150
-            this.Text = "等高线高程注记密度检查";
151
-            this.Load += new System.EventHandler(this.DgxAnno_Load);
152
-            this.ResumeLayout(false);
153
-            this.PerformLayout();
154
-
155
-        }
156
-
157
-        #endregion
158
-
159
-        private System.Windows.Forms.CheckBox checkBox_below;
160
-        private System.Windows.Forms.CheckBox checkBox_upon;
161
-        private System.Windows.Forms.TextBox textBox_density;
162
-        private System.Windows.Forms.Label label3;
163
-        private System.Windows.Forms.Button button_cancel;
164
-        private System.Windows.Forms.Button button_ok;
165
-        private System.Windows.Forms.ComboBox comboBox_gw;
166
-        private System.Windows.Forms.ComboBox comboBox_ptLayer;
167
-        private System.Windows.Forms.Label label2;
168
-        private System.Windows.Forms.Label label1;
169
-    }
170
-}

+ 0
- 101
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnno.cs 查看文件

@@ -1,101 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.ComponentModel;
5
-using System.Data;
6
-using System.Drawing;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    public partial class DgxAnno : Form
15
-    {
16
-        public DgxAnno()
17
-        {
18
-            InitializeComponent();
19
-        }
20
-
21
-        private void DgxAnno_Load(object sender, EventArgs e)
22
-        {
23
-            this.comboBox_ptLayer.DropDownStyle = ComboBoxStyle.DropDownList;
24
-            this.comboBox_gw.DropDownStyle = ComboBoxStyle.DropDownList;
25
-
26
-            this.MaximizeBox = false;
27
-            this.StartPosition = FormStartPosition.CenterScreen;
28
-
29
-            //自动填充下拉框
30
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
31
-            using (Transaction traction = database.TransactionManager.StartTransaction())
32
-            {
33
-                //存放所有图层名
34
-                List<string> alllayername = new List<string>();
35
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
36
-                foreach (ObjectId objid in layertable)
37
-                {
38
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
39
-                    alllayername.Add(layertablerecord.Name);
40
-                }
41
-
42
-                alllayername.Sort();
43
-
44
-                for (int i = 0; i < alllayername.Count; i++)
45
-                {
46
-                    this.comboBox_ptLayer.Items.Add(alllayername[i]);
47
-                    this.comboBox_gw.Items.Add(alllayername[i]);
48
-                }
49
-
50
-                if (alllayername.Contains("8121"))
51
-                {
52
-                    int index = alllayername.IndexOf("8121");
53
-                    this.comboBox_ptLayer.SelectedIndex = index;
54
-                }
55
-                traction.Commit();
56
-            }
57
-        }
58
-
59
-        private void button_ok_Click(object sender, EventArgs e)
60
-        {
61
-            if (comboBox_ptLayer.Text == "")
62
-            {
63
-                MessageBox.Show("请选择等高线注记所在图层!");
64
-                return;
65
-            }
66
-            if (comboBox_gw.Text == "")
67
-            {
68
-                MessageBox.Show("请选择格网所在图层!");
69
-                return;
70
-            }
71
-            if (textBox_density.Text == "")
72
-            {
73
-                MessageBox.Show("请输入密度!");
74
-                return;
75
-            }
76
-            DgxAnnck.ptlayer = comboBox_ptLayer.Text;
77
-            DgxAnnck.tklayer = comboBox_gw.Text;
78
-            DgxAnnck.density = Convert.ToDouble(textBox_density.Text);
79
-            if (checkBox_below.Checked && !checkBox_upon.Checked)
80
-                DgxAnnck.flag = 1;
81
-            else if (!checkBox_below.Checked && checkBox_upon.Checked)
82
-                DgxAnnck.flag = 2;
83
-            else if (checkBox_below.Checked && checkBox_upon.Checked)
84
-                DgxAnnck.flag = 3;
85
-            else if (!checkBox_below.Checked && !checkBox_upon.Checked)
86
-            {
87
-                MessageBox.Show("请选择“大于密度”/“小于密度”!");
88
-                return;
89
-            }
90
-
91
-            DgxAnnck dgx = new DgxAnnck();
92
-            dgx.check();
93
-            this.Close();
94
-        }
95
-
96
-        private void button_cancel_Click(object sender, EventArgs e)
97
-        {
98
-            this.Close();
99
-        }
100
-    }
101
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/DgxAnno.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 288
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ElePtCheck.cs 查看文件

@@ -1,288 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-using GrxCAD.ApplicationServices;
8
-using GrxCAD.DatabaseServices;
9
-using GrxCAD.EditorInput;
10
-using System.Collections;
11
-using GrxCAD.Geometry;
12
-
13
-namespace HCTools
14
-{
15
-    public struct points
16
-    {
17
-        public Point3d pt;
18
-        public ObjectId objID;
19
-    }
20
-
21
-    class ElePtCheck
22
-    {
23
-        public static int blc;//比例尺
24
-        public static string EleLayerName;//高程点图层名
25
-
26
-        public double radius;//半径
27
-        //public double length;//搜索半径
28
-
29
-        int j = 0;//记录错误点个数
30
-
31
-        //存放所有高程点数组
32
-        public List<points> pointarrlist = new List<points>();
33
-        //存放有问题的高程点数组
34
-        public List<points> errorpointarrlist = new List<points>();
35
-
36
-
37
-
38
-        /// <summary>
39
-        /// 检查错误的高程点并画圆标记
40
-        /// </summary>
41
-        public void pointcheck()
42
-        {
43
-            double flagradius = 4.0 * blc / 1000;//画圆标记半径
44
-
45
-            if (blc == 500)
46
-            {
47
-                radius = 1.5;
48
-            }
49
-            else if (blc == 1000)
50
-            {
51
-                radius = 2.5;
52
-            }
53
-            else if (blc == 2000)
54
-            {
55
-                radius = 4;
56
-            }
57
-            else if (blc == 5000)
58
-            {
59
-                radius = 10.5;
60
-            }
61
-            //外切圆半径
62
-            //length = radius * Math.Pow(2, 0.5);
63
-
64
-
65
-            //检查高程点与注记是否一致或为零
66
-            check();
67
-
68
-            //创建存放错误点的图层
69
-            LayerControl layerscontrol = new LayerControl();
70
-            string layname = "错误高程点";
71
-            if (!layerscontrol.haslayername(layname))
72
-            {
73
-                colorgb col = new colorgb(255, 0, 255);
74
-                layerscontrol.creatlayer(layname, col);
75
-                layerscontrol.movelayertofront(layname);
76
-            }
77
-            else
78
-                layerscontrol.movelayertofront(layname);
79
-
80
-            //创建错误点标记的图层
81
-            LayerControl layerscontrol1 = new LayerControl();
82
-            string layname1 = "错误高程点标记";
83
-            if (!layerscontrol1.haslayername(layname1))
84
-            {
85
-                colorgb col = new colorgb(0, 225, 255);
86
-                layerscontrol1.creatlayer(layname1, col);
87
-                layerscontrol1.movelayertofront(layname1);
88
-            }
89
-            else
90
-                layerscontrol1.movelayertofront(layname1);
91
-
92
-            Database database = HostApplicationServices.WorkingDatabase;
93
-            Document doc = Application.DocumentManager.MdiActiveDocument;
94
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
95
-            using (Transaction traction = database.TransactionManager.StartTransaction())
96
-            {
97
-                DocumentLock documentlock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
98
-                BlockTable blocktable = traction.GetObject(database.BlockTableId,OpenMode.ForWrite) as BlockTable;
99
-                
100
-                for (int i = 0; i < errorpointarrlist.Count; i++)
101
-                {
102
-                    BasicFunction functions = new BasicFunction();
103
-                    BlockReference blr= traction.GetObject(errorpointarrlist[i].objID,OpenMode.ForWrite)as BlockReference;
104
-                    blr.Layer = "错误高程点";
105
-                    functions.makeflag(errorpointarrlist[i].pt.X, errorpointarrlist[i].pt.Y, 0, flagradius, "错误高程点标记");
106
-
107
-                    Point3d p1 = new Point3d(errorpointarrlist[i].pt.X - radius, errorpointarrlist[i].pt.Y - radius, 0);
108
-                    Point3d p2 = new Point3d(errorpointarrlist[i].pt.X + radius, errorpointarrlist[i].pt.Y + radius, 0);
109
-                    TypedValue[] typedvalue = new TypedValue[2];
110
-
111
-                    typedvalue.SetValue(new TypedValue((int)DxfCode.Start, "Text"), 0);
112
-                    typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, EleLayerName), 1);
113
-
114
-                    SelectionFilter filter = new SelectionFilter(typedvalue);
115
-                    PromptSelectionResult psr = editor.SelectCrossingWindow(p1, p2, filter);
116
-
117
-                    if (psr.Status == PromptStatus.OK)
118
-                    {
119
-                        SelectionSet set = psr.Value;
120
-                        ObjectId[] objs = new ObjectId[set.Count];
121
-                        objs = set.GetObjectIds();
122
-                        for (int ii = 0; ii < objs.Length; ii++)
123
-                        {
124
-                            DBText Text = (DBText)traction.GetObject(objs[ii], OpenMode.ForWrite);
125
-                            Text.Layer = "错误高程点";
126
-                        }
127
-                    }
128
-                }
129
-
130
-                traction.Commit();
131
-                documentlock.Dispose();
132
-                traction.Dispose();
133
-            }
134
-
135
-            editor.WriteMessage("\n共有" + j + "处错误");
136
-        }
137
-
138
-        /// <summary>
139
-        /// 检查高程点与注记是否一致或为零
140
-        /// </summary>
141
-        private void check()
142
-        {
143
-            string LayerName = EleLayerName;
144
-            getptInLayer(LayerName);
145
-
146
-            if (pointarrlist == null)
147
-                return;
148
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
149
-            for (int i = 0; i < pointarrlist.Count; i++)
150
-            {
151
-                Point3d pt = pointarrlist[i].pt;
152
-                string getword = GetTxt(pt, LayerName);
153
-                if (pt.Z == 0)
154
-                {
155
-                    errorpointarrlist.Add(pointarrlist[i]);
156
-                    j++;
157
-                }
158
-                else if (!getword.Contains('.') || getword.Contains(".0"))
159
-                {
160
-                    errorpointarrlist.Add(pointarrlist[i]);
161
-                    j++;
162
-                }
163
-                else
164
-                {
165
-                    if (pt.Z.ToString("f1") == getword && pt.Z % (blc / 1000) != 0)
166
-                    {
167
-                        continue;
168
-                    }
169
-                    else
170
-                    {
171
-                        errorpointarrlist.Add(pointarrlist[i]);
172
-                        j++;
173
-                    }
174
-                }
175
-            }
176
-        }
177
-
178
-
179
-        /// <summary>
180
-        /// 获取图层上高程点坐标
181
-        /// </summary>
182
-        private void getptInLayer(string LayerName)
183
-        {
184
-            Document document = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
185
-            Database db = HostApplicationServices.WorkingDatabase;
186
-            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
187
-            
188
-            TypedValue[] value = new TypedValue[]
189
-            {
190
-                new TypedValue((int)DxfCode.LayerName,LayerName),
191
-                new TypedValue((int)DxfCode.Start,"Insert")
192
-            };//设置筛选条件
193
-            SelectionFilter filter = new SelectionFilter(value);
194
-
195
-            //选择区域中全部对象
196
-            //PromptSelectionResult psr = ed.SelectAll(filter);
197
-            // 要求在图形区域中手动选择对象
198
-            PromptSelectionResult psr = ed.GetSelection(filter);
199
-
200
-
201
-            if (psr.Status == PromptStatus.OK)
202
-            {
203
-                using (Transaction transaction = db.TransactionManager.StartTransaction())
204
-                {
205
-                    SelectionSet ss = psr.Value;
206
-                    ObjectId[] ids = ss.GetObjectIds();
207
-
208
-                    points ptlist = new points();
209
-                    foreach (ObjectId etId in ids)
210
-                    {
211
-                        BlockReference blr = transaction.GetObject(etId, OpenMode.ForRead) as BlockReference;
212
-                        ptlist.pt = blr.Position;
213
-                        ptlist.objID = blr.Id;
214
-                        pointarrlist.Add(ptlist);
215
-                    }
216
-
217
-                    transaction.Commit();
218
-                }
219
-            }
220
-        }
221
-
222
-        /// <summary>
223
-        /// 筛选坐标点附近文字信息
224
-        /// </summary>
225
-        private static String GetTxt(Point3d pt, string LayerName)
226
-        {
227
-            ObjectId[] objss = null;//文本对象的ID数组
228
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
229
-
230
-            TypedValue[] val = new TypedValue[] 
231
-            { new TypedValue(0, "TEXT"),
232
-              new TypedValue((int)DxfCode.LayerName,LayerName)
233
-            };//需要筛选的类型值
234
-            SelectionFilter fil = new SelectionFilter(val);//选择过滤器
235
-            PromptSelectionResult pro = ed.SelectCrossingWindow(new Point3d(pt.X - 4.0 * blc / 2000, pt.Y - 4.0 * blc / 2000, 0),
236
-                new Point3d(pt.X + 4.0 * blc / 2000, pt.Y + 4.0 * blc / 2000, 0), fil);
237
-            //PromptSelectionResult pro = ed.SelectAll(fil);//获取结果
238
-            SelectionSet ss = pro.Value;//赋值给选择集
239
-            String txt = null;
240
-
241
-            if (ss != null)
242
-            {
243
-                objss = ss.GetObjectIds();//将选择集内对象ID赋值给ID数组
244
-                if (objss.Length > 1)
245
-                {
246
-                    for (int i = 0; i < objss.Length; i++)
247
-                    {
248
-                        DBText buftext = GetDBObject(objss[i]) as DBText;
249
-                        if (pt.Z.ToString("f1") == buftext.TextString)
250
-                            txt = buftext.TextString;
251
-                    }
252
-                }
253
-                else
254
-                {
255
-                    DBText buftext = GetDBObject(objss[0]) as DBText;
256
-                    txt = buftext.TextString;
257
-                }
258
-            }
259
-            //for (int i = 0; i < objss.Length; i++)
260
-            //{
261
-            //    DBText buftext = GetDBObject(objss[i]) as DBText;//遍历数组ID将对象赋值给单行文本
262
-            //    Point3d po = buftext.Position;//获取单行文本的坐标点
263
-            //    if (Math.Sqrt((po.X - x) * (po.X - x) + (po.Y - y) * (po.Y - y)) < 10)
264
-            //    {
265
-            //        txt = buftext.TextString;//筛选出的单行文本对象
266
-            //    }
267
-            //    else
268
-            //        continue;
269
-            //}
270
-            return txt;
271
-        }
272
-
273
-        private static Entity GetDBObject(ObjectId i)
274
-        {
275
-            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
276
-            Database db = doc.Database;
277
-            Entity ent = null;
278
-            using (Transaction tr = db.TransactionManager.StartTransaction())
279
-            {
280
-                ent = (Entity)tr.GetObject(i, OpenMode.ForRead, true);
281
-                tr.Commit();
282
-            }
283
-            return ent;
284
-        }
285
-
286
-        }
287
-    }
288
-

+ 0
- 124
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRd.Designer.cs 查看文件

@@ -1,124 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class EleRd
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.comboBox_sqx = new System.Windows.Forms.ComboBox();
33
-            this.label1 = new System.Windows.Forms.Label();
34
-            this.comboBox_jqx = new System.Windows.Forms.ComboBox();
35
-            this.label2 = new System.Windows.Forms.Label();
36
-            this.btn_Cancel = new System.Windows.Forms.Button();
37
-            this.btn_OK = new System.Windows.Forms.Button();
38
-            this.SuspendLayout();
39
-            // 
40
-            // comboBox_sqx
41
-            // 
42
-            this.comboBox_sqx.FormattingEnabled = true;
43
-            this.comboBox_sqx.Location = new System.Drawing.Point(155, 80);
44
-            this.comboBox_sqx.Name = "comboBox_sqx";
45
-            this.comboBox_sqx.Size = new System.Drawing.Size(160, 23);
46
-            this.comboBox_sqx.TabIndex = 67;
47
-            // 
48
-            // label1
49
-            // 
50
-            this.label1.AutoSize = true;
51
-            this.label1.Location = new System.Drawing.Point(52, 83);
52
-            this.label1.Name = "label1";
53
-            this.label1.Size = new System.Drawing.Size(97, 15);
54
-            this.label1.TabIndex = 66;
55
-            this.label1.Text = "首曲线图层:";
56
-            // 
57
-            // comboBox_jqx
58
-            // 
59
-            this.comboBox_jqx.FormattingEnabled = true;
60
-            this.comboBox_jqx.Location = new System.Drawing.Point(155, 34);
61
-            this.comboBox_jqx.Name = "comboBox_jqx";
62
-            this.comboBox_jqx.Size = new System.Drawing.Size(160, 23);
63
-            this.comboBox_jqx.TabIndex = 65;
64
-            // 
65
-            // label2
66
-            // 
67
-            this.label2.AutoSize = true;
68
-            this.label2.Location = new System.Drawing.Point(52, 37);
69
-            this.label2.Name = "label2";
70
-            this.label2.Size = new System.Drawing.Size(97, 15);
71
-            this.label2.TabIndex = 64;
72
-            this.label2.Text = "计曲线图层:";
73
-            // 
74
-            // btn_Cancel
75
-            // 
76
-            this.btn_Cancel.Location = new System.Drawing.Point(215, 124);
77
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
78
-            this.btn_Cancel.Name = "btn_Cancel";
79
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
80
-            this.btn_Cancel.TabIndex = 63;
81
-            this.btn_Cancel.Text = "取 消";
82
-            this.btn_Cancel.UseVisualStyleBackColor = true;
83
-            this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
84
-            // 
85
-            // btn_OK
86
-            // 
87
-            this.btn_OK.Location = new System.Drawing.Point(52, 124);
88
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
89
-            this.btn_OK.Name = "btn_OK";
90
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
91
-            this.btn_OK.TabIndex = 62;
92
-            this.btn_OK.Text = "确 定";
93
-            this.btn_OK.UseVisualStyleBackColor = true;
94
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
95
-            // 
96
-            // EleRd
97
-            // 
98
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
99
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
100
-            this.ClientSize = new System.Drawing.Size(380, 184);
101
-            this.Controls.Add(this.comboBox_sqx);
102
-            this.Controls.Add(this.label1);
103
-            this.Controls.Add(this.comboBox_jqx);
104
-            this.Controls.Add(this.label2);
105
-            this.Controls.Add(this.btn_Cancel);
106
-            this.Controls.Add(this.btn_OK);
107
-            this.Name = "EleRd";
108
-            this.Text = "等高线高程取整";
109
-            this.Load += new System.EventHandler(this.EleRd_Load);
110
-            this.ResumeLayout(false);
111
-            this.PerformLayout();
112
-
113
-        }
114
-
115
-        #endregion
116
-
117
-        private System.Windows.Forms.ComboBox comboBox_sqx;
118
-        private System.Windows.Forms.Label label1;
119
-        private System.Windows.Forms.ComboBox comboBox_jqx;
120
-        private System.Windows.Forms.Label label2;
121
-        private System.Windows.Forms.Button btn_Cancel;
122
-        private System.Windows.Forms.Button btn_OK;
123
-    }
124
-}

+ 0
- 85
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRd.cs 查看文件

@@ -1,85 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.ComponentModel;
5
-using System.Data;
6
-using System.Drawing;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    public partial class EleRd : Form
15
-    {
16
-        public EleRd()
17
-        {
18
-            InitializeComponent();
19
-        }
20
-
21
-        private void EleRd_Load(object sender, EventArgs e)
22
-        {
23
-            this.comboBox_jqx.DropDownStyle = ComboBoxStyle.DropDownList;
24
-            this.comboBox_sqx.DropDownStyle = ComboBoxStyle.DropDownList;
25
-
26
-            //自动填充下拉框
27
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
28
-            using (Transaction traction = database.TransactionManager.StartTransaction())
29
-            {
30
-                //存放所有图层名
31
-                List<string> alllayername = new List<string>();
32
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
33
-                foreach (ObjectId objid in layertable)
34
-                {
35
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
36
-                    alllayername.Add(layertablerecord.Name);
37
-                }
38
-
39
-                alllayername.Sort();
40
-
41
-                for (int i = 0; i < alllayername.Count; i++)
42
-                {
43
-                    this.comboBox_jqx.Items.Add(alllayername[i]);
44
-                    this.comboBox_sqx.Items.Add(alllayername[i]);
45
-                }
46
-
47
-                if (alllayername.Contains("8110"))
48
-                {
49
-                    int index = alllayername.IndexOf("8110");
50
-                    this.comboBox_sqx.SelectedIndex = index;
51
-                }
52
-                if (alllayername.Contains("8120"))
53
-                {
54
-                    int index = alllayername.IndexOf("8120");
55
-                    this.comboBox_jqx.SelectedIndex = index;
56
-                }
57
-                traction.Commit();
58
-            }
59
-        }
60
-
61
-        private void btn_OK_Click(object sender, EventArgs e)
62
-        {
63
-            if (comboBox_sqx.Text == "")
64
-            {
65
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择首曲线");
66
-                return;
67
-            }
68
-            if (comboBox_sqx.Text == "")
69
-            {
70
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择计曲线");
71
-                return;
72
-            }
73
-            EleRound.jqx = comboBox_jqx.Text;
74
-            EleRound.sqx = comboBox_sqx.Text;
75
-            this.Close();
76
-            EleRound elerd = new EleRound();
77
-            elerd.eleround();
78
-        }
79
-
80
-        private void btn_Cancel_Click(object sender, EventArgs e)
81
-        {
82
-            this.Close();
83
-        }
84
-    }
85
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRd.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 71
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleRound.cs 查看文件

@@ -1,71 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using GrxCAD.Geometry;
3
-using GrxCAD.ApplicationServices;
4
-using GrxCAD.EditorInput;
5
-using System.Windows.Forms;
6
-
7
-using System;
8
-using System.Collections.Generic;
9
-using System.Linq;
10
-using System.Text;
11
-using System.Threading.Tasks;
12
-
13
-namespace HCTools
14
-{
15
-    class EleRound
16
-    {
17
-        public static string jqx;
18
-        public static string sqx;
19
-        public void eleround()
20
-        {
21
-            Database db = HostApplicationServices.WorkingDatabase;
22
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
23
-
24
-            string lyrname = jqx + "," + sqx;
25
-            //选择要取整等高线
26
-            TypedValue[] value = new TypedValue[]
27
-            {
28
-                new TypedValue((int)DxfCode.LayerName,lyrname),
29
-                new TypedValue((int)DxfCode.Start,"LWPOLYLINE")
30
-            };//设置筛选条件
31
-            SelectionFilter filter = new SelectionFilter(value);//选择区域中全部对象
32
-            //PromptSelectionResult psr = ed.SelectAll(filter);// 要求在图形区域中手动选择对象
33
-            PromptSelectionResult psr = ed.GetSelection(filter);
34
-
35
-            if (psr.Status == PromptStatus.OK)
36
-            {
37
-                int elelines = 0;
38
-                SelectionSet ss = psr.Value;
39
-                if (ss == null)
40
-                    return;
41
-                ObjectIdCollection idcoll1 = new ObjectIdCollection(ss.GetObjectIds());
42
-                for (int i = 0; i < idcoll1.Count; i++)
43
-                {
44
-                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
45
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
46
-                    {
47
-                        BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);
48
-                        BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
49
-                        Polyline pll = (Polyline)idcoll1[i].GetObject(OpenMode.ForWrite);
50
-                        if ((Math.Round(pll.Elevation, 4, MidpointRounding.AwayFromZero) != Math.Truncate((Math.Round(pll.Elevation, 4, MidpointRounding.AwayFromZero)))))
51
-                        {
52
-                            LayerControl layerscontrol = new LayerControl();
53
-                            string layname = "已修改";
54
-                            if (layerscontrol.haslayername(layname) == false)
55
-                            {
56
-                                colorgb col = new colorgb(255, 0, 0);
57
-                                layerscontrol.creatlayer(layname, col);
58
-                            }
59
-                            pll.Elevation = Math.Round(pll.Elevation, 0, MidpointRounding.AwayFromZero);
60
-                            pll.Layer = "已修改";
61
-                            elelines++;
62
-                        }
63
-                        trans.Commit();
64
-                    }
65
-                    doclock.Dispose();
66
-                }
67
-                ed.WriteMessage("\n" + "已修改" + elelines.ToString() + "条高程非整数等高线");
68
-            }
69
-        }
70
-    }
71
-}

+ 0
- 156
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDenck.cs 查看文件

@@ -1,156 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using GrxCAD.Geometry;
5
-using System;
6
-using System.Collections.Generic;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-
11
-namespace HCTools
12
-{
13
-    class EleptDenck
14
-    {
15
-        public static string ptlayer;
16
-        public static string tklayer;
17
-        public static double density;
18
-        public static int flag;
19
-        public void Ptdensity()
20
-        {
21
-            ObjectId[] ids = TKget();
22
-
23
-            Database db = HostApplicationServices.WorkingDatabase;
24
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
25
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
26
-
27
-            TypedValue[] typedvalue = new TypedValue[2];
28
-            typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, ptlayer), 0);
29
-            typedvalue.SetValue(new TypedValue((int)DxfCode.Start, "Insert"), 1);
30
-            SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
31
-
32
-            for (int i = 0; i < ids.Length; i++)
33
-            {
34
-                Entity current_entity = BasicFunction.GetDBObject(ids[i]);
35
-                ZoomToExtent(current_entity.GeometricExtents);
36
-                using (Transaction trans = db.TransactionManager.StartTransaction())
37
-                {
38
-                    Polyline pll = (Polyline)trans.GetObject(ids[i], OpenMode.ForWrite);
39
-                    Point3dCollection ptcoll = new Point3dCollection();
40
-                    for (int j = 0; j < pll.NumberOfVertices; j++)
41
-                    {
42
-                        ptcoll.Add(pll.GetPoint3dAt(j));
43
-                    }
44
-                    PromptSelectionResult psr = editor.SelectCrossingPolygon(ptcoll,selectionfilter);
45
-
46
-                    if (psr.Status == PromptStatus.OK)
47
-                    {
48
-                        SelectionSet selectionset = psr.Value;
49
-                        int ptnums = selectionset.Count;
50
-                        double den = ptnums / pll.Area;
51
-                        if (den < density && flag == 1)
52
-                        {
53
-                            LayerControl layerscontrol = new LayerControl();
54
-                            string layname = "小于密度";
55
-                            if (!layerscontrol.haslayername(layname))
56
-                            {
57
-                                colorgb col = new colorgb(255, 0, 0);
58
-                                layerscontrol.creatlayer(layname, col);
59
-                                pll.Layer = "小于密度";
60
-                            }
61
-                            else
62
-                                pll.Layer = "小于密度";
63
-                            //pll.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
64
-                        }
65
-                        else if (den > density && flag == 2)
66
-                        {
67
-                            LayerControl layerscontrol = new LayerControl();
68
-                            string layname = "大于密度";
69
-                            if (!layerscontrol.haslayername(layname))
70
-                            {
71
-                                colorgb col = new colorgb(255, 0, 0);
72
-                                layerscontrol.creatlayer(layname, col);
73
-                                pll.Layer = "大于密度";
74
-                            }
75
-                            else
76
-                                pll.Layer = "大于密度";
77
-                            //pll.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
78
-                        }
79
-                        else if (flag == 3)
80
-                        {
81
-                            if (den < density || den > density)
82
-                            {
83
-                                LayerControl layerscontrol = new LayerControl();
84
-                                string layname = "不等于密度";
85
-                                if (!layerscontrol.haslayername(layname))
86
-                                {
87
-                                    colorgb col = new colorgb(255, 0, 0);
88
-                                    layerscontrol.creatlayer(layname, col);
89
-                                    pll.Layer = "不等于密度";
90
-                                }
91
-                                else
92
-                                    pll.Layer = "不等于密度";
93
-                                //pll.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
94
-                            }
95
-                        }
96
-                    }
97
-                    trans.Commit();
98
-                }
99
-            }
100
-            doclock.Dispose();
101
-        }
102
-
103
-        private static ObjectId[] TKget()
104
-        {
105
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; 
106
-            TypedValue[] typedvalue = new TypedValue[1];
107
-            typedvalue.SetValue(new TypedValue((int)DxfCode.LayerName, tklayer), 0);
108
-           
109
-            SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
110
-            PromptSelectionResult psr = editor.SelectAll(selectionfilter);
111
-            SelectionSet selectionset = psr.Value;
112
-            ObjectId[] obj = new ObjectId[selectionset.Count];
113
-
114
-            if (psr.Status == PromptStatus.OK)
115
-            {
116
-                obj = selectionset.GetObjectIds();
117
-            }
118
-            return obj;
119
-        }
120
-
121
-        public static void ZoomToExtent(Extents3d extent)
122
-        {
123
-            try
124
-            {
125
-                Point3d pMin = extent.MinPoint;
126
-                Point3d pMax = extent.MaxPoint;
127
-                //获取当前文档及数据库
128
-                Document acDoc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
129
-                Database acCurDb = acDoc.Database;
130
-
131
-                // 启动事务
132
-                using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
133
-                {
134
-                    using (ViewTableRecord acView = acDoc.Editor.GetCurrentView())
135
-                    {
136
-                        //设置视图的高
137
-                        acView.Height = Math.Abs(pMin.Y - pMax.Y);
138
-                        //设置视图的宽
139
-                        acView.Width = Math.Abs(pMin.X - pMax.X);
140
-                        // 设置视图中心
141
-                        acView.CenterPoint = new Point2d((pMin.X + pMax.X) / 2, (pMin.Y + pMax.Y) / 2);
142
-                        // 更新当前视图
143
-                        acDoc.Editor.SetCurrentView(acView);
144
-                    }
145
-                    // 提交更改
146
-                    acTrans.Commit();
147
-                }
148
-            }
149
-            catch (Exception)
150
-            {
151
-
152
-                throw;
153
-            }
154
-        }
155
-    }
156
-}

+ 0
- 170
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDensity.Designer.cs 查看文件

@@ -1,170 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class EleptDensity
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label1 = new System.Windows.Forms.Label();
33
-            this.label2 = new System.Windows.Forms.Label();
34
-            this.comboBox_ptLayer = new System.Windows.Forms.ComboBox();
35
-            this.comboBox_gw = new System.Windows.Forms.ComboBox();
36
-            this.button_ok = new System.Windows.Forms.Button();
37
-            this.button_cancel = new System.Windows.Forms.Button();
38
-            this.label3 = new System.Windows.Forms.Label();
39
-            this.textBox_density = new System.Windows.Forms.TextBox();
40
-            this.checkBox_upon = new System.Windows.Forms.CheckBox();
41
-            this.checkBox_below = new System.Windows.Forms.CheckBox();
42
-            this.SuspendLayout();
43
-            // 
44
-            // label1
45
-            // 
46
-            this.label1.AutoSize = true;
47
-            this.label1.Location = new System.Drawing.Point(51, 26);
48
-            this.label1.Name = "label1";
49
-            this.label1.Size = new System.Drawing.Size(127, 15);
50
-            this.label1.TabIndex = 0;
51
-            this.label1.Text = "高程点所在图层:";
52
-            // 
53
-            // label2
54
-            // 
55
-            this.label2.AutoSize = true;
56
-            this.label2.Location = new System.Drawing.Point(66, 75);
57
-            this.label2.Name = "label2";
58
-            this.label2.Size = new System.Drawing.Size(112, 15);
59
-            this.label2.TabIndex = 1;
60
-            this.label2.Text = "格网所在图层:";
61
-            // 
62
-            // comboBox_ptLayer
63
-            // 
64
-            this.comboBox_ptLayer.FormattingEnabled = true;
65
-            this.comboBox_ptLayer.Location = new System.Drawing.Point(184, 23);
66
-            this.comboBox_ptLayer.Name = "comboBox_ptLayer";
67
-            this.comboBox_ptLayer.Size = new System.Drawing.Size(197, 23);
68
-            this.comboBox_ptLayer.TabIndex = 2;
69
-            // 
70
-            // comboBox_gw
71
-            // 
72
-            this.comboBox_gw.FormattingEnabled = true;
73
-            this.comboBox_gw.Location = new System.Drawing.Point(184, 72);
74
-            this.comboBox_gw.Name = "comboBox_gw";
75
-            this.comboBox_gw.Size = new System.Drawing.Size(197, 23);
76
-            this.comboBox_gw.TabIndex = 3;
77
-            // 
78
-            // button_ok
79
-            // 
80
-            this.button_ok.Location = new System.Drawing.Point(99, 167);
81
-            this.button_ok.Name = "button_ok";
82
-            this.button_ok.Size = new System.Drawing.Size(75, 29);
83
-            this.button_ok.TabIndex = 6;
84
-            this.button_ok.Text = "确 定";
85
-            this.button_ok.UseVisualStyleBackColor = true;
86
-            this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
87
-            // 
88
-            // button_cancel
89
-            // 
90
-            this.button_cancel.Location = new System.Drawing.Point(289, 167);
91
-            this.button_cancel.Name = "button_cancel";
92
-            this.button_cancel.Size = new System.Drawing.Size(75, 29);
93
-            this.button_cancel.TabIndex = 7;
94
-            this.button_cancel.Text = "取 消";
95
-            this.button_cancel.UseVisualStyleBackColor = true;
96
-            this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click);
97
-            // 
98
-            // label3
99
-            // 
100
-            this.label3.AutoSize = true;
101
-            this.label3.Location = new System.Drawing.Point(45, 128);
102
-            this.label3.Name = "label3";
103
-            this.label3.Size = new System.Drawing.Size(52, 15);
104
-            this.label3.TabIndex = 8;
105
-            this.label3.Text = "密度:";
106
-            // 
107
-            // textBox_density
108
-            // 
109
-            this.textBox_density.Location = new System.Drawing.Point(103, 122);
110
-            this.textBox_density.Name = "textBox_density";
111
-            this.textBox_density.Size = new System.Drawing.Size(100, 25);
112
-            this.textBox_density.TabIndex = 9;
113
-            // 
114
-            // checkBox_upon
115
-            // 
116
-            this.checkBox_upon.AutoSize = true;
117
-            this.checkBox_upon.Location = new System.Drawing.Point(345, 124);
118
-            this.checkBox_upon.Name = "checkBox_upon";
119
-            this.checkBox_upon.Size = new System.Drawing.Size(89, 19);
120
-            this.checkBox_upon.TabIndex = 10;
121
-            this.checkBox_upon.Text = "大于密度";
122
-            this.checkBox_upon.UseVisualStyleBackColor = true;
123
-            // 
124
-            // checkBox_below
125
-            // 
126
-            this.checkBox_below.AutoSize = true;
127
-            this.checkBox_below.Location = new System.Drawing.Point(235, 124);
128
-            this.checkBox_below.Name = "checkBox_below";
129
-            this.checkBox_below.Size = new System.Drawing.Size(89, 19);
130
-            this.checkBox_below.TabIndex = 11;
131
-            this.checkBox_below.Text = "小于密度";
132
-            this.checkBox_below.UseVisualStyleBackColor = true;
133
-            // 
134
-            // EleptDensity
135
-            // 
136
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
137
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
138
-            this.ClientSize = new System.Drawing.Size(468, 219);
139
-            this.Controls.Add(this.checkBox_below);
140
-            this.Controls.Add(this.checkBox_upon);
141
-            this.Controls.Add(this.textBox_density);
142
-            this.Controls.Add(this.label3);
143
-            this.Controls.Add(this.button_cancel);
144
-            this.Controls.Add(this.button_ok);
145
-            this.Controls.Add(this.comboBox_gw);
146
-            this.Controls.Add(this.comboBox_ptLayer);
147
-            this.Controls.Add(this.label2);
148
-            this.Controls.Add(this.label1);
149
-            this.Name = "EleptDensity";
150
-            this.Text = "高程点密度检查";
151
-            this.Load += new System.EventHandler(this.EleptDensity_Load);
152
-            this.ResumeLayout(false);
153
-            this.PerformLayout();
154
-
155
-        }
156
-
157
-        #endregion
158
-
159
-        private System.Windows.Forms.Label label1;
160
-        private System.Windows.Forms.Label label2;
161
-        private System.Windows.Forms.ComboBox comboBox_ptLayer;
162
-        private System.Windows.Forms.ComboBox comboBox_gw;
163
-        private System.Windows.Forms.Button button_ok;
164
-        private System.Windows.Forms.Button button_cancel;
165
-        private System.Windows.Forms.Label label3;
166
-        private System.Windows.Forms.TextBox textBox_density;
167
-        private System.Windows.Forms.CheckBox checkBox_upon;
168
-        private System.Windows.Forms.CheckBox checkBox_below;
169
-    }
170
-}

+ 0
- 100
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDensity.cs 查看文件

@@ -1,100 +0,0 @@
1
-using GrxCAD.DatabaseServices;
2
-using System;
3
-using System.Collections.Generic;
4
-using System.ComponentModel;
5
-using System.Data;
6
-using System.Drawing;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-using System.Windows.Forms;
11
-
12
-namespace HCTools
13
-{
14
-    public partial class EleptDensity : Form
15
-    {
16
-        public EleptDensity()
17
-        {
18
-            InitializeComponent();
19
-        }
20
-
21
-        private void EleptDensity_Load(object sender, EventArgs e)
22
-        {
23
-            this.comboBox_ptLayer.DropDownStyle = ComboBoxStyle.DropDownList;
24
-            this.comboBox_gw.DropDownStyle = ComboBoxStyle.DropDownList;
25
-
26
-            this.MaximizeBox = false;
27
-            this.StartPosition = FormStartPosition.CenterScreen;
28
-
29
-            //自动填充下拉框
30
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
31
-            using (Transaction traction = database.TransactionManager.StartTransaction())
32
-            {
33
-                //存放所有图层名
34
-                List<string> alllayername = new List<string>();
35
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
36
-                foreach (ObjectId objid in layertable)
37
-                {
38
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
39
-                    alllayername.Add(layertablerecord.Name);
40
-                }
41
-                alllayername.Sort();
42
-
43
-                for (int i = 0; i < alllayername.Count; i++)
44
-                {
45
-                    this.comboBox_ptLayer.Items.Add(alllayername[i]);
46
-                    this.comboBox_gw.Items.Add(alllayername[i]);
47
-                }
48
-
49
-                if (alllayername.Contains("8300"))
50
-                {
51
-                    int index = alllayername.IndexOf("8300");
52
-                    this.comboBox_ptLayer.SelectedIndex = index;
53
-                }
54
-                traction.Commit();
55
-            }
56
-        }
57
-
58
-        private void button_cancel_Click(object sender, EventArgs e)
59
-        {
60
-            this.Close();
61
-        }
62
-
63
-        private void button_ok_Click(object sender, EventArgs e)
64
-        {
65
-            if(comboBox_ptLayer.Text == "")
66
-            { 
67
-                MessageBox.Show("请选择高程点所在图层!");
68
-                return;
69
-            }
70
-            if (comboBox_gw.Text == "")
71
-            { 
72
-                MessageBox.Show("请选择格网所在图层!");
73
-                return;
74
-            }
75
-            if (textBox_density.Text == "")
76
-            {
77
-                MessageBox.Show("请输入密度!");
78
-                return;
79
-            }
80
-            EleptDenck.ptlayer = comboBox_ptLayer.Text;
81
-            EleptDenck.tklayer = comboBox_gw.Text;
82
-            EleptDenck.density = Convert.ToDouble(textBox_density.Text);
83
-            if(checkBox_below.Checked && !checkBox_upon.Checked)
84
-                EleptDenck.flag = 1;
85
-            else if (!checkBox_below.Checked && checkBox_upon.Checked)
86
-                EleptDenck.flag = 2;
87
-            else if(checkBox_below.Checked && checkBox_upon.Checked)
88
-                EleptDenck.flag = 3;
89
-            else if(!checkBox_below.Checked && !checkBox_upon.Checked)
90
-            { 
91
-                MessageBox.Show("请选择“大于密度”/“小于密度”!");
92
-                return;
93
-            }
94
-
95
-            EleptDenck denck = new EleptDenck();
96
-            denck.Ptdensity();
97
-            this.Close();
98
-        }
99
-    }
100
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/EleptDensity.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 612
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/FeatureOverlap.cs 查看文件

@@ -1,612 +0,0 @@
1
-using GrxCAD.ApplicationServices;
2
-using GrxCAD.DatabaseServices;
3
-using GrxCAD.EditorInput;
4
-using GrxCAD.Geometry;
5
-using System;
6
-using System.Collections.Generic;
7
-using System.Linq;
8
-using System.Text;
9
-using System.Threading.Tasks;
10
-
11
-namespace HCTools
12
-{
13
-    class FeatureOverlap
14
-    {
15
-
16
-        //比例尺
17
-        public static int blc;
18
-        //重叠地物数量
19
-        private int number = 0;
20
-        public void check()
21
-        {
22
-            LayerControl lc = new LayerControl();
23
-            if (lc.haslayername("地物重叠") == false)
24
-            {
25
-                lc.creatlayer("地物重叠", new colorgb(255, 0, 255));
26
-                lc.movelayertofront("地物重叠");
27
-            }
28
-            else
29
-            {
30
-                lc.movelayertofront("地物重叠");
31
-            }
32
-            //选择块
33
-            selecblock();
34
-            search(blocklist,entitylist);
35
-        }
36
-
37
-        /// <summary>
38
-        /// 定义一个块类,主要包括位置和名字
39
-        /// </summary>
40
-        public struct Block
41
-        {
42
-            public double x;
43
-            public double y;
44
-            public double z;
45
-            public string name;
46
-
47
-            public Block(double x, double y, double z, string name)
48
-            {
49
-                this.x = x;
50
-                this.y = y;
51
-                this.z = z;
52
-                this.name = name;
53
-            }
54
-        }
55
-
56
-        //块列表
57
-        private List<Block> blocklist = new List<Block>();
58
-        private List<Entity> entitylist = new List<Entity>();
59
-        private void selecblock()
60
-        {
61
-            Document document = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
62
-            Database database = HostApplicationServices.WorkingDatabase;
63
-            DocumentLock documentlock = null;
64
-            Transaction traction = null;
65
-            try
66
-            {
67
-                traction = database.TransactionManager.StartTransaction();
68
-                documentlock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
69
-                BlockTable blocktable = traction.GetObject(database.BlockTableId,
70
-                                          OpenMode.ForRead) as BlockTable;
71
-                Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
72
-                TypedValue[] typedvalue = new TypedValue[1];
73
-                typedvalue.SetValue(new TypedValue((int)DxfCode.Start, "Insert"), 0);
74
-                SelectionFilter selectionfilter = new SelectionFilter(typedvalue);
75
-                PromptSelectionResult psr = editor.GetSelection(selectionfilter); ///手动选择块参照
76
-                //PromptSelectionResult psr = editor.SelectAll();
77
-                if (psr.Status == PromptStatus.OK)
78
-                {
79
-                    SelectionSet selectionset = psr.Value;
80
-                    ObjectId[] obj = new ObjectId[selectionset.Count];
81
-                    obj = selectionset.GetObjectIds();
82
-                    for (int i = 0; i < obj.Length; i++)
83
-                    {
84
-                        ObjectId objid = obj[i];
85
-                        Entity entity = (Entity)traction.GetObject(objid, OpenMode.ForWrite);
86
-                        if (entity is BlockReference)
87
-                        {
88
-                            BlockReference block = entity as BlockReference;
89
-                            ObjectId id = block.BlockTableRecord;
90
-                            BlockTableRecord blocktablerecord = traction.GetObject(id,
91
-                                                            OpenMode.ForRead) as BlockTableRecord;
92
-                            string blockname = blocktablerecord.Name.ToLower();
93
-                            Block blc = new Block();
94
-                            ///块参照的位置
95
-                            blc.x = block.Position.X;
96
-                            blc.y = block.Position.Y;
97
-                            blc.z = block.Position.Z;
98
-                            blc.name = blockname;
99
-                            ///块参照的名称
100
-                            switch (blockname)
101
-                            {
102
-                                case "gc028":
103
-                                case "gc090":
104
-                                case "gc110":
105
-                                case "gc111":
106
-                                case "gc119":
107
-                                case "gc120":
108
-                                case "gc121":
109
-                                case "gc122":
110
-                                case "gc124":
111
-                                case "gc125":
112
-                                case "gc126":
113
-                                case "gc143":
114
-                                case "gc144":
115
-                                case "gc145":
116
-                                case "gc160":
117
-                                case "gc163":
118
-                                case "gc164":
119
-                                case "gc165":
120
-                                case "gc200":
121
-                                case "gc205":
122
-                                case "gc206":
123
-                                case "gc207":
124
-                                case "gc208":
125
-                                case "gc210":
126
-                                case "gc211":
127
-                                case "gc213":
128
-                                case "gc246":
129
-                                case "gc251":
130
-                                case "gc253":
131
-                                case "gc254":
132
-                                case "gc319":
133
-                                case "gc320":
134
-                                case "gc322":
135
-                                case "gc323":
136
-                                case "gc325":
137
-                                case "gc326":
138
-                                    entitylist.Add(entity);
139
-                                    blocklist.Add(blc);
140
-                                    break;
141
-                                case "gc170":
142
-                                    if (block.Layer == "9000")
143
-                                    {
144
-                                        entitylist.Add(entity);
145
-                                        blocklist.Add(blc);
146
-                                    }
147
-                                    break;
148
-
149
-                                default:
150
-                                    break;
151
-                            }
152
-                        }
153
-                    }
154
-                    editor.WriteMessage("\n" + "选中块数量:" + blocklist.Count.ToString());
155
-                }
156
-                traction.Commit();
157
-            }
158
-            catch (GrxCAD.Runtime.Exception)
159
-            {
160
-                traction.Abort();
161
-                return;
162
-            }
163
-            finally
164
-            {
165
-                traction.Dispose();
166
-                documentlock.Dispose();
167
-            }
168
-        }
169
-
170
-
171
-        /// <summary>
172
-        /// 寻找与上面已选实体相交的那部分
173
-        /// </summary>
174
-        /// <param name="list"></param>
175
-        public void search(List<Block> list, List<Entity> list1)
176
-        {
177
-            Database database = HostApplicationServices.WorkingDatabase;
178
-            Transaction traction = null;
179
-            DocumentLock documentlock = null;
180
-            try
181
-            {
182
-                Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
183
-                for (int i = 0; i < list.Count; i++)
184
-                {
185
-                    double x = Math.Round((double)list[i].x, 3, MidpointRounding.AwayFromZero);
186
-                    double y = Math.Round((double)list[i].y, 3, MidpointRounding.AwayFromZero);
187
-                    Entity entity1 = list1[i];
188
-                    string name = list[i].name;
189
-                    rebound reb = get_boundary(name);
190
-                    double height = reb.height;
191
-                    double width = reb.width;
192
-                    int type = reb.type;
193
-                    ///按照比例尺决定大小
194
-                    if (blc == 1000)
195
-                    {
196
-                        height = height / 2;
197
-                        width = width / 2;
198
-                    }
199
-                    else if (blc == 500)
200
-                    {
201
-                        height = height / 4;
202
-                        width = width / 4;
203
-                    }
204
-                    else if (blc == 2000)
205
-                    {
206
-                        height = height * 1;
207
-                        width = width * 1;
208
-                    }
209
-                    ///是为了获得四个角,好框选整个图形
210
-                    Point3d p1 = new Point3d(x - width, y, 0);
211
-                    Point3d p2 = new Point3d(x + width, y, 0);
212
-                    Point3d p3 = new Point3d(x + width, y + height, 0);
213
-                    Point3d p4 = new Point3d(x - width, y + height, 0);
214
-                    if (type == 2)
215
-                    {
216
-                        p1 = new Point3d(x - width, y - height, 0);
217
-                        p2 = new Point3d(x + width, y - height, 0);
218
-                        p3 = new Point3d(x + width, y + height, 0);
219
-                        p4 = new Point3d(x - width, y + height, 0);
220
-                    }
221
-                    else if (type == 3)
222
-                    {
223
-                        p1 = new Point3d(x - width, y - height, 0);
224
-                        p2 = new Point3d(x + width, y - height, 0);
225
-                        p3 = new Point3d(x + width, y, 0);
226
-                        p4 = new Point3d(x - width, y, 0);
227
-                    }
228
-                    using (Transaction acTrans = database.TransactionManager.StartTransaction())
229
-                    {
230
-                        ViewTableRecord currview = editor.GetCurrentView();
231
-                        currview.CenterPoint = new Point2d(x, y);
232
-                        currview.ViewDirection = new Vector3d(0, 0, 1);
233
-                        currview.Width = 40;
234
-                        currview.Height = 40;
235
-                        editor.SetCurrentView(currview);
236
-                        acTrans.Commit();
237
-                    }
238
-
239
-                    PromptSelectionResult pselectresult = editor.SelectCrossingWindow(p1, p3);///框选范围内相交的实体
240
-                                                                                              ///如果有,按照类型对相交实体进行判断
241
-
242
-                    traction = database.TransactionManager.StartTransaction();
243
-                    documentlock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
244
-                    BlockTable blocktable = traction.GetObject(database.BlockTableId,
245
-                                                 OpenMode.ForRead) as BlockTable;
246
-                    BlockTableRecord blocktablerecord = traction.GetObject(blocktable[BlockTableRecord.ModelSpace],
247
-                                                    OpenMode.ForWrite) as BlockTableRecord;
248
-                    if (pselectresult.Status == PromptStatus.OK)
249
-                    {
250
-                        SelectionSet selectionset = pselectresult.Value;
251
-                        ObjectId[] obj = new ObjectId[selectionset.Count];
252
-                        obj = selectionset.GetObjectIds();
253
-                        int count = 0;
254
-                        for (int j = 0; j < obj.Length; j++)
255
-                        {
256
-                            ObjectId objid = obj[j];
257
-                            Entity entity = (Entity)traction.GetObject(objid, OpenMode.ForWrite);
258
-                            ///块参照
259
-                            if (entity is BlockReference)
260
-                            {
261
-                                BlockReference cblock = entity as BlockReference;
262
-                                ObjectId cid = cblock.BlockTableRecord;
263
-                                BlockTableRecord crecord = traction.GetObject(cid,
264
-                                                                OpenMode.ForRead) as BlockTableRecord;
265
-                                string blockname = crecord.Name.ToLower();
266
-                                if (blockname != "gc086")
267
-                                {
268
-                                    count++;
269
-                                }
270
-                            }
271
-                            ///文字
272
-                            else if (entity is DBText)
273
-                            {
274
-                                string layer = entity.Layer;
275
-                                if (layer != "0")
276
-                                {
277
-                                    if (entity1 is BlockReference)
278
-                                    {
279
-                                        BlockReference cblock = entity1 as BlockReference;
280
-                                        DBText txt = entity as DBText;
281
-                                        if (cblock.Position.Z.ToString("N1") != txt.TextString)
282
-                                            count++;
283
-                                    }
284
-                                }
285
-                            }
286
-                            ///线
287
-                            else if (entity is Polyline || entity is Polyline2d)
288
-                            {
289
-                                string layer = entity.Layer;
290
-                                if (layer == "4400" || layer == "6100" || layer == "4300" || layer == "2000")
291
-                                {
292
-                                    if (name != "gc200")
293
-                                    {
294
-                                        count++;
295
-                                    }
296
-                                }
297
-                            }
298
-
299
-                        }
300
-                        if (count > 1)
301
-                        {
302
-                            double height1 = 2 * height;
303
-                            Point3d orip = new Point3d(x, y, 0);
304
-                            Point3d newp = new Point3d(x, y + height1, 0);
305
-                            if (name == "gc120" || name == "gc119" || name == "gc126" || name == "gc123" || name == "gc325" || name == "gc205"
306
-                                     || name == "gc206" || name == "gc207" || name == "gc125" || name == "gc165" || name == "gc326" || name == "gc170"
307
-                                     || name == "gc160" || name == "gc246" || name == "gc208" || name == "gc121" || name == "gc163" || name == "gc164"
308
-                                     || name == "gc090" || name == "gc124" || name == "gc379")
309
-                            {
310
-                                if (entity1.IsWriteEnabled == true)
311
-                                {
312
-                                    Move(entity1, orip, newp);
313
-                                }
314
-                            }
315
-                            
316
-                            double px1 = p1.X;
317
-                            double py1 = p1.Y;
318
-                            double px2 = p2.X;
319
-                            double py2 = p2.Y;
320
-                            double px3 = p3.X;
321
-                            double py3 = p3.Y;
322
-                            double px4 = p4.X;
323
-                            double py4 = p4.Y;
324
-                            p1 = new Point3d(px1, py1 + height1, 0);
325
-                            p2 = new Point3d(px2, py2 + height1, 0);
326
-                            p3 = new Point3d(px3, py3 + height1, 0);
327
-                            p4 = new Point3d(px4, py4 + height1, 0);
328
-                            Point3dCollection coll = new Point3dCollection();
329
-                            coll.Add(p1);
330
-                            coll.Add(p2);
331
-                            coll.Add(p3);
332
-                            coll.Add(p4);
333
-                            Polyline2d line2d = new Polyline2d(Poly2dType.SimplePoly, coll, 0, true, 0, 0, null);
334
-                            line2d.SetDatabaseDefaults();
335
-                            line2d.Layer = "地物重叠";
336
-                            blocktablerecord.AppendEntity(line2d);
337
-                            traction.AddNewlyCreatedDBObject(line2d, true);
338
-                            number++;
339
-                        }
340
-                    }
341
-                    traction.Commit();
342
-                }
343
-                editor.WriteMessage("\n");
344
-                editor.WriteMessage("检测到重叠地物:" + number);
345
-                editor.WriteMessage("\n");
346
-                number = 0;
347
-            }
348
-            catch (GrxCAD.Runtime.Exception)
349
-            {
350
-                traction.Abort();
351
-                return;
352
-            }
353
-            finally
354
-            {
355
-                if (documentlock != null)
356
-                {
357
-                    documentlock.Dispose();
358
-                }
359
-                if (traction != null)
360
-                {
361
-                    traction.Dispose();
362
-                }
363
-            }
364
-        }
365
-
366
-        /// <summary>
367
-        /// type=1表示图形为上半部分,type=2表示图形为上下两部分,type=3表示下半部分(中心点跟图形的关系)
368
-        /// </summary>
369
-        private struct rebound
370
-        {
371
-            public double height;
372
-            public double width;
373
-            public int type;
374
-
375
-            public rebound(double height, double width, int type)
376
-            {
377
-                this.height = height;
378
-                this.width = width;
379
-                this.type = type;
380
-            }
381
-        }
382
-
383
-        /// <summary>
384
-        /// 对每个地物图标的大小进行绘制
385
-        /// </summary>
386
-        /// <param name="name"></param>
387
-        /// <returns></returns>
388
-        private rebound get_boundary(string name)
389
-        {
390
-            double height = 0;
391
-            double width = 0;
392
-            int type = 0;
393
-
394
-            switch (name)
395
-            {
396
-                case "gc028":
397
-                    height = 5;
398
-                    width = 4;
399
-                    type = 2;
400
-                    break;
401
-                case "gc090":
402
-                    height = 2.5;
403
-                    width = 2.5;
404
-                    type = 2;
405
-                    break;
406
-                //case "gc110":
407
-                //    height = 4;
408
-                //    width = 4;
409
-                //    type = 2;
410
-                //    break;
411
-
412
-                //case "gc111":
413
-                //    height = 4;
414
-                //    width = 4;
415
-                //    type = 2;
416
-                //    break;
417
-
418
-                case "gc119":
419
-                    height = 2.6;
420
-                    width = 2.6;
421
-                    type = 1;
422
-                    break;
423
-                case "gc120":
424
-                    height = 5;
425
-                    width = 1;
426
-                    type = 1;
427
-                    break;
428
-                case "gc121":
429
-                    height = 1.1;
430
-                    width = 1.1;
431
-                    type = 2;
432
-                    break;
433
-                case "gc122":
434
-                    height = 2.1;
435
-                    width = 1.1;
436
-                    type = 2;
437
-                    break;
438
-                case "gc123":
439
-                    height = 4.2;
440
-                    width = 2.1;
441
-                    type = 2;
442
-                    break;
443
-                case "gc124":
444
-                    height = 3;
445
-                    width = 1.5;
446
-                    type = 1;
447
-                    break;
448
-                case "gc125":
449
-                    height = 3.8;
450
-                    width = 1.2;
451
-                    type = 2;
452
-                    break;
453
-                case "gc126":
454
-                    height = 2.5;
455
-                    width = 3;
456
-                    type = 2;
457
-                    break;
458
-                case "gc143":
459
-                    height = 6;
460
-                    width = 2;
461
-                    type = 1;
462
-                    break;
463
-                case "gc144":
464
-                    height = 6;
465
-                    width = 2;
466
-                    type = 1;
467
-                    break;
468
-                case "gc145":
469
-                    height = 6;
470
-                    width = 2;
471
-                    type = 1;
472
-                    break;
473
-                case "gc160":
474
-                    height = 4.7;
475
-                    width = 4.7;
476
-                    type = 2;
477
-                    break;
478
-                case "gc163":
479
-                    height = 0.6;
480
-                    width = 2.5;
481
-                    type = 2;
482
-                    break;
483
-                case "gc164":
484
-                    height = 0.7;
485
-                    width = 0.7;
486
-                    type = 2;
487
-                    break;
488
-                case "gc165":
489
-                    height = 5;
490
-                    width = 1;
491
-                    type = 2;
492
-                    break;
493
-                case "gc170":
494
-                    height = 1.1;
495
-                    width = 1.1;
496
-                    type = 2;
497
-                    break;
498
-                case "gc200":
499
-                    height = 1.5;
500
-                    width = 1.5;
501
-                    type = 2;
502
-                    break;
503
-                case "gc205":
504
-                    height = 5;
505
-                    width = 2;
506
-                    type = 1;
507
-                    break;
508
-                case "gc206":
509
-                    height = 5;
510
-                    width = 2;
511
-                    type = 1;
512
-                    break;
513
-                case "gc207":
514
-                    height = 4;
515
-                    width = 1;
516
-                    type = 2;
517
-                    break;
518
-                case "gc208":
519
-                    height = 1.6;
520
-                    width = 2.4;
521
-                    type = 2;
522
-                    break;
523
-                case "gc210":
524
-                    height = 6;
525
-                    width = 2.2;
526
-                    type = 1;
527
-                    break;
528
-                case "gc211":
529
-                    height = 3;
530
-                    width = 2.8;
531
-                    type = 3;
532
-                    break;
533
-                case "gc212":
534
-                    height = 5;
535
-                    width = 2.6;
536
-                    type = 1;
537
-                    break;
538
-                case "gc246":
539
-                    height = 6;
540
-                    width = 4;
541
-                    type = 1;
542
-                    break;
543
-                case "gc251":
544
-                    height = 1;
545
-                    width = 3.5;
546
-                    type = 2;
547
-                    break;
548
-                case "gc253":
549
-                    height = 0.7;
550
-                    width = 0.7;
551
-                    type = 2;
552
-                    break;
553
-                case "gc254":
554
-                    height = 3;
555
-                    width = 2.5;
556
-                    type = 2;
557
-                    break;
558
-                case "gc319":
559
-                    height = 6;
560
-                    width = 2;
561
-                    type = 1;
562
-                    break;
563
-                case "gc320":
564
-                    height = 6;
565
-                    width = 2;
566
-                    type = 1;
567
-                    break;
568
-                case "gc322":
569
-                    height = 6;
570
-                    width = 2;
571
-                    type = 1;
572
-                    break;
573
-                case "gc323":
574
-                    height = 4;
575
-                    width = 1.1;
576
-                    type = 1;
577
-                    break;
578
-                case "gc325":
579
-                    height = 5;
580
-                    width = 0.7;
581
-                    type = 1;
582
-                    break;
583
-                case "gc326":
584
-                    height = 1.6;
585
-                    width = 1.6;
586
-                    type = 2;
587
-                    break;
588
-
589
-                default:
590
-                    height = 2.5;
591
-                    width = 2;
592
-                    type = 2;
593
-                    break;
594
-            }
595
-            rebound rec = new rebound(height, width, type);
596
-            return rec;
597
-        }
598
-
599
-        /// <summary>
600
-        /// 指定基点与目标点移动实体
601
-        /// </summary>
602
-        /// <param name="ent">实体对象</param>
603
-        /// <param name="BasePt">基点</param>
604
-        /// <param name="TargetPt">目标点</param>
605
-        public static void Move(Entity ent, Point3d basePt, Point3d targetPt)
606
-        {
607
-            Vector3d vec = targetPt - basePt;
608
-            Matrix3d mt = Matrix3d.Displacement(vec);
609
-            ent.TransformBy(mt);
610
-        }
611
-    }
612
-}

+ 0
- 126
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierak.Designer.cs 查看文件

@@ -1,126 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class Hierak
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.comboBox_CrtLayer = new System.Windows.Forms.ComboBox();
33
-            this.label_CrtLayer = new System.Windows.Forms.Label();
34
-            this.textBox_Gap = new System.Windows.Forms.TextBox();
35
-            this.label_Gap = new System.Windows.Forms.Label();
36
-            this.btn_Cancel = new System.Windows.Forms.Button();
37
-            this.btn_OK = new System.Windows.Forms.Button();
38
-            this.SuspendLayout();
39
-            // 
40
-            // comboBox_CrtLayer
41
-            // 
42
-            this.comboBox_CrtLayer.BackColor = System.Drawing.SystemColors.Window;
43
-            this.comboBox_CrtLayer.FormattingEnabled = true;
44
-            this.comboBox_CrtLayer.Location = new System.Drawing.Point(204, 40);
45
-            this.comboBox_CrtLayer.Name = "comboBox_CrtLayer";
46
-            this.comboBox_CrtLayer.Size = new System.Drawing.Size(169, 23);
47
-            this.comboBox_CrtLayer.TabIndex = 7;
48
-            // 
49
-            // label_CrtLayer
50
-            // 
51
-            this.label_CrtLayer.AutoSize = true;
52
-            this.label_CrtLayer.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
53
-            this.label_CrtLayer.Location = new System.Drawing.Point(75, 43);
54
-            this.label_CrtLayer.Name = "label_CrtLayer";
55
-            this.label_CrtLayer.Size = new System.Drawing.Size(112, 15);
56
-            this.label_CrtLayer.TabIndex = 6;
57
-            this.label_CrtLayer.Text = "等高线所在图层";
58
-            // 
59
-            // textBox_Gap
60
-            // 
61
-            this.textBox_Gap.Location = new System.Drawing.Point(204, 97);
62
-            this.textBox_Gap.Name = "textBox_Gap";
63
-            this.textBox_Gap.Size = new System.Drawing.Size(169, 25);
64
-            this.textBox_Gap.TabIndex = 5;
65
-            // 
66
-            // label_Gap
67
-            // 
68
-            this.label_Gap.AutoSize = true;
69
-            this.label_Gap.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
70
-            this.label_Gap.Location = new System.Drawing.Point(135, 100);
71
-            this.label_Gap.Name = "label_Gap";
72
-            this.label_Gap.Size = new System.Drawing.Size(52, 15);
73
-            this.label_Gap.TabIndex = 4;
74
-            this.label_Gap.Text = "等高距";
75
-            // 
76
-            // btn_Cancel
77
-            // 
78
-            this.btn_Cancel.Location = new System.Drawing.Point(283, 149);
79
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
80
-            this.btn_Cancel.Name = "btn_Cancel";
81
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
82
-            this.btn_Cancel.TabIndex = 34;
83
-            this.btn_Cancel.Text = "取 消";
84
-            this.btn_Cancel.UseVisualStyleBackColor = true;
85
-            this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
86
-            // 
87
-            // btn_OK
88
-            // 
89
-            this.btn_OK.Location = new System.Drawing.Point(117, 149);
90
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
91
-            this.btn_OK.Name = "btn_OK";
92
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
93
-            this.btn_OK.TabIndex = 33;
94
-            this.btn_OK.Text = "确 定";
95
-            this.btn_OK.UseVisualStyleBackColor = true;
96
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
97
-            // 
98
-            // Hierak
99
-            // 
100
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
101
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
102
-            this.ClientSize = new System.Drawing.Size(500, 219);
103
-            this.Controls.Add(this.btn_Cancel);
104
-            this.Controls.Add(this.btn_OK);
105
-            this.Controls.Add(this.comboBox_CrtLayer);
106
-            this.Controls.Add(this.label_CrtLayer);
107
-            this.Controls.Add(this.textBox_Gap);
108
-            this.Controls.Add(this.label_Gap);
109
-            this.Name = "Hierak";
110
-            this.Text = "等高线分层";
111
-            this.Load += new System.EventHandler(this.Hierak_Load);
112
-            this.ResumeLayout(false);
113
-            this.PerformLayout();
114
-
115
-        }
116
-
117
-        #endregion
118
-
119
-        private System.Windows.Forms.ComboBox comboBox_CrtLayer;
120
-        private System.Windows.Forms.Label label_CrtLayer;
121
-        private System.Windows.Forms.TextBox textBox_Gap;
122
-        private System.Windows.Forms.Label label_Gap;
123
-        private System.Windows.Forms.Button btn_Cancel;
124
-        private System.Windows.Forms.Button btn_OK;
125
-    }
126
-}

+ 0
- 87
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierak.cs 查看文件

@@ -1,87 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.ComponentModel;
4
-using System.Data;
5
-using System.Drawing;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-using System.Windows.Forms;
10
-
11
-using GrxCAD.EditorInput;
12
-using GrxCAD.DatabaseServices;
13
-using GrxCAD.Geometry;
14
-
15
-namespace HCTools
16
-{
17
-    public partial class Hierak : Form
18
-    {
19
-        public Hierak()
20
-        {
21
-            InitializeComponent();
22
-        }
23
-
24
-        private void Hierak_Load(object sender, EventArgs e)
25
-        {
26
-            this.comboBox_CrtLayer.DropDownStyle = ComboBoxStyle.DropDownList;
27
-
28
-            this.MaximizeBox = false;
29
-            this.StartPosition = FormStartPosition.CenterScreen;
30
-
31
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
32
-            using (Transaction traction = database.TransactionManager.StartTransaction())
33
-            {
34
-                //存放所有图层名
35
-                List<string> alllayername = new List<string>();
36
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
37
-                foreach (ObjectId objid in layertable)
38
-                {
39
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
40
-                    alllayername.Add(layertablerecord.Name);
41
-                }
42
-
43
-                alllayername.Sort();
44
-
45
-                for (int i = 0; i < alllayername.Count; i++)
46
-                {
47
-                    this.comboBox_CrtLayer.Items.Add(alllayername[i]);
48
-                }
49
-
50
-                if (alllayername.Contains("8110"))
51
-                {
52
-                    int index = alllayername.IndexOf("8110");
53
-                    this.comboBox_CrtLayer.SelectedIndex = index;
54
-                }
55
-                traction.Commit();
56
-            }
57
-        }
58
-
59
-        private void btn_OK_Click(object sender, EventArgs e)
60
-        {
61
-            if (textBox_Gap.Text == "")
62
-            {
63
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入等高距");
64
-                return;
65
-            }
66
-
67
-            if (comboBox_CrtLayer.Text == "")
68
-            {
69
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择当前等高线所在图层");
70
-                return;
71
-            }
72
-
73
-            Hierarchy.gap = Convert.ToInt32(textBox_Gap.Text.ToString());
74
-            Hierarchy.CrtLayerName = comboBox_CrtLayer.Text;
75
-
76
-
77
-            this.Close();
78
-            Hierarchy hier = new Hierarchy();
79
-            hier.hierarchy();
80
-        }
81
-
82
-        private void btn_Cancel_Click(object sender, EventArgs e)
83
-        {
84
-            this.Close();
85
-        }
86
-    }
87
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierak.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 91
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Hierarchy.cs 查看文件

@@ -1,91 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-using GrxCAD.ApplicationServices;
8
-using GrxCAD.DatabaseServices;
9
-using GrxCAD.EditorInput;
10
-
11
-
12
-namespace HCTools
13
-{
14
-    class Hierarchy
15
-    {
16
-        public static int gap;//等高距
17
-        public static string CrtLayerName;//当前等高线所在图层
18
-   
19
-        /// <summary>
20
-        /// 等高线分层
21
-        /// </summary>
22
-        public void hierarchy()
23
-        {
24
-            ObjectId[] ids = BasicFunction.getHeight(CrtLayerName);//存放获取的等高线id
25
-
26
-            //检查是否有计曲线图层,没有则创建
27
-            LayerControl layerscontrol = new LayerControl();
28
-            string Jilayname = "8120";
29
-            if (!layerscontrol.haslayername(Jilayname))
30
-            {
31
-                colorgb col = new colorgb(255, 255, 0);
32
-                layerscontrol.creatlayer(Jilayname, col);
33
-                layerscontrol.movelayertofront(Jilayname);
34
-            }
35
-            else
36
-                layerscontrol.movelayertofront(Jilayname);
37
-
38
-            //检查是否有首曲线图层,没有则创建
39
-            LayerControl layerscontrol1 = new LayerControl();
40
-            string Shoulayname = "8110";
41
-            if (!layerscontrol1.haslayername(Shoulayname))
42
-            {
43
-                colorgb col = new colorgb(0, 0, 0);
44
-                layerscontrol1.creatlayer(Shoulayname, col);
45
-                layerscontrol1.movelayertofront(Shoulayname);
46
-            }
47
-            else
48
-                layerscontrol1.movelayertofront(Shoulayname);
49
-
50
-
51
-            if (ids == null)
52
-                return;
53
-
54
-            for (int i = 0; i < ids.Length; i++)
55
-            {
56
-                Polyline pll = BasicFunction.GetDBObject(ids[i]) as Polyline;
57
-                if (Math.Round(pll.Elevation, 7, MidpointRounding.AwayFromZero) % (gap * 5) == 0 && pll.Layer != "8120")
58
-                {
59
-                    ChangeLayer(pll.Id, Jilayname);
60
-                }
61
-                if (Math.Round(pll.Elevation, 7, MidpointRounding.AwayFromZero) % (gap * 5) != 0 && pll.Layer != "8110")
62
-                {
63
-                    ChangeLayer(pll.Id, Shoulayname);
64
-                }
65
-                else
66
-                    continue;
67
-            }
68
-        }
69
-
70
-        
71
-
72
-
73
-        /// <summary>
74
-        /// 将计曲线移动到相应图层
75
-        /// </summary>
76
-        private void ChangeLayer(ObjectId c1Id, string LayerName)
77
-        {
78
-            Database db = HostApplicationServices.WorkingDatabase;
79
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
80
-            using (Transaction trans = db.TransactionManager.StartTransaction())
81
-            {
82
-                BlockTable bt = (BlockTable)trans.GetObject(db.BlockTableId, OpenMode.ForRead);
83
-                BlockTableRecord btr = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
84
-                Entity ent1 = (Entity)c1Id.GetObject(OpenMode.ForWrite);
85
-                ent1.Layer = LayerName;
86
-                trans.Commit();
87
-            }
88
-            doclock.Dispose();
89
-        }
90
-    }
91
-}

+ 0
- 132
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InstDOM.Designer.cs 查看文件

@@ -1,132 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class InstDOM
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label1 = new System.Windows.Forms.Label();
33
-            this.label2 = new System.Windows.Forms.Label();
34
-            this.textBox_dom = new System.Windows.Forms.TextBox();
35
-            this.textBox_dwg = new System.Windows.Forms.TextBox();
36
-            this.button_ok = new System.Windows.Forms.Button();
37
-            this.button_choose1 = new System.Windows.Forms.Button();
38
-            this.button_choose2 = new System.Windows.Forms.Button();
39
-            this.SuspendLayout();
40
-            // 
41
-            // label1
42
-            // 
43
-            this.label1.AutoSize = true;
44
-            this.label1.Location = new System.Drawing.Point(35, 46);
45
-            this.label1.Name = "label1";
46
-            this.label1.Size = new System.Drawing.Size(136, 15);
47
-            this.label1.TabIndex = 0;
48
-            this.label1.Text = "DOM文件所在位置:";
49
-            // 
50
-            // label2
51
-            // 
52
-            this.label2.AutoSize = true;
53
-            this.label2.Location = new System.Drawing.Point(35, 105);
54
-            this.label2.Name = "label2";
55
-            this.label2.Size = new System.Drawing.Size(136, 15);
56
-            this.label2.TabIndex = 1;
57
-            this.label2.Text = "DWG文件所在位置:";
58
-            // 
59
-            // textBox_dom
60
-            // 
61
-            this.textBox_dom.Location = new System.Drawing.Point(168, 36);
62
-            this.textBox_dom.Name = "textBox_dom";
63
-            this.textBox_dom.Size = new System.Drawing.Size(325, 25);
64
-            this.textBox_dom.TabIndex = 2;
65
-            // 
66
-            // textBox_dwg
67
-            // 
68
-            this.textBox_dwg.Location = new System.Drawing.Point(168, 95);
69
-            this.textBox_dwg.Name = "textBox_dwg";
70
-            this.textBox_dwg.Size = new System.Drawing.Size(325, 25);
71
-            this.textBox_dwg.TabIndex = 3;
72
-            // 
73
-            // button_ok
74
-            // 
75
-            this.button_ok.Location = new System.Drawing.Point(277, 144);
76
-            this.button_ok.Name = "button_ok";
77
-            this.button_ok.Size = new System.Drawing.Size(74, 33);
78
-            this.button_ok.TabIndex = 4;
79
-            this.button_ok.Text = "确 定";
80
-            this.button_ok.UseVisualStyleBackColor = true;
81
-            this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
82
-            // 
83
-            // button_choose1
84
-            // 
85
-            this.button_choose1.Location = new System.Drawing.Point(509, 31);
86
-            this.button_choose1.Name = "button_choose1";
87
-            this.button_choose1.Size = new System.Drawing.Size(76, 31);
88
-            this.button_choose1.TabIndex = 5;
89
-            this.button_choose1.Text = "选 择";
90
-            this.button_choose1.UseVisualStyleBackColor = true;
91
-            this.button_choose1.Click += new System.EventHandler(this.button_choose1_Click);
92
-            // 
93
-            // button_choose2
94
-            // 
95
-            this.button_choose2.Location = new System.Drawing.Point(509, 89);
96
-            this.button_choose2.Name = "button_choose2";
97
-            this.button_choose2.Size = new System.Drawing.Size(76, 31);
98
-            this.button_choose2.TabIndex = 6;
99
-            this.button_choose2.Text = "选 择";
100
-            this.button_choose2.UseVisualStyleBackColor = true;
101
-            this.button_choose2.Click += new System.EventHandler(this.button_choose2_Click);
102
-            // 
103
-            // InstDOM
104
-            // 
105
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
106
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
107
-            this.ClientSize = new System.Drawing.Size(641, 200);
108
-            this.Controls.Add(this.button_choose2);
109
-            this.Controls.Add(this.button_choose1);
110
-            this.Controls.Add(this.button_ok);
111
-            this.Controls.Add(this.textBox_dwg);
112
-            this.Controls.Add(this.textBox_dom);
113
-            this.Controls.Add(this.label2);
114
-            this.Controls.Add(this.label1);
115
-            this.Name = "InstDOM";
116
-            this.Text = "InstDOM";
117
-            this.ResumeLayout(false);
118
-            this.PerformLayout();
119
-
120
-        }
121
-
122
-        #endregion
123
-
124
-        private System.Windows.Forms.Label label1;
125
-        private System.Windows.Forms.Label label2;
126
-        private System.Windows.Forms.TextBox textBox_dom;
127
-        private System.Windows.Forms.TextBox textBox_dwg;
128
-        private System.Windows.Forms.Button button_ok;
129
-        private System.Windows.Forms.Button button_choose1;
130
-        private System.Windows.Forms.Button button_choose2;
131
-    }
132
-}

+ 0
- 45
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InstDOM.cs 查看文件

@@ -1,45 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.ComponentModel;
4
-using System.Data;
5
-using System.Drawing;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-using System.Windows.Forms;
10
-
11
-namespace HCTools
12
-{
13
-    public partial class InstDOM : Form
14
-    {
15
-        public InstDOM()
16
-        {
17
-            InitializeComponent();
18
-        }
19
-
20
-        private void button_choose1_Click(object sender, EventArgs e)
21
-        {
22
-            FolderBrowserDialog open = new FolderBrowserDialog();
23
-            open.Description = "请选择文件夹";
24
-            if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK)
25
-                textBox_dom.Text = open.SelectedPath;
26
-        }
27
-
28
-        private void button_choose2_Click(object sender, EventArgs e)
29
-        {
30
-            FolderBrowserDialog open = new FolderBrowserDialog();
31
-            open.Description = "请选择文件夹";
32
-            if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK)
33
-                textBox_dwg.Text = open.SelectedPath;
34
-        }
35
-
36
-        private void button_ok_Click(object sender, EventArgs e)
37
-        {
38
-            InsertDOM.dompath = textBox_dom.Text.ToString();
39
-            InsertDOM.dwgpath = textBox_dwg.Text.ToString();
40
-            InsertDOM instdom = new InsertDOM();
41
-            instdom.InsertDOMToCAD();
42
-            this.Close();
43
-        }
44
-    }
45
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InstDOM.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 579
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Inters.cs 查看文件

@@ -1,579 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-using GrxCAD.ApplicationServices;
8
-using GrxCAD.DatabaseServices;
9
-using GrxCAD.EditorInput;
10
-using GrxCAD.Geometry;
11
-
12
-namespace HCTools
13
-{
14
-    class Inters
15
-    {
16
-        public static int blc;//比例尺
17
-        public static string jqx;
18
-        public static string sqx;
19
-
20
-        //由于AUTOCAD的IntersectWith()函数在实体离开原点过远的情况下精确度会大幅下降,
21
-        //在进行相交检查时需要将待检查的实体都添加到一个块中,移动块到原点再进行检查,
22
-        //将检查后的标记也添加到块中,检查完后移动回原位。
23
-        #region 线自相交
24
-        public void SelfInts()
25
-        {
26
-            double flagradius = 4.0 * blc / 1000;//画圆标记半径
27
-            string layername = jqx + "," + sqx;
28
-
29
-            Document doc = Application.DocumentManager.MdiActiveDocument;
30
-            Database db = doc.Database;
31
-            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
32
-
33
-            TypedValue[] value = new TypedValue[]
34
-            {
35
-                new TypedValue((int)DxfCode.LayerName,layername),
36
-                new TypedValue((int)DxfCode.Start,"LWPOLYLINE")
37
-            };//设置筛选条件
38
-            SelectionFilter filter = new SelectionFilter(value);//选择区域中全部对象
39
-            //PromptSelectionResult psr = ed.SelectAll(filter);// 要求在图形区域中手动选择对象
40
-            PromptSelectionResult psr = ed.GetSelection(filter);
41
-            
42
-            if (psr.Status == PromptStatus.OK)
43
-            {
44
-                Point3dCollection intersectPts = new Point3dCollection();
45
-                int j = 0;
46
-
47
-                SelectionSet ss = psr.Value;
48
-                if (ss == null)
49
-                    return;
50
-
51
-                //创建标注相交点符号的图层
52
-                LayerControl layerscontrol = new LayerControl();
53
-                string layname = "线自相交点";
54
-                if (!layerscontrol.haslayername(layname))
55
-                {
56
-                    colorgb col = new colorgb(255, 0, 255);
57
-                    layerscontrol.creatlayer(layname, col);
58
-                    layerscontrol.movelayertofront(layname);
59
-                }
60
-                else
61
-                    layerscontrol.movelayertofront(layname);
62
-
63
-                ObjectIdCollection idcoll1 = new ObjectIdCollection(ss.GetObjectIds());//需要添加到块中的实体
64
-                ObjectIdCollection idcoll2 = new ObjectIdCollection();//explode后重新添加到数据库的实体
65
-                ObjectIdCollection idcoll3 = new ObjectIdCollection();//添加标记后实体
66
-                Point3d MoveToPt = new Point3d(0, 0, 0);//目标点
67
-                Point3d SelfPt = new Point3d();//基点
68
-
69
-                //将选中多段线添加到块中并移动
70
-                DBObjectCollection objcoll = MovebyBlock(idcoll1, out SelfPt, MoveToPt);
71
-
72
-                //将explode之后的实体重新添加到数据库中并检查是否自相交
73
-                foreach (Polyline ent in objcoll)
74
-                {
75
-                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
76
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
77
-                    {
78
-                        BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
79
-                        BlockTableRecord blocktablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace],
80
-                            OpenMode.ForWrite) as BlockTableRecord;
81
-                        blocktablerecord.AppendEntity(ent);
82
-                        trans.AddNewlyCreatedDBObject(ent, true);
83
-                        idcoll2.Add(ent.Id);
84
-                        trans.Commit();
85
-                    }
86
-                    doclock.Dispose();
87
-                }
88
-
89
-                for(int i =0;i<idcoll2.Count;i++)
90
-                {
91
-                    Polyline pll = BasicFunction.GetDBObject(idcoll2[i]) as Polyline;
92
-                    SelfIntersectDetect(pll, out intersectPts);
93
-                    idcoll3.Add(idcoll2[i]);
94
-                    if (intersectPts.Count != 0)
95
-                    {
96
-                        j += intersectPts.Count;
97
-                        foreach (Point3d pt in intersectPts)
98
-                        {
99
-                            Makeflag(pt.X, pt.Y, pt.Z, flagradius, "线自相交点", idcoll3);
100
-                        }
101
-                    }
102
-                    else
103
-                        continue;
104
-                }
105
-
106
-                //将检查后的所有实体添加到块中并移动
107
-                Point3d Self = new Point3d();
108
-                Point3d MoveTo = SelfPt;
109
-                DBObjectCollection objcoll1 = MovebyBlock(idcoll3, out Self, MoveTo);
110
-
111
-                //将explode之后的实体添加到数据库中
112
-                foreach (Entity ent in objcoll1)
113
-                {
114
-                    ObjectIdCollection idcoll = new ObjectIdCollection();
115
-
116
-                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
117
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
118
-                    {
119
-                        BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
120
-                        BlockTableRecord blocktablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace],
121
-                            OpenMode.ForWrite) as BlockTableRecord;
122
-                        blocktablerecord.AppendEntity(ent);
123
-                        trans.AddNewlyCreatedDBObject(ent, true);
124
-                        DrawOrderTable orderTable = trans.GetObject(blocktablerecord.DrawOrderTableId, OpenMode.ForWrite) as DrawOrderTable;
125
-                        idcoll.Add(ent.Id);
126
-                        orderTable.MoveToBottom(idcoll);
127
-                        trans.Commit();
128
-                    }
129
-                    doclock.Dispose();
130
-                }
131
-                ed.WriteMessage("有" + j.ToString() + "个交点");
132
-            }
133
-        }
134
-
135
-        /// <summary>
136
-        /// 线自相交检查
137
-        /// </summary>
138
-        private static bool SelfIntersectDetect(Polyline pPolyline, out Point3dCollection intersectPoint3Ds)
139
-        {
140
-            intersectPoint3Ds = new Point3dCollection();
141
-            try
142
-            {
143
-                // 自身与自身相交结果(包含顶点和相交点)
144
-                var intersectWithResult = new Point3dCollection();
145
-                //pPolyline.IntersectWith(pPolyline, Intersect.OnBothOperands, intersectWithResult, IntPtr.Zero, IntPtr.Zero);
146
-
147
-                // 存储顶点
148
-                List<Point3d> vertices = new List<Point3d>();
149
-                int count = pPolyline.NumberOfVertices;
150
-                for (int j = 0; j < count; j++)
151
-                {
152
-                    Point3d pt = pPolyline.GetPoint3dAt(j);
153
-                    //Point3d pt1 = new Point3d(Math.Round(pt.X, 6), Math.Round(pt.Y, 6), Math.Round(pt.Z, 6));
154
-                    vertices.Add(pt);
155
-                }
156
-                for (int i = 0; i < count - 2; i++)
157
-                {
158
-                    LineSegment3d lsgment0 = pPolyline.GetLineSegmentAt(i);
159
-                    for (int ii = i + 1; ii < count - 1; ii++)
160
-                    {
161
-                        LineSegment3d lsgment1 = pPolyline.GetLineSegmentAt(ii);
162
-                        Point3d[] itpt = lsgment0.IntersectWith(lsgment1);
163
-                        if (itpt != null)
164
-                        {
165
-                            foreach (Point3d pt in itpt)
166
-                            {
167
-                                intersectWithResult.Add(pt);
168
-                            }
169
-                        }
170
-                    }
171
-                    if (i == 0)
172
-                    {
173
-                        if (intersectWithResult.Count > 1)
174
-                        {
175
-                            for (int j = 0; j < intersectWithResult.Count - 1; j++)
176
-                            {
177
-                                for (int jj = j + 1; jj < intersectWithResult.Count; jj++)
178
-                                {
179
-                                    if (intersectWithResult[j] == intersectWithResult[jj]&&
180
-                                        !intersectPoint3Ds.Contains(intersectWithResult[jj]))
181
-                                    {
182
-                                        intersectPoint3Ds.Add(intersectWithResult[jj]);
183
-                                    }
184
-                                }
185
-                            }
186
-                            foreach (Point3d pt in intersectWithResult)
187
-                            {
188
-                                if (pt == vertices[1])
189
-                                    continue;
190
-                                else
191
-                                { 
192
-                                    if(!intersectPoint3Ds.Contains(pt))
193
-                                        intersectPoint3Ds.Add(pt);
194
-                                }
195
-                            }
196
-                        }
197
-                    }
198
-                    else if (i == count - 3)
199
-                    {
200
-                        if (intersectWithResult.Count > 1)
201
-                        {
202
-                            for (int j = 0; j < intersectWithResult.Count - 1; j++)
203
-                            {
204
-                                for (int jj = j + 1; jj < intersectWithResult.Count; jj++)
205
-                                {
206
-                                    if (intersectWithResult[j] == intersectWithResult[jj] &&
207
-                                        !intersectPoint3Ds.Contains(intersectWithResult[jj]))
208
-                                    {
209
-                                        intersectPoint3Ds.Add(intersectWithResult[jj]);
210
-                                    }
211
-                                }
212
-                            }
213
-                            foreach (Point3d pt in intersectWithResult)
214
-                            {
215
-                                if (pt == vertices[i])
216
-                                    continue;
217
-                                else
218
-                                {
219
-                                    if (!intersectPoint3Ds.Contains(pt))
220
-                                        intersectPoint3Ds.Add(pt);
221
-                                }
222
-                            }
223
-                        }
224
-                    }
225
-                    else
226
-                    {
227
-                        if (intersectWithResult.Count > 1)
228
-                        {
229
-                            for (int j = 0; j < intersectWithResult.Count - 1; j++)
230
-                            {
231
-                                for (int jj = j + 1; jj < intersectWithResult.Count; jj++)
232
-                                {
233
-                                    if (intersectWithResult[j] == intersectWithResult[jj] &&
234
-                                        !intersectPoint3Ds.Contains(intersectWithResult[jj]))
235
-                                    {
236
-                                        intersectPoint3Ds.Add(intersectWithResult[jj]);
237
-                                    }
238
-                                }
239
-                            }
240
-                            foreach (Point3d pt in intersectWithResult)
241
-                            {
242
-                                if (pt == vertices[i]||pt == vertices[i + 1])
243
-                                    continue;
244
-                                else
245
-                                {
246
-                                    if (!intersectPoint3Ds.Contains(pt))
247
-                                        intersectPoint3Ds.Add(pt);
248
-                                }
249
-                            }
250
-                        }
251
-                    }
252
-                    intersectWithResult.Clear();
253
-                }
254
-                return true;
255
-            }
256
-            catch (Exception ex)
257
-            {
258
-                string str = ex.ToString();
259
-                Application.ShowAlertDialog(str);
260
-                return false;
261
-            }
262
-        }
263
-        #endregion
264
-
265
-
266
-
267
-
268
-        #region 线相交
269
-        public void Ints()
270
-        {
271
-            double flagradius = 4.0 * blc / 1000;//画圆标记半径
272
-
273
-            Document doc = Application.DocumentManager.MdiActiveDocument;
274
-            Database db = doc.Database;
275
-            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
276
-            string layername = jqx + "," + sqx;
277
-
278
-            TypedValue[] value = new TypedValue[]
279
-            {
280
-                new TypedValue((int)DxfCode.LayerName,layername),
281
-                new TypedValue((int)DxfCode.Start,"LWPOLYLINE")
282
-            };//设置筛选条件
283
-            SelectionFilter filter = new SelectionFilter(value);//选择区域中全部对象
284
-            //PromptSelectionResult psr = ed.SelectAll(filter);// 要求在图形区域中手动选择对象
285
-            PromptSelectionResult psr = ed.GetSelection(filter);
286
-
287
-
288
-            if (psr.Status == PromptStatus.OK)
289
-            {
290
-                List<Point3d> intersectPts = new List<Point3d>();
291
-                int j = 0;
292
-
293
-                SelectionSet ss = psr.Value;
294
-                if (ss == null)
295
-                    return;
296
-
297
-                //创建标注相交点符号的图层
298
-                LayerControl layerscontrol = new LayerControl();
299
-                string layname = "线相交点";
300
-                if (!layerscontrol.haslayername(layname))
301
-                {
302
-                    colorgb col = new colorgb(0, 0, 255);
303
-                    layerscontrol.creatlayer(layname, col);
304
-                    layerscontrol.movelayertofront(layname);
305
-                }
306
-                else
307
-                    layerscontrol.movelayertofront(layname);
308
-
309
-
310
-                ObjectIdCollection idcoll1 = new ObjectIdCollection(ss.GetObjectIds());//需要添加到块中的实体
311
-                ObjectIdCollection idcoll2 = new ObjectIdCollection();//explode之后的实体
312
-                Point3d MoveToPt = new Point3d(0, 0, 0);//目标点
313
-                Point3d SelfPt = new Point3d();//基点
314
-
315
-                //将选中多段线添加到块中并移动
316
-                DBObjectCollection objcoll = MovebyBlock(idcoll1, out SelfPt, MoveToPt);
317
-
318
-                //将explode之后的实体重新添加到数据库中
319
-                foreach (Entity ent in objcoll)
320
-                {
321
-                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
322
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
323
-                    {
324
-                        BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
325
-                        BlockTableRecord blocktablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace],
326
-                            OpenMode.ForWrite) as BlockTableRecord;
327
-                        blocktablerecord.AppendEntity(ent);
328
-                        trans.AddNewlyCreatedDBObject(ent, true);
329
-                        idcoll2.Add(ent.Id);
330
-                        trans.Commit();
331
-                    }
332
-                    doclock.Dispose();
333
-                }
334
-
335
-                #region//检查线相交情况
336
-                ////检查线相交情况
337
-                //int num = 0;
338
-                //int numb = 0;//记录无法判断的实体数量
339
-                //ObjectIdCollection objidcoll_check = new ObjectIdCollection();
340
-                //List<Point3d> interpoint = new List<Point3d>();
341
-                //for (int i = 0; i < objcoll.Count; i++)
342
-                //{
343
-                //    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
344
-                //    using (Transaction trans = db.TransactionManager.StartTransaction())
345
-                //    {
346
-                //        Polyline pll1 = trans.GetObject(objcoll[i].Id, OpenMode.ForWrite) as Polyline;
347
-                //        ObjectIdCollection pllids = GetIntersectPlline(pll1,out num);//获取附近多段线
348
-                //        numb = numb + num;
349
-
350
-                //        //根据获取的多段线进行相交检查
351
-                //        for (int ii = 0; ii < pllids.Count; ii++)
352
-                //        {
353
-                //            if (objidcoll_check.Contains(pllids[ii]))
354
-                //                continue;
355
-                //            Polyline pll2 = trans.GetObject(pllids[ii], OpenMode.ForWrite) as Polyline;
356
-                //            EachIntersect(pll1, pll2, out intersectPts);
357
-                //            foreach (Point3d pt in intersectPts)
358
-                //            {
359
-                //                interpoint.Add(pt);
360
-                //            }
361
-                //        }
362
-                //        if (intersectPts.Count != 0)
363
-                //            objidcoll_check.Add(objcoll[i].Id);
364
-
365
-                //        trans.Commit();
366
-                //        doclock.Dispose();
367
-                //    }
368
-                //}
369
-                #endregion
370
-
371
-                //检查线相交情况
372
-                ObjectIdCollection objidcoll_check = new ObjectIdCollection();
373
-                List<Point3d> interpoint = new List<Point3d>();
374
-                for (int i = 0; i < objcoll.Count - 1; i++)
375
-                {
376
-                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
377
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
378
-                    {
379
-                        Polyline pll1 = trans.GetObject(objcoll[i].Id, OpenMode.ForWrite) as Polyline;
380
-                        for (int ii = i + 1; ii < objcoll.Count; ii++)
381
-                        {
382
-                            Polyline pll2 = trans.GetObject(objcoll[ii].Id, OpenMode.ForWrite) as Polyline;
383
-                            EachIntersect(pll1, pll2, out intersectPts);
384
-                            foreach (Point3d pt in intersectPts)
385
-                            {
386
-                                interpoint.Add(pt);
387
-                            }
388
-                        }
389
-                        if (intersectPts.Count != 0)
390
-                            objidcoll_check.Add(objcoll[i].Id);
391
-
392
-                        trans.Commit();
393
-                        doclock.Dispose();
394
-                    }
395
-
396
-                    if (interpoint.Count != 0)
397
-                    {
398
-                        j = interpoint.Count;
399
-                        foreach (Point3d pt in interpoint)
400
-                        {
401
-                            Makeflag(pt.X, pt.Y, pt.Z, flagradius, "线相交点", idcoll2);
402
-                        }
403
-                    }
404
-                }
405
-
406
-                //将检查后的实体都添加到块中并移动
407
-                Point3d Self = new Point3d();
408
-                Point3d MoveTo = SelfPt;
409
-                DBObjectCollection objcoll1 = MovebyBlock(idcoll2, out Self, MoveTo);
410
-
411
-                //将explode之后的实体添加到数据库中
412
-                foreach (Entity ent in objcoll1)
413
-                {
414
-                    ObjectIdCollection idcoll = new ObjectIdCollection();
415
-
416
-                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
417
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
418
-                    {
419
-                        BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
420
-                        BlockTableRecord blocktablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace],
421
-                            OpenMode.ForWrite) as BlockTableRecord;
422
-                        blocktablerecord.AppendEntity(ent);
423
-                        trans.AddNewlyCreatedDBObject(ent, true);
424
-                        DrawOrderTable orderTable = trans.GetObject(blocktablerecord.DrawOrderTableId, OpenMode.ForWrite) as DrawOrderTable;
425
-                        idcoll.Add(ent.Id);
426
-                        orderTable.MoveToBottom(idcoll);
427
-                        trans.Commit();
428
-                    }
429
-                    doclock.Dispose();
430
-                }
431
-                ed.WriteMessage("有" + j.ToString() + "个交点");
432
-                //ed.WriteMessage("\n有" + numb.ToString() + "处无法判断");
433
-            }
434
-        }
435
-
436
-
437
-        /// <summary>
438
-        /// 获取附近多段线
439
-        /// </summary>
440
-        private static ObjectIdCollection GetIntersectPlline(Polyline pll, out int num)
441
-        {
442
-            num = 0;
443
-            ObjectIdCollection objidcoll = new ObjectIdCollection();
444
-            DBObjectCollection objcoll = new DBObjectCollection();
445
-            Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
446
-            Point3dCollection ptcoll = new Point3dCollection();
447
-
448
-            //检查是否有相交线
449
-            pll.GetStretchPoints(ptcoll);
450
-
451
-            TypedValue[] vl = new TypedValue[]
452
-            {
453
-                new TypedValue((int)DxfCode.LayerName,"8110,8120"),
454
-                new TypedValue((int)DxfCode.Start,"LWPOLYLINE")
455
-            };//设置筛选条件
456
-            SelectionFilter selefilter = new SelectionFilter(vl);//选择区域中全部对象
457
-            //PromptSelectionResult psr = ed.SelectAll(filter);// 要求在图形区域中手动选择对象
458
-
459
-
460
-            //SelectFence()无法找到不在当前视图的实体,需要将视图转移到实体所在的位置
461
-            dynamic acadApp = Application.AcadApplication;
462
-            acadApp.ZoomExtents();
463
-            PromptSelectionResult seleresult = editor.SelectFence(ptcoll, selefilter);
464
-            acadApp.ZoomPrevious();
465
-
466
-
467
-            if (seleresult.Status == PromptStatus.OK)
468
-            {
469
-                SelectionSet selectionset = seleresult.Value;
470
-                objidcoll = new ObjectIdCollection(selectionset.GetObjectIds());
471
-                if (objidcoll.Contains(pll.Id))
472
-                    objidcoll.Remove(pll.Id);
473
-            }
474
-            return objidcoll;
475
-        }
476
-
477
-
478
-        /// <summary>
479
-        /// 线相交检查
480
-        /// </summary>
481
-        private static bool EachIntersect(Polyline oPolyline, Polyline tPolyline, out List<Point3d> intersectPoint3Ds)
482
-        {
483
-            intersectPoint3Ds = new List<Point3d>();
484
-            try
485
-            {
486
-                //两线相交结果
487
-                var intersectWithResult = new Point3dCollection();
488
-                double temp = oPolyline.Elevation;
489
-                oPolyline.Elevation = tPolyline.Elevation;
490
-                oPolyline.IntersectWith(tPolyline, Intersect.OnBothOperands, intersectWithResult, IntPtr.Zero, IntPtr.Zero);
491
-
492
-                if (intersectWithResult.Count!=0)
493
-                {
494
-                    for (int i = 0; i < intersectWithResult.Count; i++)
495
-                        intersectPoint3Ds.Add(intersectWithResult[i]);
496
-                }
497
-                oPolyline.Elevation = temp;
498
-                return true;
499
-            }
500
-            catch (Exception ex)
501
-            {
502
-                string str = ex.ToString();
503
-                Application.ShowAlertDialog(str);
504
-                return false;
505
-            }
506
-        }
507
-        #endregion
508
-
509
-
510
-        /// <summary>
511
-        /// 将多段线添加到块后将块移动到目标位置并explode
512
-        /// </summary>
513
-        private static DBObjectCollection MovebyBlock(ObjectIdCollection idcoll, out Point3d SelfPt, Point3d MoveToPt)
514
-        {
515
-            Document doc = Application.DocumentManager.MdiActiveDocument;
516
-            Database db = doc.Database;
517
-
518
-            DBObjectCollection objcoll = new DBObjectCollection();//explode后的实体
519
-            ObjectId btrid = new ObjectId();//块id
520
-
521
-
522
-            DocumentLock documentlock1 = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
523
-            using (Transaction trans = db.TransactionManager.StartTransaction())
524
-            {
525
-                BlockTable bt = trans.GetObject(db.BlockTableId, OpenMode.ForWrite) as BlockTable;
526
-                BlockTableRecord btr = new BlockTableRecord();
527
-                Polyline pll = trans.GetObject(idcoll[0], OpenMode.ForRead) as Polyline;
528
-                btr.Name = "BLK";
529
-                bt.UpgradeOpen();
530
-                btrid = bt.Add(btr);
531
-                trans.AddNewlyCreatedDBObject(btr, true);
532
-                btr.AssumeOwnershipOf(idcoll);
533
-                btr.Origin = pll.StartPoint;
534
-                SelfPt = pll.StartPoint;
535
-
536
-                BlockTableRecord ms = (BlockTableRecord)trans.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
537
-                BlockReference br = new BlockReference(pll.StartPoint, btrid);
538
-                Vector3d acVec3d = SelfPt.GetVectorTo(MoveToPt);
539
-                br.TransformBy(Matrix3d.Displacement(acVec3d));
540
-
541
-                ms.AppendEntity(br);
542
-                trans.AddNewlyCreatedDBObject(br, true);
543
-                br.Explode(objcoll);
544
-                btr.UpgradeOpen();
545
-                btr.Erase();
546
-                trans.Commit();
547
-            }
548
-            documentlock1.Dispose();
549
-            return objcoll;
550
-        }
551
-
552
-        /// <summary>
553
-        /// 错误标记
554
-        /// </summary>
555
-        private void Makeflag(double x, double y, double z, double radius, string layername, ObjectIdCollection idcoll)
556
-        {
557
-            Database database = HostApplicationServices.WorkingDatabase;
558
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
559
-            using (Transaction traction = database.TransactionManager.StartTransaction())
560
-            {
561
-                BlockTable blocktable = traction.GetObject(database.BlockTableId,OpenMode.ForWrite) as BlockTable;
562
-                BlockTableRecord blocktablerecord = traction.GetObject(blocktable[BlockTableRecord.ModelSpace],
563
-                                               OpenMode.ForWrite) as BlockTableRecord;
564
-                Circle circ = new Circle();
565
-                circ.Center = new Point3d(x, y, z);
566
-                circ.Radius = radius;
567
-                circ.Normal = new Vector3d(0, 0, 1);
568
-                circ.SetDatabaseDefaults();
569
-                circ.Layer = layername;
570
-                blocktablerecord.AppendEntity(circ);
571
-                traction.AddNewlyCreatedDBObject(circ, true);
572
-                idcoll.Add(circ.Id);
573
-                traction.Commit();
574
-                //traction.Dispose();
575
-            }
576
-            doclock.Dispose();
577
-        }
578
-    }
579
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Layerchange_Form.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 186
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PLError_Overlay.Designer.cs 查看文件

@@ -1,186 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class PLError_Overlay
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label_ElePoint = new System.Windows.Forms.Label();
33
-            this.comboBox_blc = new System.Windows.Forms.ComboBox();
34
-            this.label_Jqx = new System.Windows.Forms.Label();
35
-            this.label_Blc = new System.Windows.Forms.Label();
36
-            this.comboBox_ElePoint = new System.Windows.Forms.ComboBox();
37
-            this.comboBox_jqx = new System.Windows.Forms.ComboBox();
38
-            this.comboBox_sqx = new System.Windows.Forms.ComboBox();
39
-            this.label_Sqx = new System.Windows.Forms.Label();
40
-            this.btn_Cancel = new System.Windows.Forms.Button();
41
-            this.btn_OK = new System.Windows.Forms.Button();
42
-            this.SuspendLayout();
43
-            // 
44
-            // label_ElePoint
45
-            // 
46
-            this.label_ElePoint.AutoSize = true;
47
-            this.label_ElePoint.Location = new System.Drawing.Point(79, 36);
48
-            this.label_ElePoint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
49
-            this.label_ElePoint.Name = "label_ElePoint";
50
-            this.label_ElePoint.Size = new System.Drawing.Size(150, 15);
51
-            this.label_ElePoint.TabIndex = 52;
52
-            this.label_ElePoint.Text = "高程点所在图层选择:";
53
-            // 
54
-            // comboBox_blc
55
-            // 
56
-            this.comboBox_blc.FormattingEnabled = true;
57
-            this.comboBox_blc.Items.AddRange(new object[] {
58
-            "1:500",
59
-            "1:1000",
60
-            "1:2000",
61
-            "1:5000"});
62
-            this.comboBox_blc.Location = new System.Drawing.Point(248, 201);
63
-            this.comboBox_blc.Margin = new System.Windows.Forms.Padding(4);
64
-            this.comboBox_blc.Name = "comboBox_blc";
65
-            this.comboBox_blc.Size = new System.Drawing.Size(161, 23);
66
-            this.comboBox_blc.TabIndex = 59;
67
-            // 
68
-            // label_Jqx
69
-            // 
70
-            this.label_Jqx.AutoSize = true;
71
-            this.label_Jqx.Location = new System.Drawing.Point(79, 151);
72
-            this.label_Jqx.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
73
-            this.label_Jqx.Name = "label_Jqx";
74
-            this.label_Jqx.Size = new System.Drawing.Size(150, 15);
75
-            this.label_Jqx.TabIndex = 56;
76
-            this.label_Jqx.Text = "计曲线所在图层选择:";
77
-            // 
78
-            // label_Blc
79
-            // 
80
-            this.label_Blc.AutoSize = true;
81
-            this.label_Blc.Location = new System.Drawing.Point(79, 204);
82
-            this.label_Blc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
83
-            this.label_Blc.Name = "label_Blc";
84
-            this.label_Blc.Size = new System.Drawing.Size(90, 15);
85
-            this.label_Blc.TabIndex = 58;
86
-            this.label_Blc.Text = "比例尺选择:";
87
-            // 
88
-            // comboBox_ElePoint
89
-            // 
90
-            this.comboBox_ElePoint.FormattingEnabled = true;
91
-            this.comboBox_ElePoint.Location = new System.Drawing.Point(248, 33);
92
-            this.comboBox_ElePoint.Margin = new System.Windows.Forms.Padding(4);
93
-            this.comboBox_ElePoint.MaxDropDownItems = 30;
94
-            this.comboBox_ElePoint.Name = "comboBox_ElePoint";
95
-            this.comboBox_ElePoint.Size = new System.Drawing.Size(161, 23);
96
-            this.comboBox_ElePoint.TabIndex = 53;
97
-            // 
98
-            // comboBox_jqx
99
-            // 
100
-            this.comboBox_jqx.FormattingEnabled = true;
101
-            this.comboBox_jqx.Location = new System.Drawing.Point(248, 143);
102
-            this.comboBox_jqx.Margin = new System.Windows.Forms.Padding(4);
103
-            this.comboBox_jqx.MaxDropDownItems = 30;
104
-            this.comboBox_jqx.Name = "comboBox_jqx";
105
-            this.comboBox_jqx.Size = new System.Drawing.Size(161, 23);
106
-            this.comboBox_jqx.TabIndex = 57;
107
-            // 
108
-            // comboBox_sqx
109
-            // 
110
-            this.comboBox_sqx.FormattingEnabled = true;
111
-            this.comboBox_sqx.Location = new System.Drawing.Point(248, 86);
112
-            this.comboBox_sqx.Margin = new System.Windows.Forms.Padding(4);
113
-            this.comboBox_sqx.MaxDropDownItems = 30;
114
-            this.comboBox_sqx.Name = "comboBox_sqx";
115
-            this.comboBox_sqx.Size = new System.Drawing.Size(161, 23);
116
-            this.comboBox_sqx.TabIndex = 55;
117
-            // 
118
-            // label_Sqx
119
-            // 
120
-            this.label_Sqx.AutoSize = true;
121
-            this.label_Sqx.Location = new System.Drawing.Point(79, 94);
122
-            this.label_Sqx.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
123
-            this.label_Sqx.Name = "label_Sqx";
124
-            this.label_Sqx.Size = new System.Drawing.Size(150, 15);
125
-            this.label_Sqx.TabIndex = 54;
126
-            this.label_Sqx.Text = "首曲线所在图层选择:";
127
-            // 
128
-            // btn_Cancel
129
-            // 
130
-            this.btn_Cancel.Location = new System.Drawing.Point(291, 257);
131
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
132
-            this.btn_Cancel.Name = "btn_Cancel";
133
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
134
-            this.btn_Cancel.TabIndex = 61;
135
-            this.btn_Cancel.Text = "取 消";
136
-            this.btn_Cancel.UseVisualStyleBackColor = true;
137
-            this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
138
-            // 
139
-            // btn_OK
140
-            // 
141
-            this.btn_OK.Location = new System.Drawing.Point(140, 256);
142
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
143
-            this.btn_OK.Name = "btn_OK";
144
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
145
-            this.btn_OK.TabIndex = 60;
146
-            this.btn_OK.Text = "确 定";
147
-            this.btn_OK.UseVisualStyleBackColor = true;
148
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
149
-            // 
150
-            // PLError_Overlay
151
-            // 
152
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
153
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
154
-            this.ClientSize = new System.Drawing.Size(512, 316);
155
-            this.Controls.Add(this.btn_Cancel);
156
-            this.Controls.Add(this.btn_OK);
157
-            this.Controls.Add(this.label_ElePoint);
158
-            this.Controls.Add(this.comboBox_blc);
159
-            this.Controls.Add(this.label_Jqx);
160
-            this.Controls.Add(this.label_Blc);
161
-            this.Controls.Add(this.comboBox_ElePoint);
162
-            this.Controls.Add(this.comboBox_jqx);
163
-            this.Controls.Add(this.comboBox_sqx);
164
-            this.Controls.Add(this.label_Sqx);
165
-            this.Name = "PLError_Overlay";
166
-            this.Text = "点线矛盾检查";
167
-            this.Load += new System.EventHandler(this.PLError_Load);
168
-            this.ResumeLayout(false);
169
-            this.PerformLayout();
170
-
171
-        }
172
-
173
-        #endregion
174
-
175
-        private System.Windows.Forms.Label label_ElePoint;
176
-        private System.Windows.Forms.ComboBox comboBox_blc;
177
-        private System.Windows.Forms.Label label_Jqx;
178
-        private System.Windows.Forms.Label label_Blc;
179
-        private System.Windows.Forms.ComboBox comboBox_ElePoint;
180
-        private System.Windows.Forms.ComboBox comboBox_jqx;
181
-        private System.Windows.Forms.ComboBox comboBox_sqx;
182
-        private System.Windows.Forms.Label label_Sqx;
183
-        private System.Windows.Forms.Button btn_Cancel;
184
-        private System.Windows.Forms.Button btn_OK;
185
-    }
186
-}

+ 0
- 177
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PLError_Overlay.cs 查看文件

@@ -1,177 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.ComponentModel;
4
-using System.Data;
5
-using System.Drawing;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-using System.Windows.Forms;
10
-using GrxCAD.EditorInput;
11
-using GrxCAD.DatabaseServices;
12
-using GrxCAD.Geometry;
13
-
14
-namespace HCTools
15
-{
16
-    public partial class PLError_Overlay : Form
17
-    {
18
-        public PLError_Overlay()
19
-        {
20
-            InitializeComponent();
21
-        }
22
-
23
-        private void PLError_Load(object sender, EventArgs e)
24
-        {
25
-            if (MainClass.Flag == "PLError" )
26
-            {
27
-                this.Text = "点线矛盾";
28
-            }
29
-            if (MainClass.Flag == "PLOverlap")
30
-            {
31
-                this.Text = "点线重叠";
32
-            }
33
-            this.comboBox_ElePoint.DropDownStyle = ComboBoxStyle.DropDownList;
34
-            this.comboBox_blc.DropDownStyle = ComboBoxStyle.DropDownList;
35
-            this.comboBox_sqx.DropDownStyle = ComboBoxStyle.DropDownList;
36
-            this.comboBox_jqx.DropDownStyle = ComboBoxStyle.DropDownList;
37
-
38
-            //this.MaximizeBox = false;
39
-            //this.StartPosition = FormStartPosition.CenterScreen;
40
-
41
-
42
-            //参数清零
43
-            //CheckPLOverlay.EleLayerName = null;
44
-            //CheckPLOverlay.sqx = null;
45
-            //CheckPLOverlay.jqx = null;
46
-            //CheckPLOverlay.blc = 0;
47
-
48
-
49
-            //自动填充下拉框
50
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
51
-            using (Transaction traction = database.TransactionManager.StartTransaction())
52
-            {
53
-                //存放所有图层名
54
-                List<string> alllayername = new List<string>();
55
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
56
-                foreach (ObjectId objid in layertable)
57
-                {
58
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
59
-                    alllayername.Add(layertablerecord.Name);
60
-                }
61
-                alllayername.Sort();
62
-
63
-                for (int i = 0; i < alllayername.Count; i++)
64
-                {
65
-                    this.comboBox_ElePoint.Items.Add(alllayername[i]);
66
-                    this.comboBox_sqx.Items.Add(alllayername[i]);
67
-                    this.comboBox_jqx.Items.Add(alllayername[i]);
68
-                }
69
-
70
-                if (alllayername.Contains("8300"))
71
-                {
72
-                    int index = alllayername.IndexOf("8300");
73
-                    this.comboBox_ElePoint.SelectedIndex = index;
74
-                }
75
-                if (alllayername.Contains("8110"))
76
-                {
77
-                    int index = alllayername.IndexOf("8110");
78
-                    this.comboBox_sqx.SelectedIndex = index;
79
-                }
80
-                if (alllayername.Contains("8120"))
81
-                {
82
-                    int index = alllayername.IndexOf("8120");
83
-                    this.comboBox_jqx.SelectedIndex = index;
84
-                }
85
-                traction.Commit();
86
-            }
87
-        }
88
-
89
-        private void btn_OK_Click(object sender, EventArgs e)
90
-        {
91
-            if (MainClass.Flag == "PLOverlap")
92
-            {
93
-                if (comboBox_ElePoint.Text == "")
94
-                {
95
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择高程点图层");
96
-                    return;
97
-                }
98
-                if (comboBox_blc.Text == "")
99
-                {
100
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
101
-                    return;
102
-                }
103
-                if (comboBox_sqx.Text == "")
104
-                {
105
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择首曲线图层");
106
-                    return;
107
-                }
108
-                if (comboBox_jqx.Text == "")
109
-                {
110
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择计曲线图层");
111
-                    return;
112
-                }
113
-
114
-                CheckPLOverlay.EleLayerName = comboBox_ElePoint.Text;
115
-                CheckPLOverlay.sqx = comboBox_sqx.Text;
116
-                CheckPLOverlay.jqx = comboBox_jqx.Text;
117
-
118
-                //比例尺
119
-                string blctext = comboBox_blc.Text;
120
-                int blcindex = blctext.LastIndexOf(':');
121
-                string strblc = blctext.Substring(blcindex + 1);
122
-                CheckPLOverlay.blc = Convert.ToInt32(strblc);
123
-
124
-
125
-                this.Close();
126
-                CheckPLOverlay plcon = new CheckPLOverlay();
127
-                plcon.contourch();
128
-            }
129
-
130
-            if (MainClass.Flag == "PLError")
131
-            {
132
-
133
-                if (comboBox_ElePoint.Text == "")
134
-                {
135
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择高程点图层");
136
-                    return;
137
-                }
138
-                if (comboBox_blc.Text == "")
139
-                {
140
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
141
-                    return;
142
-                }
143
-                if (comboBox_sqx.Text == "")
144
-                {
145
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择首曲线图层");
146
-                    return;
147
-                }
148
-                if (comboBox_jqx.Text == "")
149
-                {
150
-                    GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择计曲线图层");
151
-                    return;
152
-                }
153
-
154
-                ChPLContradiction.elevationLayer = comboBox_ElePoint.Text;
155
-                ChPLContradiction.sqx = comboBox_sqx.Text;
156
-                ChPLContradiction.jqx = comboBox_jqx.Text;
157
-
158
-
159
-                //比例尺
160
-                string blctext = comboBox_blc.Text;
161
-                int blcindex = blctext.LastIndexOf(':');
162
-                string strblc = blctext.Substring(blcindex + 1);
163
-                int rade = Convert.ToInt32(strblc);
164
-                ChPLContradiction.blc = rade;
165
-
166
-                this.Close();
167
-                ChPLContradiction chplc = new ChPLContradiction();
168
-                chplc.contourch();
169
-            }
170
-        }
171
-
172
-        private void btn_Cancel_Click(object sender, EventArgs e)
173
-        {
174
-            this.Close();
175
-        }
176
-    }
177
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PLError_Overlay.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 114
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PicPts.Designer.cs 查看文件

@@ -1,114 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class PicPts
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label_Decimal = new System.Windows.Forms.Label();
33
-            this.comboBox_Decimal = new System.Windows.Forms.ComboBox();
34
-            this.btn_Cancel = new System.Windows.Forms.Button();
35
-            this.btn_OK = new System.Windows.Forms.Button();
36
-            this.SuspendLayout();
37
-            // 
38
-            // label_Decimal
39
-            // 
40
-            this.label_Decimal.AutoSize = true;
41
-            this.label_Decimal.Location = new System.Drawing.Point(91, 54);
42
-            this.label_Decimal.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
43
-            this.label_Decimal.Name = "label_Decimal";
44
-            this.label_Decimal.Size = new System.Drawing.Size(142, 15);
45
-            this.label_Decimal.TabIndex = 32;
46
-            this.label_Decimal.Text = "坐标保留的小数位数";
47
-            // 
48
-            // comboBox_Decimal
49
-            // 
50
-            this.comboBox_Decimal.FormattingEnabled = true;
51
-            this.comboBox_Decimal.Items.AddRange(new object[] {
52
-            "0",
53
-            "1",
54
-            "2",
55
-            "3",
56
-            "4",
57
-            "5",
58
-            "6",
59
-            "7",
60
-            "8",
61
-            "9"});
62
-            this.comboBox_Decimal.Location = new System.Drawing.Point(250, 51);
63
-            this.comboBox_Decimal.Margin = new System.Windows.Forms.Padding(4);
64
-            this.comboBox_Decimal.Name = "comboBox_Decimal";
65
-            this.comboBox_Decimal.Size = new System.Drawing.Size(124, 23);
66
-            this.comboBox_Decimal.TabIndex = 31;
67
-            // 
68
-            // btn_Cancel
69
-            // 
70
-            this.btn_Cancel.Location = new System.Drawing.Point(265, 113);
71
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
72
-            this.btn_Cancel.Name = "btn_Cancel";
73
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
74
-            this.btn_Cancel.TabIndex = 34;
75
-            this.btn_Cancel.Text = "取 消";
76
-            this.btn_Cancel.UseVisualStyleBackColor = true;
77
-            this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
78
-            // 
79
-            // btn_OK
80
-            // 
81
-            this.btn_OK.Location = new System.Drawing.Point(114, 112);
82
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
83
-            this.btn_OK.Name = "btn_OK";
84
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
85
-            this.btn_OK.TabIndex = 33;
86
-            this.btn_OK.Text = "确 定";
87
-            this.btn_OK.UseVisualStyleBackColor = true;
88
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
89
-            // 
90
-            // PicPts
91
-            // 
92
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
93
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
94
-            this.ClientSize = new System.Drawing.Size(465, 190);
95
-            this.Controls.Add(this.btn_Cancel);
96
-            this.Controls.Add(this.btn_OK);
97
-            this.Controls.Add(this.label_Decimal);
98
-            this.Controls.Add(this.comboBox_Decimal);
99
-            this.Name = "PicPts";
100
-            this.Text = "节点提取";
101
-            this.Load += new System.EventHandler(this.PicPts_Load);
102
-            this.ResumeLayout(false);
103
-            this.PerformLayout();
104
-
105
-        }
106
-
107
-        #endregion
108
-
109
-        private System.Windows.Forms.Label label_Decimal;
110
-        private System.Windows.Forms.ComboBox comboBox_Decimal;
111
-        private System.Windows.Forms.Button btn_Cancel;
112
-        private System.Windows.Forms.Button btn_OK;
113
-    }
114
-}

+ 0
- 43
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PicPts.cs 查看文件

@@ -1,43 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.ComponentModel;
4
-using System.Data;
5
-using System.Drawing;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-using System.Windows.Forms;
10
-
11
-namespace HCTools
12
-{
13
-    public partial class PicPts : Form
14
-    {
15
-        public PicPts()
16
-        {
17
-            InitializeComponent();
18
-        }
19
-
20
-        private void btn_OK_Click(object sender, EventArgs e)
21
-        {
22
-            if (string.IsNullOrEmpty(comboBox_Decimal.Text) == true)
23
-            {
24
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择小数位数!");
25
-                return;
26
-            }
27
-            PickupPoint pickuppt = new PickupPoint();
28
-            string num = comboBox_Decimal.SelectedText;
29
-            this.Close();
30
-            pickuppt.PickupPt(num);
31
-        }
32
-
33
-        private void PicPts_Load(object sender, EventArgs e)
34
-        {
35
-            this.comboBox_Decimal.DropDownStyle = ComboBoxStyle.DropDownList;
36
-        }
37
-
38
-        private void btn_Cancel_Click(object sender, EventArgs e)
39
-        {
40
-            this.Close();
41
-        }
42
-    }
43
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PicPts.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 174
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PickupPoint.cs 查看文件

@@ -1,174 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-using GrxCAD.ApplicationServices;
8
-using GrxCAD.DatabaseServices;
9
-using GrxCAD.EditorInput;
10
-using GrxCAD.Geometry;
11
-using System.Windows.Forms;
12
-using System.IO;
13
-
14
-namespace HCTools
15
-{
16
-    class PickupPoint
17
-    {
18
-        public void PickupPt(string num)
19
-        {
20
-            Document document = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
21
-            Database db = HostApplicationServices.WorkingDatabase;
22
-
23
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
24
-
25
-            TypedValue[] value = new TypedValue[]
26
-            {
27
-                new TypedValue((int)DxfCode.Start,"LWPOLYLINE,POLYLINE")
28
-            };//设置筛选条件
29
-            SelectionFilter filter = new SelectionFilter(value);
30
-
31
-            //选择区域中全部对象
32
-            //PromptSelectionResult psr = ed.SelectAll(filter);
33
-            // 要求在图形区域中手动选择对象
34
-            PromptSelectionResult psr = ed.GetSelection(filter);
35
-            SelectionSet selectionset = psr.Value;
36
-
37
-            if (psr.Status == PromptStatus.OK)
38
-            {
39
-                ObjectId[] obj = new ObjectId[selectionset.Count];
40
-                obj = selectionset.GetObjectIds();
41
-                List<Point3d> AllPoints = new List<Point3d>();
42
-                List<string> FinalPoints = new List<string>();
43
-                string decimalnum = "F" + num;
44
-                string ele = " ";
45
-
46
-                for (int i = 0; i < obj.Length; i++)
47
-                {
48
-                    DocumentLock documentlock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
49
-                    using (Transaction trans = db.TransactionManager.StartTransaction())
50
-                    {
51
-                        Point3dCollection coll = new Point3dCollection();
52
-                        ObjectId objid = obj[i];
53
-                        Entity entity = (Entity)trans.GetObject(objid, OpenMode.ForWrite);
54
-
55
-                        if (entity is Polyline)
56
-                        {
57
-                            Polyline line = entity as Polyline;
58
-                            //line.GetStretchPoints(coll);
59
-                            int vertexNum = line.NumberOfVertices;
60
-                            Point3d point;
61
-                            // 遍历获取多段线顶点坐标
62
-                            for (int ii = 0; ii < vertexNum; ii++)
63
-                            {
64
-                                point = line.GetPoint3dAt(ii);
65
-                                coll.Add(point);
66
-                            }
67
-                            ele = line.Elevation.ToString();
68
-                        }
69
-                        else if (entity is Polyline2d)
70
-                        {
71
-                            Polyline2d line = entity as Polyline2d;
72
-                            //line.GetStretchPoints(coll);
73
-                            foreach (ObjectId id in line)
74
-                            {
75
-                                Vertex2d vx = (Vertex2d)trans.GetObject(id, OpenMode.ForRead);
76
-                                if (vx.VertexType != Vertex2dType.SplineControlVertex)
77
-                                {
78
-                                    coll.Add(vx.Position);
79
-                                }
80
-                            }
81
-                            ele = line.Elevation.ToString();
82
-                        }
83
-                        else if(entity is Polyline3d)
84
-                        {
85
-                            Polyline3d line = entity as Polyline3d;
86
-                            foreach (ObjectId id in line)
87
-                            {
88
-                                PolylineVertex3d vx3d = (PolylineVertex3d)trans.GetObject(id,
89
-                                    OpenMode.ForRead);
90
-                                coll.Add(vx3d.Position);
91
-                            }
92
-                            ele = "三维多段线";
93
-                        }
94
-
95
-                        #region//无用
96
-                        ////检查选择的多段线是否有重复点,如果有就移除
97
-                        //for (int ii = 0; ii < coll.Count - 1; ii++)
98
-                        //{
99
-                        //    for (int iii = ii + 1; iii < ii + 21; iii++)
100
-                        //    {
101
-                        //        if (iii == coll.Count + 1)
102
-                        //            break;
103
-
104
-                        //        string x1 = coll[ii].X.ToString(decimalnum);
105
-                        //        string y1 = coll[ii].Y.ToString(decimalnum);
106
-
107
-                        //        string x2 = coll[iii].X.ToString(decimalnum);
108
-                        //        string y2 = coll[iii].Y.ToString(decimalnum);
109
-
110
-                        //        if (x1 == x2 && y1 == y2)
111
-                        //        {
112
-                        //            coll.RemoveAt(iii);
113
-                        //        }
114
-                        //        else
115
-                        //        {
116
-                        //            continue;
117
-                        //        }
118
-                        //    }
119
-                        //}
120
-                        #endregion
121
-
122
-                        for (int j = 0; j < coll.Count; j++)
123
-                        {
124
-                            AllPoints.Add(coll[j]);
125
-                        }
126
-                        trans.Commit();
127
-                    }
128
-                    documentlock.Dispose();
129
-
130
-                    for (int ii = 0; ii < AllPoints.Count; ii++)
131
-                    {
132
-                        if (ii == 0)
133
-                            FinalPoints.Add(ele);
134
-                        string x = AllPoints[ii].X.ToString(decimalnum);
135
-                        string y = AllPoints[ii].Y.ToString(decimalnum);
136
-                        string z = AllPoints[ii].Z.ToString(decimalnum);
137
-                        string res = string.Join(" ", new string[] { x, y, z });
138
-                        FinalPoints.Add(res);
139
-                    }
140
-                    AllPoints.Clear();
141
-                }
142
-                //保存文件对话框
143
-                System.Windows.Forms.SaveFileDialog save = new System.Windows.Forms.SaveFileDialog();
144
-                save.Filter = "文本文件(*.txt)|*.txt";
145
-                //FolderBrowserDialog dialog = new FolderBrowserDialog();
146
-                //dialog.Description = "请选择文件路径";
147
-                //保存文件是否记录上一次文件目录
148
-                save.RestoreDirectory = true;
149
-                if (save.ShowDialog() == DialogResult.OK)
150
-                {
151
-                    string savePath = save.FileName;
152
-                    File.WriteAllLines(savePath, FinalPoints, Encoding.UTF8);
153
-                    ed.WriteMessage("保存成功\n");
154
-                }
155
-                else
156
-                {
157
-                    MessageBox.Show("保存失败\n");
158
-                }
159
-                //if (dialog.ShowDialog() == DialogResult.OK)
160
-                //{
161
-                //    string foldPath = dialog.SelectedPath;
162
-                //    string savePath = foldPath + "\\" + ele + ".txt";
163
-                //    File.WriteAllLines(savePath, FinalPoints, Encoding.UTF8);
164
-                //    ed.WriteMessage("\n保存成功");
165
-                //}
166
-            }
167
-            else
168
-            {
169
-                ed.WriteMessage("\n多段线选择失败");
170
-            }
171
-            
172
-        }
173
-    }
174
-}

+ 0
- 36
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/AssemblyInfo.cs 查看文件

@@ -1,36 +0,0 @@
1
-using System.Reflection;
2
-using System.Runtime.CompilerServices;
3
-using System.Runtime.InteropServices;
4
-
5
-// 有关程序集的一般信息由以下
6
-// 控制。更改这些特性值可修改
7
-// 与程序集关联的信息。
8
-[assembly: AssemblyTitle("HCTools")]
9
-[assembly: AssemblyDescription("")]
10
-[assembly: AssemblyConfiguration("")]
11
-[assembly: AssemblyCompany("")]
12
-[assembly: AssemblyProduct("HCTools")]
13
-[assembly: AssemblyCopyright("Copyright ©  2024")]
14
-[assembly: AssemblyTrademark("")]
15
-[assembly: AssemblyCulture("")]
16
-
17
-// 将 ComVisible 设置为 false 会使此程序集中的类型
18
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19
-//请将此类型的 ComVisible 特性设置为 true。
20
-[assembly: ComVisible(false)]
21
-
22
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23
-[assembly: Guid("abb97f2c-1cca-4782-b144-a796879ebe66")]
24
-
25
-// 程序集的版本信息由下列四个值组成: 
26
-//
27
-//      主版本
28
-//      次版本
29
-//      生成号
30
-//      修订号
31
-//
32
-//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33
-//通过使用 "*",如下所示:
34
-// [assembly: AssemblyVersion("1.0.*")]
35
-[assembly: AssemblyVersion("1.0.0.0")]
36
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0
- 70
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Resources.Designer.cs 查看文件

@@ -1,70 +0,0 @@
1
-//------------------------------------------------------------------------------
2
-// <auto-generated>
3
-//     此代码由工具生成。
4
-//     运行时版本: 4.0.30319.42000
5
-//
6
-//     对此文件的更改可能导致不正确的行为,如果
7
-//     重新生成代码,则所做更改将丢失。
8
-// </auto-generated>
9
-//------------------------------------------------------------------------------
10
-
11
-
12
-namespace HCTools.Properties
13
-{
14
-    /// <summary>
15
-    ///   强类型资源类,用于查找本地化字符串等。
16
-    /// </summary>
17
-    // 此类是由 StronglyTypedResourceBuilder
18
-    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
19
-    // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
20
-    // (以 /str 作为命令选项),或重新生成 VS 项目。
21
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24
-    internal class Resources
25
-    {
26
-
27
-        private static global::System.Resources.ResourceManager resourceMan;
28
-
29
-        private static global::System.Globalization.CultureInfo resourceCulture;
30
-
31
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32
-        internal Resources()
33
-        {
34
-        }
35
-
36
-        /// <summary>
37
-        ///   返回此类使用的缓存 ResourceManager 实例。
38
-        /// </summary>
39
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
40
-        internal static global::System.Resources.ResourceManager ResourceManager
41
-        {
42
-            get
43
-            {
44
-                if ((resourceMan == null))
45
-                {
46
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HCTools.Properties.Resources", typeof(Resources).Assembly);
47
-                    resourceMan = temp;
48
-                }
49
-                return resourceMan;
50
-            }
51
-        }
52
-
53
-        /// <summary>
54
-        ///   重写当前线程的 CurrentUICulture 属性,对
55
-        ///   使用此强类型资源类的所有资源查找执行重写。
56
-        /// </summary>
57
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
58
-        internal static global::System.Globalization.CultureInfo Culture
59
-        {
60
-            get
61
-            {
62
-                return resourceCulture;
63
-            }
64
-            set
65
-            {
66
-                resourceCulture = value;
67
-            }
68
-        }
69
-    }
70
-}

+ 0
- 117
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Resources.resx 查看文件

@@ -1,117 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:element name="root" msdata:IsDataSet="true">
64
-      <xsd:complexType>
65
-        <xsd:choice maxOccurs="unbounded">
66
-          <xsd:element name="metadata">
67
-            <xsd:complexType>
68
-              <xsd:sequence>
69
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
70
-              </xsd:sequence>
71
-              <xsd:attribute name="name" type="xsd:string" />
72
-              <xsd:attribute name="type" type="xsd:string" />
73
-              <xsd:attribute name="mimetype" type="xsd:string" />
74
-            </xsd:complexType>
75
-          </xsd:element>
76
-          <xsd:element name="assembly">
77
-            <xsd:complexType>
78
-              <xsd:attribute name="alias" type="xsd:string" />
79
-              <xsd:attribute name="name" type="xsd:string" />
80
-            </xsd:complexType>
81
-          </xsd:element>
82
-          <xsd:element name="data">
83
-            <xsd:complexType>
84
-              <xsd:sequence>
85
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
86
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
87
-              </xsd:sequence>
88
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
89
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
90
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
91
-            </xsd:complexType>
92
-          </xsd:element>
93
-          <xsd:element name="resheader">
94
-            <xsd:complexType>
95
-              <xsd:sequence>
96
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
97
-              </xsd:sequence>
98
-              <xsd:attribute name="name" type="xsd:string" use="required" />
99
-            </xsd:complexType>
100
-          </xsd:element>
101
-        </xsd:choice>
102
-      </xsd:complexType>
103
-    </xsd:element>
104
-  </xsd:schema>
105
-  <resheader name="resmimetype">
106
-    <value>text/microsoft-resx</value>
107
-  </resheader>
108
-  <resheader name="version">
109
-    <value>2.0</value>
110
-  </resheader>
111
-  <resheader name="reader">
112
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
113
-  </resheader>
114
-  <resheader name="writer">
115
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-</root>

+ 0
- 136
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtCheck.Designer.cs 查看文件

@@ -1,136 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class PtCheck
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label_ElePoint = new System.Windows.Forms.Label();
33
-            this.comboBox_blc = new System.Windows.Forms.ComboBox();
34
-            this.label_Blc = new System.Windows.Forms.Label();
35
-            this.comboBox_ElePoint = new System.Windows.Forms.ComboBox();
36
-            this.btn_Cancel = new System.Windows.Forms.Button();
37
-            this.btn_OK = new System.Windows.Forms.Button();
38
-            this.SuspendLayout();
39
-            // 
40
-            // label_ElePoint
41
-            // 
42
-            this.label_ElePoint.AutoSize = true;
43
-            this.label_ElePoint.Location = new System.Drawing.Point(58, 38);
44
-            this.label_ElePoint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
45
-            this.label_ElePoint.Name = "label_ElePoint";
46
-            this.label_ElePoint.Size = new System.Drawing.Size(157, 15);
47
-            this.label_ElePoint.TabIndex = 52;
48
-            this.label_ElePoint.Text = "高程点所在图层选择:";
49
-            // 
50
-            // comboBox_blc
51
-            // 
52
-            this.comboBox_blc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
53
-            this.comboBox_blc.FormattingEnabled = true;
54
-            this.comboBox_blc.Items.AddRange(new object[] {
55
-            "1:500",
56
-            "1:1000",
57
-            "1:2000",
58
-            "1:5000"});
59
-            this.comboBox_blc.Location = new System.Drawing.Point(221, 93);
60
-            this.comboBox_blc.Margin = new System.Windows.Forms.Padding(4);
61
-            this.comboBox_blc.Name = "comboBox_blc";
62
-            this.comboBox_blc.Size = new System.Drawing.Size(160, 23);
63
-            this.comboBox_blc.TabIndex = 59;
64
-            // 
65
-            // label_Blc
66
-            // 
67
-            this.label_Blc.AutoSize = true;
68
-            this.label_Blc.Location = new System.Drawing.Point(116, 96);
69
-            this.label_Blc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
70
-            this.label_Blc.Name = "label_Blc";
71
-            this.label_Blc.Size = new System.Drawing.Size(97, 15);
72
-            this.label_Blc.TabIndex = 58;
73
-            this.label_Blc.Text = "比例尺选择:";
74
-            // 
75
-            // comboBox_ElePoint
76
-            // 
77
-            this.comboBox_ElePoint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
78
-            this.comboBox_ElePoint.FormattingEnabled = true;
79
-            this.comboBox_ElePoint.Location = new System.Drawing.Point(221, 35);
80
-            this.comboBox_ElePoint.Margin = new System.Windows.Forms.Padding(4);
81
-            this.comboBox_ElePoint.MaxDropDownItems = 30;
82
-            this.comboBox_ElePoint.Name = "comboBox_ElePoint";
83
-            this.comboBox_ElePoint.Size = new System.Drawing.Size(160, 23);
84
-            this.comboBox_ElePoint.TabIndex = 53;
85
-            // 
86
-            // btn_Cancel
87
-            // 
88
-            this.btn_Cancel.Location = new System.Drawing.Point(263, 154);
89
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
90
-            this.btn_Cancel.Name = "btn_Cancel";
91
-            this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
92
-            this.btn_Cancel.TabIndex = 61;
93
-            this.btn_Cancel.Text = "取 消";
94
-            this.btn_Cancel.UseVisualStyleBackColor = true;
95
-            this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
96
-            // 
97
-            // btn_OK
98
-            // 
99
-            this.btn_OK.Location = new System.Drawing.Point(107, 154);
100
-            this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
101
-            this.btn_OK.Name = "btn_OK";
102
-            this.btn_OK.Size = new System.Drawing.Size(100, 29);
103
-            this.btn_OK.TabIndex = 60;
104
-            this.btn_OK.Text = "确 定";
105
-            this.btn_OK.UseVisualStyleBackColor = true;
106
-            this.btn_OK.Click += new System.EventHandler(this.btn_OK_Click);
107
-            // 
108
-            // PtCheck
109
-            // 
110
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
111
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
112
-            this.ClientSize = new System.Drawing.Size(456, 206);
113
-            this.Controls.Add(this.btn_Cancel);
114
-            this.Controls.Add(this.btn_OK);
115
-            this.Controls.Add(this.label_ElePoint);
116
-            this.Controls.Add(this.comboBox_blc);
117
-            this.Controls.Add(this.label_Blc);
118
-            this.Controls.Add(this.comboBox_ElePoint);
119
-            this.Name = "PtCheck";
120
-            this.Text = "高程点检查";
121
-            this.Load += new System.EventHandler(this.PtCheck_Load);
122
-            this.ResumeLayout(false);
123
-            this.PerformLayout();
124
-
125
-        }
126
-
127
-        #endregion
128
-
129
-        private System.Windows.Forms.Label label_ElePoint;
130
-        private System.Windows.Forms.ComboBox comboBox_blc;
131
-        private System.Windows.Forms.Label label_Blc;
132
-        private System.Windows.Forms.ComboBox comboBox_ElePoint;
133
-        private System.Windows.Forms.Button btn_Cancel;
134
-        private System.Windows.Forms.Button btn_OK;
135
-    }
136
-}

+ 0
- 90
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtCheck.cs 查看文件

@@ -1,90 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.ComponentModel;
4
-using System.Data;
5
-using System.Drawing;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-using System.Windows.Forms;
10
-
11
-using GrxCAD.EditorInput;
12
-using GrxCAD.DatabaseServices;
13
-using GrxCAD.Geometry;
14
-
15
-namespace HCTools
16
-{
17
-    public partial class PtCheck : Form
18
-    {
19
-        public PtCheck()
20
-        {
21
-            InitializeComponent();
22
-        }
23
-
24
-        private void PtCheck_Load(object sender, EventArgs e)
25
-        {
26
-            this.comboBox_ElePoint.DropDownStyle = ComboBoxStyle.DropDownList;
27
-
28
-            this.MaximizeBox = false;
29
-            this.StartPosition = FormStartPosition.CenterScreen;
30
-
31
-            //自动填充下拉框
32
-            Database database = GrxCAD.DatabaseServices.HostApplicationServices.WorkingDatabase;
33
-            using (Transaction traction = database.TransactionManager.StartTransaction())
34
-            {
35
-                //存放所有图层名
36
-                List<string> alllayername = new List<string>();
37
-                LayerTable layertable = traction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
38
-                foreach (ObjectId objid in layertable)
39
-                {
40
-                    LayerTableRecord layertablerecord = traction.GetObject(objid, OpenMode.ForRead) as LayerTableRecord;
41
-                    alllayername.Add(layertablerecord.Name);
42
-                }
43
-
44
-                alllayername.Sort();
45
-
46
-                for (int i = 0; i < alllayername.Count; i++)
47
-                {
48
-                    this.comboBox_ElePoint.Items.Add(alllayername[i]);
49
-                }
50
-
51
-                if (alllayername.Contains("8300"))
52
-                {
53
-                    int index = alllayername.IndexOf("8300");
54
-                    this.comboBox_ElePoint.SelectedIndex = index;
55
-                }
56
-                traction.Commit();
57
-            }
58
-        }
59
-
60
-        private void btn_OK_Click(object sender, EventArgs e)
61
-        {
62
-            if (comboBox_ElePoint.Text == "")
63
-            {
64
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择高程点图层");
65
-                return;
66
-            }
67
-            if (comboBox_blc.Text == "")
68
-            {
69
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
70
-                return;
71
-            }
72
-
73
-            ElePtCheck.EleLayerName = comboBox_ElePoint.Text;
74
-            string blctext = comboBox_blc.Text;
75
-            int blcindex = blctext.LastIndexOf(':');
76
-            string strblc = blctext.Substring(blcindex + 1);
77
-            ElePtCheck.blc = Convert.ToInt32(strblc);
78
-
79
-
80
-            this.Close();
81
-            ElePtCheck ptcheck = new ElePtCheck();
82
-            ptcheck.pointcheck();
83
-        }
84
-
85
-        private void btn_Cancel_Click(object sender, EventArgs e)
86
-        {
87
-            this.Close();
88
-        }
89
-    }
90
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/PtCheck.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 102
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Scale.Designer.cs 查看文件

@@ -1,102 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class Scale
5
-    {
6
-        /// <summary>
7
-        /// Required designer variable.
8
-        /// </summary>
9
-        private System.ComponentModel.IContainer components = null;
10
-
11
-        /// <summary>
12
-        /// Clean up any resources being used.
13
-        /// </summary>
14
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
15
-        protected override void Dispose(bool disposing)
16
-        {
17
-            if (disposing && (components != null))
18
-            {
19
-                components.Dispose();
20
-            }
21
-            base.Dispose(disposing);
22
-        }
23
-
24
-        #region Windows Form Designer generated code
25
-
26
-        /// <summary>
27
-        /// Required method for Designer support - do not modify
28
-        /// the contents of this method with the code editor.
29
-        /// </summary>
30
-        private void InitializeComponent()
31
-        {
32
-            this.label1 = new System.Windows.Forms.Label();
33
-            this.combox_scalesel = new System.Windows.Forms.ComboBox();
34
-            this.btn_ok = new System.Windows.Forms.Button();
35
-            this.btn_cacel = new System.Windows.Forms.Button();
36
-            this.SuspendLayout();
37
-            // 
38
-            // label1
39
-            // 
40
-            this.label1.AutoSize = true;
41
-            this.label1.Location = new System.Drawing.Point(54, 52);
42
-            this.label1.Name = "label1";
43
-            this.label1.Size = new System.Drawing.Size(67, 15);
44
-            this.label1.TabIndex = 0;
45
-            this.label1.Text = "比例尺:";
46
-            // 
47
-            // combox_scalesel
48
-            // 
49
-            this.combox_scalesel.FormattingEnabled = true;
50
-            this.combox_scalesel.Items.AddRange(new object[] {
51
-            "1:500",
52
-            "1:1000",
53
-            "1:2000"});
54
-            this.combox_scalesel.Location = new System.Drawing.Point(142, 44);
55
-            this.combox_scalesel.Name = "combox_scalesel";
56
-            this.combox_scalesel.Size = new System.Drawing.Size(160, 23);
57
-            this.combox_scalesel.TabIndex = 1;
58
-            // 
59
-            // btn_ok
60
-            // 
61
-            this.btn_ok.Location = new System.Drawing.Point(46, 102);
62
-            this.btn_ok.Name = "btn_ok";
63
-            this.btn_ok.Size = new System.Drawing.Size(75, 30);
64
-            this.btn_ok.TabIndex = 2;
65
-            this.btn_ok.Text = "确 定";
66
-            this.btn_ok.UseVisualStyleBackColor = true;
67
-            this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
68
-            // 
69
-            // btn_cacel
70
-            // 
71
-            this.btn_cacel.Location = new System.Drawing.Point(252, 102);
72
-            this.btn_cacel.Name = "btn_cacel";
73
-            this.btn_cacel.Size = new System.Drawing.Size(75, 30);
74
-            this.btn_cacel.TabIndex = 3;
75
-            this.btn_cacel.Text = "取 消";
76
-            this.btn_cacel.UseVisualStyleBackColor = true;
77
-            // 
78
-            // Scale
79
-            // 
80
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
81
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
82
-            this.ClientSize = new System.Drawing.Size(371, 153);
83
-            this.Controls.Add(this.btn_cacel);
84
-            this.Controls.Add(this.btn_ok);
85
-            this.Controls.Add(this.combox_scalesel);
86
-            this.Controls.Add(this.label1);
87
-            this.Name = "Scale";
88
-            this.Text = "地物压盖";
89
-            this.Load += new System.EventHandler(this.Scale_Load);
90
-            this.ResumeLayout(false);
91
-            this.PerformLayout();
92
-
93
-        }
94
-
95
-        #endregion
96
-
97
-        private System.Windows.Forms.Label label1;
98
-        private System.Windows.Forms.ComboBox combox_scalesel;
99
-        private System.Windows.Forms.Button btn_ok;
100
-        private System.Windows.Forms.Button btn_cacel;
101
-    }
102
-}

+ 0
- 48
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Scale.cs 查看文件

@@ -1,48 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.ComponentModel;
4
-using System.Data;
5
-using System.Drawing;
6
-using System.Linq;
7
-using System.Text;
8
-using System.Threading.Tasks;
9
-using System.Windows.Forms;
10
-
11
-using GrxCAD.ApplicationServices;
12
-
13
-namespace HCTools
14
-{
15
-    public partial class Scale : Form
16
-    {
17
-        public Scale()
18
-        {
19
-            InitializeComponent();
20
-        }
21
-
22
-        private void Scale_Load(object sender, EventArgs e)
23
-        {
24
-            combox_scalesel.DropDownStyle = ComboBoxStyle.DropDownList;
25
-        }
26
-
27
-        private void btn_ok_Click(object sender, EventArgs e)
28
-        {
29
-            if (combox_scalesel.Text == "")
30
-            {
31
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
32
-                return;
33
-            }
34
-
35
-            //比例尺
36
-            string blctext = combox_scalesel.Text;
37
-            int blcindex = blctext.LastIndexOf(':');
38
-            string strblc = blctext.Substring(blcindex + 1);
39
-            int rade = Convert.ToInt32(strblc);
40
-
41
-            this.Close();
42
-            FeatureOverlap.blc = rade;
43
-            //this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
44
-            FeatureOverlap chfeature = new FeatureOverlap();
45
-            chfeature.check();
46
-        }
47
-    }
48
-}

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Scale.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 120
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.resx 查看文件

@@ -1,120 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<root>
3
-  <!-- 
4
-    Microsoft ResX Schema 
5
-    
6
-    Version 2.0
7
-    
8
-    The primary goals of this format is to allow a simple XML format 
9
-    that is mostly human readable. The generation and parsing of the 
10
-    various data types are done through the TypeConverter classes 
11
-    associated with the data types.
12
-    
13
-    Example:
14
-    
15
-    ... ado.net/XML headers & schema ...
16
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
-    <resheader name="version">2.0</resheader>
18
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
-    </data>
25
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
-        <comment>This is a comment</comment>
28
-    </data>
29
-                
30
-    There are any number of "resheader" rows that contain simple 
31
-    name/value pairs.
32
-    
33
-    Each data row contains a name, and value. The row also contains a 
34
-    type or mimetype. Type corresponds to a .NET class that support 
35
-    text/value conversion through the TypeConverter architecture. 
36
-    Classes that don't support this are serialized and stored with the 
37
-    mimetype set.
38
-    
39
-    The mimetype is used for serialized objects, and tells the 
40
-    ResXResourceReader how to depersist the object. This is currently not 
41
-    extensible. For a given mimetype the value must be set accordingly:
42
-    
43
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
-    that the ResXResourceWriter will generate, however the reader can 
45
-    read any of the formats listed below.
46
-    
47
-    mimetype: application/x-microsoft.net.object.binary.base64
48
-    value   : The object must be serialized with 
49
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
-            : and then encoded with base64 encoding.
51
-    
52
-    mimetype: application/x-microsoft.net.object.soap.base64
53
-    value   : The object must be serialized with 
54
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
-            : and then encoded with base64 encoding.
56
-
57
-    mimetype: application/x-microsoft.net.object.bytearray.base64
58
-    value   : The object must be serialized into a byte array 
59
-            : using a System.ComponentModel.TypeConverter
60
-            : and then encoded with base64 encoding.
61
-    -->
62
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
-    <xsd:element name="root" msdata:IsDataSet="true">
65
-      <xsd:complexType>
66
-        <xsd:choice maxOccurs="unbounded">
67
-          <xsd:element name="metadata">
68
-            <xsd:complexType>
69
-              <xsd:sequence>
70
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
-              </xsd:sequence>
72
-              <xsd:attribute name="name" use="required" type="xsd:string" />
73
-              <xsd:attribute name="type" type="xsd:string" />
74
-              <xsd:attribute name="mimetype" type="xsd:string" />
75
-              <xsd:attribute ref="xml:space" />
76
-            </xsd:complexType>
77
-          </xsd:element>
78
-          <xsd:element name="assembly">
79
-            <xsd:complexType>
80
-              <xsd:attribute name="alias" type="xsd:string" />
81
-              <xsd:attribute name="name" type="xsd:string" />
82
-            </xsd:complexType>
83
-          </xsd:element>
84
-          <xsd:element name="data">
85
-            <xsd:complexType>
86
-              <xsd:sequence>
87
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
-              </xsd:sequence>
90
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
-              <xsd:attribute ref="xml:space" />
94
-            </xsd:complexType>
95
-          </xsd:element>
96
-          <xsd:element name="resheader">
97
-            <xsd:complexType>
98
-              <xsd:sequence>
99
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
-              </xsd:sequence>
101
-              <xsd:attribute name="name" type="xsd:string" use="required" />
102
-            </xsd:complexType>
103
-          </xsd:element>
104
-        </xsd:choice>
105
-      </xsd:complexType>
106
-    </xsd:element>
107
-  </xsd:schema>
108
-  <resheader name="resmimetype">
109
-    <value>text/microsoft-resx</value>
110
-  </resheader>
111
-  <resheader name="version">
112
-    <value>2.0</value>
113
-  </resheader>
114
-  <resheader name="reader">
115
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
-  </resheader>
117
-  <resheader name="writer">
118
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
-  </resheader>
120
-</root>

+ 0
- 4
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs 查看文件

@@ -1,4 +0,0 @@
1
-// <autogenerated />
2
-using System;
3
-using System.Reflection;
4
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.AttributeForm.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Chaginfos.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.CheckL.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Conn.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.CutCountL.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.DGXGeneral.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.DeleteElept.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.DgxAnno.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.EleRd.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.EleptDensity.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Hierak.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.InstDOM.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Layerchange_Form.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.PLError_Overlay.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.PicPts.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Properties.Resources.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.PtCheck.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.Scale.resources 查看文件


二进制
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.TKInfo.resources 查看文件


二进制
未加密软件工具/arcgis工具箱/中误差计算2023_12_15.tbx 查看文件


二进制
未加密软件工具/arcgis工具箱/中误差计算2024_11_28_1.tbx 查看文件


正在加载...
取消
保存