2 Коммиты

Автор SHA1 Сообщение Дата
  qyx de86c917ac 20250722提交 1 месяц назад
  qyx a2724615bf 最新 1 месяц назад
69 измененных файлов: 5264 добавлений и 612 удалений
  1. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/.vs/Thumbnail/v16/.suo
  2. 20
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail.sln
  3. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail.v11.suo
  4. 241
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.Designer.cs
  5. 143
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.cs
  6. 0
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.resx
  7. 167
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/MainClass.cs
  8. 36
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Properties/AssemblyInfo.cs
  9. 86
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Properties/Settings.Designer.cs
  10. 21
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Properties/Settings.settings
  11. 93
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Thumbnail.csproj
  12. 8
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Thumbnail.csproj.user
  13. 27
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/app.config
  14. 3
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Drawing1.dwl
  15. 7
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Drawing1.dwl2
  16. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.dll
  17. 27
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.dll.config
  18. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.pdb
  19. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail_selewindow.dll
  20. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail显示坐标.dll
  21. 114
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/acad.err
  22. 2433
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/getThumbnail.cs
  23. 4
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs
  24. 4
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
  25. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  26. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  27. 0
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  28. 0
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  29. 0
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
  30. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.Form1.resources
  31. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.AssemblyReference.cache
  32. 1
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.CoreCompileInputs.cache
  33. 36
    0
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.FileListAbsolute.txt
  34. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.GenerateResource.cache
  35. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.dll
  36. Двоичные данные
      加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.pdb
  37. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/.suo
  38. 51
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/App.config
  39. 71
    2
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/AttributeForm.Designer.cs
  40. 140
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/AttributeForm.cs
  41. 177
    70
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CMCgis_Basicfunction.cs
  42. 2
    2
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ChPLContradiction.cs
  43. 9
    7
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Chaginfos.cs
  44. 2
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Conn.cs
  45. 2
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ContourLineFix.cs
  46. 0
    97
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinterpl.Designer.cs
  47. 0
    38
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinterpl.cs
  48. 521
    233
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinters.cs
  49. 224
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/HCTools.csproj
  50. 2
    2
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/HCTools.csproj.user
  51. 2
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InsertDOM.cs
  52. 128
    26
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/LayerChange.cs
  53. 48
    8
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Layerchange_Form.Designer.cs
  54. 32
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Layerchange_Form.cs
  55. 85
    6
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/MainClass.cs
  56. 21
    3
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Menus.cs
  57. 134
    16
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.Designer.cs
  58. 38
    6
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.settings
  59. 55
    81
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.Designer.cs
  60. 31
    10
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.cs
  61. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll
  62. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.pdb
  63. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  64. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  65. 1
    1
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.CoreCompileInputs.cache
  66. 17
    0
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.FileListAbsolute.txt
  67. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.GenerateResource.cache
  68. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.dll
  69. Двоичные данные
      加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.pdb

Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/.vs/Thumbnail/v16/.suo Просмотреть файл


+ 20
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail.sln Просмотреть файл

@@ -0,0 +1,20 @@
1
+
2
+Microsoft Visual Studio Solution File, Format Version 12.00
3
+# Visual Studio 2012
4
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Thumbnail", "Thumbnail\Thumbnail.csproj", "{325D619D-651B-42EA-BA93-01121126A2AF}"
5
+EndProject
6
+Global
7
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
8
+		Debug|Any CPU = Debug|Any CPU
9
+		Release|Any CPU = Release|Any CPU
10
+	EndGlobalSection
11
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
+		{325D619D-651B-42EA-BA93-01121126A2AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13
+		{325D619D-651B-42EA-BA93-01121126A2AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
14
+		{325D619D-651B-42EA-BA93-01121126A2AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
15
+		{325D619D-651B-42EA-BA93-01121126A2AF}.Release|Any CPU.Build.0 = Release|Any CPU
16
+	EndGlobalSection
17
+	GlobalSection(SolutionProperties) = preSolution
18
+		HideSolutionNode = FALSE
19
+	EndGlobalSection
20
+EndGlobal

Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail.v11.suo Просмотреть файл


+ 241
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.Designer.cs Просмотреть файл

@@ -0,0 +1,241 @@
1
+namespace Thumbnail
2
+{
3
+    partial class Form1
4
+    {
5
+        /// <summary>
6
+        /// Required designer variable.
7
+        /// </summary>
8
+        private System.ComponentModel.IContainer components = null;
9
+
10
+        /// <summary>
11
+        /// Clean up any resources being used.
12
+        /// </summary>
13
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14
+        protected override void Dispose(bool disposing)
15
+        {
16
+            if (disposing && (components != null))
17
+            {
18
+                components.Dispose();
19
+            }
20
+            base.Dispose(disposing);
21
+        }
22
+
23
+        #region Windows Form Designer generated code
24
+
25
+        /// <summary>
26
+        /// Required method for Designer support - do not modify
27
+        /// the contents of this method with the code editor.
28
+        /// </summary>
29
+        private void InitializeComponent()
30
+        {
31
+            this.label1 = new System.Windows.Forms.Label();
32
+            this.label2 = new System.Windows.Forms.Label();
33
+            this.label3 = new System.Windows.Forms.Label();
34
+            this.textBox_files = new System.Windows.Forms.TextBox();
35
+            this.textBox_tk = new System.Windows.Forms.TextBox();
36
+            this.textBox_iplfiles = new System.Windows.Forms.TextBox();
37
+            this.button_files = new System.Windows.Forms.Button();
38
+            this.button_tk = new System.Windows.Forms.Button();
39
+            this.button_iplfiles = new System.Windows.Forms.Button();
40
+            this.button_ok = new System.Windows.Forms.Button();
41
+            this.label4 = new System.Windows.Forms.Label();
42
+            this.comboBox_blc = new System.Windows.Forms.ComboBox();
43
+            this.label5 = new System.Windows.Forms.Label();
44
+            this.label6 = new System.Windows.Forms.Label();
45
+            this.textBox_tkn = new System.Windows.Forms.TextBox();
46
+            this.textBox_tfh = new System.Windows.Forms.TextBox();
47
+            this.SuspendLayout();
48
+            // 
49
+            // label1
50
+            // 
51
+            this.label1.AutoSize = true;
52
+            this.label1.Location = new System.Drawing.Point(39, 17);
53
+            this.label1.Name = "label1";
54
+            this.label1.Size = new System.Drawing.Size(157, 15);
55
+            this.label1.TabIndex = 0;
56
+            this.label1.Text = "待替换文件所在位置:";
57
+            // 
58
+            // label2
59
+            // 
60
+            this.label2.AutoSize = true;
61
+            this.label2.Location = new System.Drawing.Point(39, 68);
62
+            this.label2.Name = "label2";
63
+            this.label2.Size = new System.Drawing.Size(127, 15);
64
+            this.label2.TabIndex = 1;
65
+            this.label2.Text = "截图表所在位置:";
66
+            // 
67
+            // label3
68
+            // 
69
+            this.label3.AutoSize = true;
70
+            this.label3.Location = new System.Drawing.Point(39, 118);
71
+            this.label3.Name = "label3";
72
+            this.label3.Size = new System.Drawing.Size(157, 15);
73
+            this.label3.TabIndex = 2;
74
+            this.label3.Text = "替换后文件保存位置:";
75
+            // 
76
+            // textBox_files
77
+            // 
78
+            this.textBox_files.Location = new System.Drawing.Point(207, 12);
79
+            this.textBox_files.Name = "textBox_files";
80
+            this.textBox_files.Size = new System.Drawing.Size(260, 25);
81
+            this.textBox_files.TabIndex = 3;
82
+            // 
83
+            // textBox_tk
84
+            // 
85
+            this.textBox_tk.Location = new System.Drawing.Point(207, 61);
86
+            this.textBox_tk.Name = "textBox_tk";
87
+            this.textBox_tk.Size = new System.Drawing.Size(260, 25);
88
+            this.textBox_tk.TabIndex = 4;
89
+            // 
90
+            // textBox_iplfiles
91
+            // 
92
+            this.textBox_iplfiles.Location = new System.Drawing.Point(207, 108);
93
+            this.textBox_iplfiles.Name = "textBox_iplfiles";
94
+            this.textBox_iplfiles.Size = new System.Drawing.Size(260, 25);
95
+            this.textBox_iplfiles.TabIndex = 5;
96
+            // 
97
+            // button_files
98
+            // 
99
+            this.button_files.Location = new System.Drawing.Point(499, 7);
100
+            this.button_files.Name = "button_files";
101
+            this.button_files.Size = new System.Drawing.Size(75, 30);
102
+            this.button_files.TabIndex = 6;
103
+            this.button_files.Text = "选 择";
104
+            this.button_files.UseVisualStyleBackColor = true;
105
+            this.button_files.Click += new System.EventHandler(this.button_files_Click);
106
+            // 
107
+            // button_tk
108
+            // 
109
+            this.button_tk.Location = new System.Drawing.Point(499, 56);
110
+            this.button_tk.Name = "button_tk";
111
+            this.button_tk.Size = new System.Drawing.Size(75, 30);
112
+            this.button_tk.TabIndex = 7;
113
+            this.button_tk.Text = "选 择";
114
+            this.button_tk.UseVisualStyleBackColor = true;
115
+            this.button_tk.Click += new System.EventHandler(this.button_tk_Click);
116
+            // 
117
+            // button_iplfiles
118
+            // 
119
+            this.button_iplfiles.Location = new System.Drawing.Point(499, 103);
120
+            this.button_iplfiles.Name = "button_iplfiles";
121
+            this.button_iplfiles.Size = new System.Drawing.Size(75, 30);
122
+            this.button_iplfiles.TabIndex = 8;
123
+            this.button_iplfiles.Text = "选 择";
124
+            this.button_iplfiles.UseVisualStyleBackColor = true;
125
+            this.button_iplfiles.Click += new System.EventHandler(this.button_iplfiles_Click);
126
+            // 
127
+            // button_ok
128
+            // 
129
+            this.button_ok.Location = new System.Drawing.Point(253, 295);
130
+            this.button_ok.Name = "button_ok";
131
+            this.button_ok.Size = new System.Drawing.Size(75, 31);
132
+            this.button_ok.TabIndex = 9;
133
+            this.button_ok.Text = "确  定";
134
+            this.button_ok.UseVisualStyleBackColor = true;
135
+            this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
136
+            // 
137
+            // label4
138
+            // 
139
+            this.label4.AutoSize = true;
140
+            this.label4.Location = new System.Drawing.Point(39, 258);
141
+            this.label4.Name = "label4";
142
+            this.label4.Size = new System.Drawing.Size(97, 15);
143
+            this.label4.TabIndex = 10;
144
+            this.label4.Text = "选择比例尺:";
145
+            // 
146
+            // comboBox_blc
147
+            // 
148
+            this.comboBox_blc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
149
+            this.comboBox_blc.FormattingEnabled = true;
150
+            this.comboBox_blc.Items.AddRange(new object[] {
151
+            "1:500",
152
+            "1:1000",
153
+            "1:2000",
154
+            "1:5000",
155
+            "1:10000"});
156
+            this.comboBox_blc.Location = new System.Drawing.Point(207, 250);
157
+            this.comboBox_blc.Name = "comboBox_blc";
158
+            this.comboBox_blc.Size = new System.Drawing.Size(172, 23);
159
+            this.comboBox_blc.TabIndex = 11;
160
+            // 
161
+            // label5
162
+            // 
163
+            this.label5.AutoSize = true;
164
+            this.label5.Location = new System.Drawing.Point(39, 163);
165
+            this.label5.Name = "label5";
166
+            this.label5.Size = new System.Drawing.Size(187, 15);
167
+            this.label5.TabIndex = 12;
168
+            this.label5.Text = "结合表图框所在图层名称:";
169
+            // 
170
+            // label6
171
+            // 
172
+            this.label6.AutoSize = true;
173
+            this.label6.Location = new System.Drawing.Point(39, 206);
174
+            this.label6.Name = "label6";
175
+            this.label6.Size = new System.Drawing.Size(202, 15);
176
+            this.label6.TabIndex = 13;
177
+            this.label6.Text = "结合表图幅号所在图层名称:";
178
+            // 
179
+            // textBox_tkn
180
+            // 
181
+            this.textBox_tkn.Location = new System.Drawing.Point(253, 163);
182
+            this.textBox_tkn.Name = "textBox_tkn";
183
+            this.textBox_tkn.Size = new System.Drawing.Size(126, 25);
184
+            this.textBox_tkn.TabIndex = 14;
185
+            // 
186
+            // textBox_tfh
187
+            // 
188
+            this.textBox_tfh.Location = new System.Drawing.Point(253, 206);
189
+            this.textBox_tfh.Name = "textBox_tfh";
190
+            this.textBox_tfh.Size = new System.Drawing.Size(126, 25);
191
+            this.textBox_tfh.TabIndex = 15;
192
+            // 
193
+            // Form1
194
+            // 
195
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
196
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
197
+            this.ClientSize = new System.Drawing.Size(644, 346);
198
+            this.Controls.Add(this.textBox_tfh);
199
+            this.Controls.Add(this.textBox_tkn);
200
+            this.Controls.Add(this.label6);
201
+            this.Controls.Add(this.label5);
202
+            this.Controls.Add(this.comboBox_blc);
203
+            this.Controls.Add(this.label4);
204
+            this.Controls.Add(this.button_ok);
205
+            this.Controls.Add(this.button_iplfiles);
206
+            this.Controls.Add(this.button_tk);
207
+            this.Controls.Add(this.button_files);
208
+            this.Controls.Add(this.textBox_iplfiles);
209
+            this.Controls.Add(this.textBox_tk);
210
+            this.Controls.Add(this.textBox_files);
211
+            this.Controls.Add(this.label3);
212
+            this.Controls.Add(this.label2);
213
+            this.Controls.Add(this.label1);
214
+            this.Name = "Form1";
215
+            this.Text = "接图表替换";
216
+            this.Load += new System.EventHandler(this.Form1_Load);
217
+            this.ResumeLayout(false);
218
+            this.PerformLayout();
219
+
220
+        }
221
+
222
+        #endregion
223
+
224
+        private System.Windows.Forms.Label label1;
225
+        private System.Windows.Forms.Label label2;
226
+        private System.Windows.Forms.Label label3;
227
+        private System.Windows.Forms.TextBox textBox_files;
228
+        private System.Windows.Forms.TextBox textBox_tk;
229
+        private System.Windows.Forms.TextBox textBox_iplfiles;
230
+        private System.Windows.Forms.Button button_files;
231
+        private System.Windows.Forms.Button button_tk;
232
+        private System.Windows.Forms.Button button_iplfiles;
233
+        private System.Windows.Forms.Button button_ok;
234
+        private System.Windows.Forms.Label label4;
235
+        private System.Windows.Forms.ComboBox comboBox_blc;
236
+        private System.Windows.Forms.Label label5;
237
+        private System.Windows.Forms.Label label6;
238
+        private System.Windows.Forms.TextBox textBox_tkn;
239
+        private System.Windows.Forms.TextBox textBox_tfh;
240
+    }
241
+}

+ 143
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.cs Просмотреть файл

@@ -0,0 +1,143 @@
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 Thumbnail
13
+{
14
+    public partial class Form1 : Form
15
+    {
16
+        public Form1()
17
+        {
18
+            InitializeComponent();
19
+        }
20
+
21
+        private void Form1_Load(object sender, EventArgs e)
22
+        {
23
+            textBox_files.Text = Properties.Settings.Default.files;
24
+            textBox_tk.Text = Properties.Settings.Default.jtb;
25
+            textBox_iplfiles.Text = Properties.Settings.Default.svpath;
26
+            textBox_tkn.Text = Properties.Settings.Default.tk;
27
+            textBox_tfh.Text = Properties.Settings.Default.tfh;
28
+        }
29
+
30
+        private void button_files_Click(object sender, EventArgs e)
31
+        {
32
+            FolderBrowserDialog open = new FolderBrowserDialog();
33
+            open.Description = "请选择文件夹";
34
+            if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK)
35
+                textBox_files.Text = open.SelectedPath;
36
+        }
37
+
38
+        private void button_tk_Click(object sender, EventArgs e)
39
+        {
40
+            OpenFileDialog open = new OpenFileDialog();
41
+            open.Title = "请选择文件";
42
+            if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK)
43
+                textBox_tk.Text = open.FileName;
44
+        }
45
+
46
+        private void button_iplfiles_Click(object sender, EventArgs e)
47
+        {
48
+            FolderBrowserDialog open = new FolderBrowserDialog();
49
+            open.Description = "请选择文件夹";
50
+            if (open.ShowDialog() == DialogResult.OK)
51
+                textBox_iplfiles.Text = open.SelectedPath;
52
+        }
53
+
54
+        private void button_ok_Click(object sender, EventArgs e)
55
+        {
56
+            if (string.IsNullOrEmpty(textBox_files.Text))
57
+            {
58
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择待替换文件所在位置");
59
+                return;
60
+            }
61
+            if (string.IsNullOrEmpty(textBox_tk.Text))
62
+            {
63
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择截图表所在位置");
64
+                return;
65
+            }
66
+            if (string.IsNullOrEmpty(textBox_iplfiles.Text))
67
+            {
68
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择替换后文件保存位置");
69
+                return;
70
+            }
71
+            if (string.IsNullOrEmpty(textBox_tkn.Text))
72
+            {
73
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入结合表图框所在图层");
74
+                return;
75
+            }
76
+            if (string.IsNullOrEmpty(textBox_tfh.Text))
77
+            {
78
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请输入结合表图幅号所在图层");
79
+                return;
80
+            }
81
+            if (string.IsNullOrEmpty(comboBox_blc.Text))
82
+            {
83
+                GrxCAD.ApplicationServices.Application.ShowAlertDialog("请选择比例尺");
84
+                return;
85
+            }
86
+            getThumbnail getthumbnail = new getThumbnail();
87
+            string blctext = comboBox_blc.Text;
88
+            int blcindex = blctext.LastIndexOf(':');
89
+            string strblc = blctext.Substring(blcindex + 1);
90
+            double blc = Convert.ToDouble(strblc);
91
+
92
+            getThumbnail.bl = blc / 500.0;
93
+            getThumbnail.tc_tfh = textBox_tfh.Text.Trim();
94
+            getThumbnail.tc_tk = textBox_tkn.Text.Trim();
95
+
96
+            #region 外图框与接图表距离
97
+            //if (blc == 500)
98
+            //{
99
+            //    getThumbnail.jtk = 1;
100
+            //}
101
+            //if (blc == 1000)
102
+            //{
103
+            //    getThumbnail.jtk = 1;
104
+            //}
105
+            //if (blc == 2000)
106
+            //{
107
+            //    getThumbnail.jtk = 2;
108
+            //}
109
+            //if (blc == 5000)
110
+            //{
111
+            //    getThumbnail.jtk = 4;
112
+            //}
113
+            //if (blc == 10000)
114
+            //{
115
+            //    getThumbnail.jtk = 8;
116
+            //}
117
+            //if (blc == 20000)
118
+            //{
119
+            //    getThumbnail.jtk = 16;
120
+            //}
121
+            #endregion
122
+            getthumbnail.openDwg(textBox_files.Text, textBox_tk.Text, textBox_iplfiles.Text);
123
+
124
+            Properties.Settings.Default.files = textBox_files.Text;
125
+            Properties.Settings.Default.jtb = textBox_tk.Text;
126
+            Properties.Settings.Default.svpath = textBox_iplfiles.Text;
127
+            Properties.Settings.Default.tk = textBox_tkn.Text;
128
+            Properties.Settings.Default.tfh = textBox_tfh.Text;
129
+            Properties.Settings.Default.Save();
130
+            this.Close();
131
+
132
+            //getThumbnail getthumbnail = new getThumbnail();
133
+            //getThumbnail.bl = 4;
134
+            //getThumbnail.tc_tfh = "0";
135
+            //getThumbnail.tc_tk = "TK";
136
+            //getthumbnail.openDwg("F://2022//2022-11//接图表替换//t//1", "F://2022//2022-11//接图表替换//t//新建文件夹//Drawing2.dwg",
137
+            //    "F://2022//2022-11//接图表替换//t");
138
+            //getthumbnail.openDwg("F://2022//2022-11//接图表替换//重新套图框/雅砻江牙根二级水电站可研阶段库区地形地类图(含水下)-2000",
139
+            //    "F://2022//2022-11//接图表替换//2000库区分幅结合表-CGCS2000-102.dwg",
140
+            //    "F://2022//2022-11//接图表替换//重新套图框");
141
+        }
142
+    }
143
+}

加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinterpl.resx → 加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Form1.resx Просмотреть файл


+ 167
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/MainClass.cs Просмотреть файл

@@ -0,0 +1,167 @@
1
+using GrxCAD.ApplicationServices;
2
+using GrxCAD.EditorInput;
3
+using GrxCAD.Internal;
4
+using GrxCAD.Runtime;
5
+using Microsoft.Win32;
6
+using System;
7
+using System.Collections.Generic;
8
+using System.IO;
9
+using System.Linq;
10
+using System.Management;
11
+using System.Security.Cryptography;
12
+using System.Text;
13
+using System.Threading.Tasks;
14
+using System.Windows.Forms;
15
+
16
+[assembly: ExtensionApplication(typeof(Thumbnail.MainClass))]
17
+namespace Thumbnail
18
+{
19
+    public class MainClass : IExtensionApplication
20
+    {
21
+        public void Initialize()
22
+        {
23
+        }
24
+
25
+        public void Terminate()
26
+        {
27
+        }
28
+
29
+
30
+        public static string Flag = "";      //标记不同命令
31
+        public int num = 1; //0超过期限,-1空
32
+        public int slf_flag = 0;
33
+
34
+        //加密
35
+        private static string Encrypt(string str, string key)
36
+        {
37
+            DESCryptoServiceProvider des = new DESCryptoServiceProvider();
38
+            byte[] inputByteArray = Encoding.Default.GetBytes(str);
39
+            des.Key = ASCIIEncoding.ASCII.GetBytes(key);// 密钥
40
+            des.IV = ASCIIEncoding.ASCII.GetBytes(key);// 初始化向量
41
+            MemoryStream ms = new MemoryStream();
42
+            CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write);
43
+            cs.Write(inputByteArray, 0, inputByteArray.Length);
44
+            cs.FlushFinalBlock();
45
+            var retB = Convert.ToBase64String(ms.ToArray());
46
+            return retB;
47
+        }
48
+
49
+        //解密
50
+        private static string Decrypt(string pToDecrypt, string key)
51
+        {
52
+            DESCryptoServiceProvider des = new DESCryptoServiceProvider();
53
+            byte[] inputByteArray = Convert.FromBase64String(pToDecrypt);
54
+            des.Key = ASCIIEncoding.ASCII.GetBytes(key);
55
+            des.IV = ASCIIEncoding.ASCII.GetBytes(key);
56
+            MemoryStream ms = new MemoryStream();
57
+            CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write);
58
+            cs.Write(inputByteArray, 0, inputByteArray.Length);
59
+            // 如果两次密钥不一样,这一步可能会引发异常
60
+            cs.FlushFinalBlock();
61
+            return System.Text.Encoding.Default.GetString(ms.ToArray());
62
+        }
63
+
64
+        //日期加密并放到注册表中
65
+        private void AddRecord()
66
+        {
67
+            string byte2string = null;
68
+            ManagementClass mc = new ManagementClass("Win32_Processor");
69
+            ManagementObjectCollection moc = mc.GetInstances();
70
+            string strCpuID = null;
71
+            foreach (ManagementObject mo in moc)
72
+            {
73
+                strCpuID = mo.Properties["ProcessorId"].Value.ToString();
74
+                break;
75
+            }
76
+            byte[] from = Encoding.Default.GetBytes(strCpuID);
77
+            MD5CryptoServiceProvider makemd5 = new MD5CryptoServiceProvider();
78
+            byte[] target = makemd5.ComputeHash(from);
79
+            for (int i = 0; i < target.Length; i++)
80
+            {
81
+                byte2string += target[i].ToString("x");
82
+            }
83
+
84
+            Document acDoc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
85
+            Editor ed = acDoc.Editor;
86
+            PromptStringOptions options = new PromptStringOptions("机器码:" + byte2string + "\n输入注册码:");
87
+            options.AllowSpaces = true;
88
+            options.UseDefaultValue = true;
89
+            options.DefaultValue = "";
90
+
91
+            string encrypted = Encrypt(byte2string, "vnf4s3ru");
92
+            string userInput = ed.GetString(options).StringResult;
93
+            if (userInput == "")
94
+            {
95
+                num = -1;
96
+                return;
97
+            }
98
+            string jm = Decrypt(userInput, "vnf4s3ru");
99
+            string zcm = jm.Split(',')[0];
100
+            string zcm_encrypted = Encrypt(zcm, "vnf4s3ru");
101
+            string work_days = jm.Split(',')[1];
102
+            if (zcm_encrypted == encrypted)
103
+            {
104
+                string dt = DateTime.Now.ToString().Trim();
105
+                dt = dt + ',' + work_days;
106
+                string dt_ecpt = Encrypt(dt, "vnf4s3ru");
107
+                Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software", true).CreateSubKey("CADplugins").CreateSubKey("Register.INI").CreateSubKey(dt_ecpt);
108
+                MessageBox.Show("注册成功!");
109
+            }
110
+            else
111
+            {
112
+                MessageBox.Show("注册失败!\n zcm_encrypted =" + zcm_encrypted.ToString() + "\nencrypted=" + encrypted.ToString() + "\nzcm=" + zcm.ToString() + "\njm=" + jm.ToString());
113
+                MessageBox.Show("注册失败!");
114
+                num = -1;
115
+            }
116
+        }
117
+
118
+        public void Verify()
119
+        {
120
+            Microsoft.Win32.RegistryKey retkey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE", true).CreateSubKey("CADplugins").CreateSubKey("Register.INI");
121
+            //判断注册表中相应位置的subkey数量,如果为零的话则需要注册
122
+            if (retkey.SubKeyCount == 0)
123
+            {
124
+                AddRecord();
125
+            }
126
+            //如果不为零,判断日期是否在期限内
127
+            else
128
+            {
129
+                //转换为日期格式后检查当前日期之间和输入注册码的日期之间的间隔
130
+                string encrypted = retkey.GetSubKeyNames()[0];
131
+                string mw = Decrypt(encrypted, "vnf4s3ru");
132
+                string dt = mw.Split(',')[0];
133
+                int wkdays = Convert.ToInt32(mw.Split(',')[1]);
134
+                TimeSpan ts = DateTime.Now - DateTime.Parse(dt);
135
+                //如果超过期限,则删除所有subkey,显示注册码窗口
136
+                if (ts.Days > wkdays || ts.Days < 0)
137
+                {
138
+                    MessageBox.Show("超出有效期,请重新注册!");
139
+                    num = 0;
140
+                    foreach (string strRNum in retkey.GetSubKeyNames())
141
+                    {
142
+                        retkey.DeleteSubKey(strRNum);
143
+                    }
144
+                    AddRecord();
145
+                }
146
+                else
147
+                {
148
+                    num = 1;
149
+                }
150
+            }
151
+        }
152
+
153
+
154
+        [CommandMethod("JTB")]
155
+        public void thum()
156
+        {
157
+            Verify();
158
+
159
+            if (num == 1)
160
+            {
161
+                Form1 Frm = new Form1();
162
+                Frm.Show();
163
+            }
164
+        }
165
+
166
+    }
167
+}

+ 36
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Properties/AssemblyInfo.cs Просмотреть файл

@@ -0,0 +1,36 @@
1
+using System.Reflection;
2
+using System.Runtime.CompilerServices;
3
+using System.Runtime.InteropServices;
4
+
5
+// 有关程序集的常规信息通过以下
6
+// 特性集控制。更改这些特性值可修改
7
+// 与程序集关联的信息。
8
+[assembly: AssemblyTitle("Thumbnail")]
9
+[assembly: AssemblyDescription("")]
10
+[assembly: AssemblyConfiguration("")]
11
+[assembly: AssemblyCompany("")]
12
+[assembly: AssemblyProduct("Thumbnail")]
13
+[assembly: AssemblyCopyright("Copyright ©  2022")]
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("6461e815-2e03-4e8d-857f-e261a539e0d0")]
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")]

+ 86
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Properties/Settings.Designer.cs Просмотреть файл

@@ -0,0 +1,86 @@
1
+//------------------------------------------------------------------------------
2
+// <auto-generated>
3
+//     此代码由工具生成。
4
+//     运行时版本:4.0.30319.42000
5
+//
6
+//     对此文件的更改可能会导致不正确的行为,并且如果
7
+//     重新生成代码,这些更改将会丢失。
8
+// </auto-generated>
9
+//------------------------------------------------------------------------------
10
+
11
+namespace Thumbnail.Properties {
12
+    
13
+    
14
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
16
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17
+        
18
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19
+        
20
+        public static Settings Default {
21
+            get {
22
+                return defaultInstance;
23
+            }
24
+        }
25
+        
26
+        [global::System.Configuration.UserScopedSettingAttribute()]
27
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
29
+        public string files {
30
+            get {
31
+                return ((string)(this["files"]));
32
+            }
33
+            set {
34
+                this["files"] = value;
35
+            }
36
+        }
37
+        
38
+        [global::System.Configuration.UserScopedSettingAttribute()]
39
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
41
+        public string jtb {
42
+            get {
43
+                return ((string)(this["jtb"]));
44
+            }
45
+            set {
46
+                this["jtb"] = value;
47
+            }
48
+        }
49
+        
50
+        [global::System.Configuration.UserScopedSettingAttribute()]
51
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
53
+        public string svpath {
54
+            get {
55
+                return ((string)(this["svpath"]));
56
+            }
57
+            set {
58
+                this["svpath"] = value;
59
+            }
60
+        }
61
+        
62
+        [global::System.Configuration.UserScopedSettingAttribute()]
63
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
65
+        public string tk {
66
+            get {
67
+                return ((string)(this["tk"]));
68
+            }
69
+            set {
70
+                this["tk"] = value;
71
+            }
72
+        }
73
+        
74
+        [global::System.Configuration.UserScopedSettingAttribute()]
75
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
76
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
77
+        public string tfh {
78
+            get {
79
+                return ((string)(this["tfh"]));
80
+            }
81
+            set {
82
+                this["tfh"] = value;
83
+            }
84
+        }
85
+    }
86
+}

+ 21
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Properties/Settings.settings Просмотреть файл

@@ -0,0 +1,21 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Thumbnail.Properties" GeneratedClassName="Settings">
3
+  <Profiles />
4
+  <Settings>
5
+    <Setting Name="files" Type="System.String" Scope="User">
6
+      <Value Profile="(Default)" />
7
+    </Setting>
8
+    <Setting Name="jtb" Type="System.String" Scope="User">
9
+      <Value Profile="(Default)" />
10
+    </Setting>
11
+    <Setting Name="svpath" Type="System.String" Scope="User">
12
+      <Value Profile="(Default)" />
13
+    </Setting>
14
+    <Setting Name="tk" Type="System.String" Scope="User">
15
+      <Value Profile="(Default)" />
16
+    </Setting>
17
+    <Setting Name="tfh" Type="System.String" Scope="User">
18
+      <Value Profile="(Default)" />
19
+    </Setting>
20
+  </Settings>
21
+</SettingsFile>

+ 93
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Thumbnail.csproj Просмотреть файл

@@ -0,0 +1,93 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
+  <PropertyGroup>
5
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
+    <ProjectGuid>{325D619D-651B-42EA-BA93-01121126A2AF}</ProjectGuid>
8
+    <OutputType>Library</OutputType>
9
+    <AppDesignerFolder>Properties</AppDesignerFolder>
10
+    <RootNamespace>Thumbnail</RootNamespace>
11
+    <AssemblyName>Thumbnail</AssemblyName>
12
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13
+    <FileAlignment>512</FileAlignment>
14
+    <TargetFrameworkProfile />
15
+  </PropertyGroup>
16
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17
+    <DebugSymbols>true</DebugSymbols>
18
+    <DebugType>full</DebugType>
19
+    <Optimize>false</Optimize>
20
+    <OutputPath>bin\Debug\</OutputPath>
21
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
22
+    <ErrorReport>prompt</ErrorReport>
23
+    <WarningLevel>4</WarningLevel>
24
+  </PropertyGroup>
25
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26
+    <DebugType>pdbonly</DebugType>
27
+    <Optimize>true</Optimize>
28
+    <OutputPath>bin\Release\</OutputPath>
29
+    <DefineConstants>TRACE</DefineConstants>
30
+    <ErrorReport>prompt</ErrorReport>
31
+    <WarningLevel>4</WarningLevel>
32
+  </PropertyGroup>
33
+  <ItemGroup>
34
+    <Reference Include="gmap">
35
+      <HintPath>..\..\..\..\..\2024\04\浩辰\GstarCAD2021_Development_Tool\浩辰CAD2021_grxsdk\inc\gmap.dll</HintPath>
36
+      <Private>False</Private>
37
+    </Reference>
38
+    <Reference Include="gmdb">
39
+      <HintPath>..\..\..\..\..\2024\04\浩辰\GstarCAD2020_Development_Tool\浩辰CAD2020_grxsdk\inc\gmdb.dll</HintPath>
40
+      <Private>False</Private>
41
+    </Reference>
42
+    <Reference Include="GrxCAD.Interop">
43
+      <HintPath>..\..\..\..\..\2024\04\浩辰\GstarCAD2021_Development_Tool\浩辰CAD2021_grxsdk\inc-x64\GrxCAD.Interop.dll</HintPath>
44
+      <EmbedInteropTypes>True</EmbedInteropTypes>
45
+    </Reference>
46
+    <Reference Include="System" />
47
+    <Reference Include="System.Core" />
48
+    <Reference Include="System.Drawing" />
49
+    <Reference Include="System.Management" />
50
+    <Reference Include="System.Windows.Forms" />
51
+    <Reference Include="System.Xml.Linq" />
52
+    <Reference Include="System.Data.DataSetExtensions" />
53
+    <Reference Include="Microsoft.CSharp" />
54
+    <Reference Include="System.Data" />
55
+    <Reference Include="System.Xml" />
56
+  </ItemGroup>
57
+  <ItemGroup>
58
+    <Compile Include="Form1.cs">
59
+      <SubType>Form</SubType>
60
+    </Compile>
61
+    <Compile Include="Form1.Designer.cs">
62
+      <DependentUpon>Form1.cs</DependentUpon>
63
+    </Compile>
64
+    <Compile Include="getThumbnail.cs" />
65
+    <Compile Include="MainClass.cs" />
66
+    <Compile Include="Properties\AssemblyInfo.cs" />
67
+    <Compile Include="Properties\Settings.Designer.cs">
68
+      <AutoGen>True</AutoGen>
69
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
70
+      <DependentUpon>Settings.settings</DependentUpon>
71
+    </Compile>
72
+  </ItemGroup>
73
+  <ItemGroup>
74
+    <EmbeddedResource Include="Form1.resx">
75
+      <DependentUpon>Form1.cs</DependentUpon>
76
+    </EmbeddedResource>
77
+  </ItemGroup>
78
+  <ItemGroup>
79
+    <None Include="app.config" />
80
+    <None Include="Properties\Settings.settings">
81
+      <Generator>SettingsSingleFileGenerator</Generator>
82
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
83
+    </None>
84
+  </ItemGroup>
85
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
86
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
87
+       Other similar extension points exist, see Microsoft.Common.targets.
88
+  <Target Name="BeforeBuild">
89
+  </Target>
90
+  <Target Name="AfterBuild">
91
+  </Target>
92
+  -->
93
+</Project>

+ 8
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/Thumbnail.csproj.user Просмотреть файл

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
4
+    <StartAction>Program</StartAction>
5
+    <StartProgram>E:\浩辰CAD 2020\gcad.exe</StartProgram>
6
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
7
+  </PropertyGroup>
8
+</Project>

+ 27
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/app.config Просмотреть файл

@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="utf-8" ?>
2
+<configuration>
3
+    <configSections>
4
+        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
5
+            <section name="Thumbnail.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
6
+        </sectionGroup>
7
+    </configSections>
8
+    <userSettings>
9
+        <Thumbnail.Properties.Settings>
10
+            <setting name="files" serializeAs="String">
11
+                <value />
12
+            </setting>
13
+            <setting name="jtb" serializeAs="String">
14
+                <value />
15
+            </setting>
16
+            <setting name="svpath" serializeAs="String">
17
+                <value />
18
+            </setting>
19
+            <setting name="tk" serializeAs="String">
20
+                <value />
21
+            </setting>
22
+            <setting name="tfh" serializeAs="String">
23
+                <value />
24
+            </setting>
25
+        </Thumbnail.Properties.Settings>
26
+    </userSettings>
27
+</configuration>

+ 3
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Drawing1.dwl Просмотреть файл

@@ -0,0 +1,3 @@
1
+1
2
+DESKTOP-LEPG50N 
3
+2025定4埖16晩  14:56:20

+ 7
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Drawing1.dwl2 Просмотреть файл

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8">
2
+<whprops>
3
+<username>1</username>
4
+<machinename>DESKTOP-LEPG50N </machinename>
5
+<fullname></fullname>
6
+<datetime>2025年4月16日  14:56:20</datetime>
7
+</whprops>

Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.dll Просмотреть файл


+ 27
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.dll.config Просмотреть файл

@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="utf-8" ?>
2
+<configuration>
3
+    <configSections>
4
+        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
5
+            <section name="Thumbnail.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
6
+        </sectionGroup>
7
+    </configSections>
8
+    <userSettings>
9
+        <Thumbnail.Properties.Settings>
10
+            <setting name="files" serializeAs="String">
11
+                <value />
12
+            </setting>
13
+            <setting name="jtb" serializeAs="String">
14
+                <value />
15
+            </setting>
16
+            <setting name="svpath" serializeAs="String">
17
+                <value />
18
+            </setting>
19
+            <setting name="tk" serializeAs="String">
20
+                <value />
21
+            </setting>
22
+            <setting name="tfh" serializeAs="String">
23
+                <value />
24
+            </setting>
25
+        </Thumbnail.Properties.Settings>
26
+    </userSettings>
27
+</configuration>

Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail.pdb Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail_selewindow.dll Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/Thumbnail显示坐标.dll Просмотреть файл


+ 114
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/bin/Debug/acad.err Просмотреть файл

@@ -0,0 +1,114 @@
1
+
2
+
3
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x0000 Exception at a836507eh
4
+
5
+11/30/2022 at 14:18:02.977  ͼÐÎ: Drawing2.dwg
6
+-------------
7
+
8
+
9
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x0000 Exception at a8365e88h
10
+
11
+11/30/2022 at 14:27:28.945  ͼÐÎ: Drawing2.dwg
12
+-------------
13
+
14
+
15
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x0000 Exception at 9e8bd5a3h
16
+
17
+11/30/2022 at 15:32:57.998  ͼÐÎ: Drawing2.dwg
18
+-------------
19
+
20
+
21
+ÄÚ²¿´íÎó:  !dbobji.cpp@8615: eNotOpenForWrite
22
+
23
+12/01/2022 at 14:31:23.597  ͼÐÎ: Drawing2.dwg
24
+-------------
25
+
26
+
27
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0xc695f000 Exception at 9e887fddh
28
+
29
+12/02/2022 at 10:51:22.889  ͼÐÎ: Drawing2.dwg
30
+-------------
31
+
32
+
33
+ÄÚ²¿´íÎó:  !dbobji.cpp@8615: eNotOpenForWrite
34
+
35
+12/02/2022 at 14:24:10.162  ͼÐÎ: Drawing2.dwg
36
+-------------
37
+
38
+
39
+ÄÚ²¿´íÎó:  !dbobji.cpp@8615: eNotOpenForWrite
40
+
41
+12/02/2022 at 17:25:37.651  ͼÐÎ: Drawing2.dwg
42
+-------------
43
+
44
+
45
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x77d88828 Exception at 7d5b37b5h
46
+
47
+12/05/2022 at 15:26:47.083  ͼÐÎ: Drawing3.dwg
48
+-------------
49
+
50
+
51
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x87688828 Exception at 7d5b37b5h
52
+
53
+12/05/2022 at 15:33:29.418  ͼÐÎ: Drawing3.dwg
54
+-------------
55
+
56
+
57
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x3d388828 Exception at 7d5b37b5h
58
+
59
+12/05/2022 at 15:37:10.236  ͼÐÎ: Drawing3.dwg
60
+-------------
61
+
62
+
63
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x2ac88828 Exception at 7d5b37b5h
64
+
65
+12/05/2022 at 15:42:25.982  ͼÐÎ: Drawing3.dwg
66
+-------------
67
+
68
+
69
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0x4bf88828 Exception at 7d5b37b5h
70
+
71
+12/05/2022 at 15:57:20.359  ͼÐÎ: Drawing3.dwg
72
+-------------
73
+
74
+
75
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0xc9a88828 Exception at 7d5b37b5h
76
+
77
+12/05/2022 at 16:00:09.198  ͼÐÎ: Drawing3.dwg
78
+-------------
79
+
80
+
81
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0xf49d6828 Exception at 7d5b37b5h
82
+
83
+12/05/2022 at 16:04:38.335  ͼÐÎ: Drawing3.dwg
84
+-------------
85
+
86
+
87
+ÖÂÃü´íÎó:  Unhandled Access Violation Reading 0xe5a88828 Exception at 7d5b37b5h
88
+
89
+12/05/2022 at 16:12:30.329  ͼÐÎ: Drawing3.dwg
90
+-------------
91
+
92
+
93
+ÄÚ²¿´íÎó:  !dbinsert.cpp@860: eNoDatabase
94
+
95
+12/06/2022 at 13:40:35.497  ͼÐÎ: Drawing2.dwg
96
+-------------
97
+
98
+
99
+ÄÚ²¿´íÎó:  !dbinsert.cpp@860: eNoDatabase
100
+
101
+12/06/2022 at 13:43:00.459  ͼÐÎ: Drawing2.dwg
102
+-------------
103
+
104
+
105
+ÄÚ²¿´íÎó:  !dbinsert.cpp@860: eNoDatabase
106
+
107
+12/06/2022 at 13:48:47.485  ͼÐÎ: Drawing2.dwg
108
+-------------
109
+
110
+
111
+ÄÚ²¿´íÎó:  !dbinsert.cpp@860: eNoDatabase
112
+
113
+12/06/2022 at 13:52:02.195  ͼÐÎ: Drawing2.dwg
114
+-------------

+ 2433
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/getThumbnail.cs
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 4
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs Просмотреть файл

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

+ 4
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs Просмотреть файл

@@ -0,0 +1,4 @@
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插件工具/Thumbnail_HC/Thumbnail/obj/Debug/DesignTimeResolveAssemblyReferences.cache Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Просмотреть файл


+ 0
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs Просмотреть файл


+ 0
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs Просмотреть файл


+ 0
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.Form1.resources Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.AssemblyReference.cache Просмотреть файл


+ 1
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.CoreCompileInputs.cache Просмотреть файл

@@ -0,0 +1 @@
1
+62f47f122ed5bba33de470ff262dff7385a93a56

+ 36
- 0
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.FileListAbsolute.txt Просмотреть файл

@@ -0,0 +1,36 @@
1
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\bin\Debug\Thumbnail.dll
2
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\bin\Debug\Thumbnail.pdb
3
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.dll
4
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.pdb
5
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.Form1.resources
6
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.GenerateResource.Cache
7
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.Reg.resources
8
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.AssemblyReference.cache
9
+F:\2022-11\牙根2000\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.CoreCompileInputs.cache
10
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\bin\Debug\Thumbnail.dll
11
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\bin\Debug\Thumbnail.pdb
12
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.AssemblyReference.cache
13
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.Form1.resources
14
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.Reg.resources
15
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.GenerateResource.cache
16
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.CoreCompileInputs.cache
17
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.dll
18
+F:\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.pdb
19
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\bin\Debug\Thumbnail.dll
20
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\bin\Debug\Thumbnail.pdb
21
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.Form1.resources
22
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.Reg.resources
23
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.GenerateResource.cache
24
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.CoreCompileInputs.cache
25
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.dll
26
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.pdb
27
+F:\2022\2022-11\接图表替换\Thumbnail\Thumbnail\obj\Debug\Thumbnail.csproj.AssemblyReference.cache
28
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.Form1.resources
29
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.GenerateResource.cache
30
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.CoreCompileInputs.cache
31
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.dll
32
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.pdb
33
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.dll
34
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.pdb
35
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\bin\Debug\Thumbnail.dll.config
36
+F:\2022\2022-11\接图表替换\Thumbnail_HC\Thumbnail\obj\Debug\Thumbnail.csproj.AssemblyReference.cache

Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.csproj.GenerateResource.cache Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.dll Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/Thumbnail_HC/Thumbnail/obj/Debug/Thumbnail.pdb Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/.vs/HCTools/v16/.suo Просмотреть файл


+ 51
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/App.config Просмотреть файл

@@ -1,6 +1,56 @@
1
-<?xml version="1.0" encoding="utf-8" ?>
1
+<?xml version="1.0" encoding="utf-8"?>
2 2
 <configuration>
3
+    <configSections>
4
+        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
5
+            <section name="HCTools.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
6
+        </sectionGroup>
7
+    </configSections>
3 8
     <startup> 
4 9
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
5 10
     </startup>
11
+  <runtime>
12
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13
+      <dependentAssembly>
14
+        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
15
+        <bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
16
+      </dependentAssembly>
17
+    </assemblyBinding>
18
+  </runtime>
19
+  <userSettings>
20
+    <HCTools.Properties.Settings>
21
+      <setting name="TFName" serializeAs="String">
22
+        <value />
23
+      </setting>
24
+      <setting name="Note2" serializeAs="String">
25
+        <value>2000国家大地坐标系,1985国家高程基准,等高距为1m。
26
+GB/T20257.1-2007 国家基本比例尺地图图式 第一部分
27
+1:500 1:1000 1:2000 地形图图式
28
+xxxx年xx月测制</value>
29
+      </setting>
30
+      <setting name="CTY" serializeAs="String">
31
+        <value>测图员 </value>
32
+      </setting>
33
+      <setting name="JCY" serializeAs="String">
34
+        <value>检查员 </value>
35
+      </setting>
36
+      <setting name="TDY" serializeAs="String">
37
+        <value>土调员 </value>
38
+      </setting>
39
+      <setting name="SDY" serializeAs="String">
40
+        <value>数调员 </value>
41
+      </setting>
42
+      <setting name="DH" serializeAs="String">
43
+        <value>0</value>
44
+      </setting>
45
+      <setting name="svpath" serializeAs="String">
46
+        <value />
47
+      </setting>
48
+      <setting name="secret" serializeAs="String">
49
+        <value />
50
+      </setting>
51
+      <setting name="dgj" serializeAs="String">
52
+        <value>1</value>
53
+      </setting>
54
+    </HCTools.Properties.Settings>
55
+  </userSettings>
6 56
 </configuration>

+ 71
- 2
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/AttributeForm.Designer.cs Просмотреть файл

@@ -33,8 +33,16 @@ namespace HCTools
33 33
             this.dataGridView_Info = new System.Windows.Forms.DataGridView();
34 34
             this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
35 35
             this.缩放至ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
36
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
37
+            this.button_cancelshow = new System.Windows.Forms.Button();
38
+            this.button_show = new System.Windows.Forms.Button();
39
+            this.button1 = new System.Windows.Forms.Button();
36 40
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Info)).BeginInit();
37 41
             this.contextMenuStrip1.SuspendLayout();
42
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
43
+            this.splitContainer1.Panel1.SuspendLayout();
44
+            this.splitContainer1.Panel2.SuspendLayout();
45
+            this.splitContainer1.SuspendLayout();
38 46
             this.SuspendLayout();
39 47
             // 
40 48
             // dataGridView_Info
@@ -46,8 +54,10 @@ namespace HCTools
46 54
             this.dataGridView_Info.Name = "dataGridView_Info";
47 55
             this.dataGridView_Info.RowHeadersWidth = 51;
48 56
             this.dataGridView_Info.RowTemplate.Height = 27;
49
-            this.dataGridView_Info.Size = new System.Drawing.Size(1010, 499);
57
+            this.dataGridView_Info.Size = new System.Drawing.Size(1010, 451);
50 58
             this.dataGridView_Info.TabIndex = 0;
59
+            this.dataGridView_Info.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_Info_CellClick);
60
+            this.dataGridView_Info.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_Info_RowHeaderMouseClick);
51 61
             this.dataGridView_Info.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.dataGridView_Info_SortCompare);
52 62
             // 
53 63
             // contextMenuStrip1
@@ -65,17 +75,72 @@ namespace HCTools
65 75
             this.缩放至ToolStripMenuItem.Text = "缩放至";
66 76
             this.缩放至ToolStripMenuItem.Click += new System.EventHandler(this.缩放至ToolStripMenuItem_Click);
67 77
             // 
78
+            // splitContainer1
79
+            // 
80
+            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
81
+            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
82
+            this.splitContainer1.Name = "splitContainer1";
83
+            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
84
+            // 
85
+            // splitContainer1.Panel1
86
+            // 
87
+            this.splitContainer1.Panel1.Controls.Add(this.dataGridView_Info);
88
+            // 
89
+            // splitContainer1.Panel2
90
+            // 
91
+            this.splitContainer1.Panel2.Controls.Add(this.button_cancelshow);
92
+            this.splitContainer1.Panel2.Controls.Add(this.button_show);
93
+            this.splitContainer1.Panel2.Controls.Add(this.button1);
94
+            this.splitContainer1.Size = new System.Drawing.Size(1010, 499);
95
+            this.splitContainer1.SplitterDistance = 451;
96
+            this.splitContainer1.TabIndex = 1;
97
+            // 
98
+            // button_cancelshow
99
+            // 
100
+            this.button_cancelshow.Location = new System.Drawing.Point(788, 5);
101
+            this.button_cancelshow.Name = "button_cancelshow";
102
+            this.button_cancelshow.Size = new System.Drawing.Size(107, 33);
103
+            this.button_cancelshow.TabIndex = 2;
104
+            this.button_cancelshow.Text = "取消显示选中";
105
+            this.button_cancelshow.UseVisualStyleBackColor = true;
106
+            this.button_cancelshow.Click += new System.EventHandler(this.button_cancelshow_Click);
107
+            // 
108
+            // button_show
109
+            // 
110
+            this.button_show.Location = new System.Drawing.Point(685, 5);
111
+            this.button_show.Name = "button_show";
112
+            this.button_show.Size = new System.Drawing.Size(80, 33);
113
+            this.button_show.TabIndex = 1;
114
+            this.button_show.Text = "显示选中";
115
+            this.button_show.UseVisualStyleBackColor = true;
116
+            this.button_show.Click += new System.EventHandler(this.button_show_Click);
117
+            // 
118
+            // button1
119
+            // 
120
+            this.button1.Location = new System.Drawing.Point(924, 5);
121
+            this.button1.Name = "button1";
122
+            this.button1.Size = new System.Drawing.Size(75, 33);
123
+            this.button1.TabIndex = 0;
124
+            this.button1.Text = "导 出";
125
+            this.button1.UseVisualStyleBackColor = true;
126
+            this.button1.Click += new System.EventHandler(this.button1_Click);
127
+            // 
68 128
             // AttributeForm
69 129
             // 
70 130
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
71 131
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
72 132
             this.ClientSize = new System.Drawing.Size(1010, 499);
73
-            this.Controls.Add(this.dataGridView_Info);
133
+            this.Controls.Add(this.splitContainer1);
74 134
             this.Name = "AttributeForm";
75 135
             this.Text = "属性表";
136
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AttributeForm_FormClosed);
76 137
             this.Load += new System.EventHandler(this.AttributeForm_Load);
77 138
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Info)).EndInit();
78 139
             this.contextMenuStrip1.ResumeLayout(false);
140
+            this.splitContainer1.Panel1.ResumeLayout(false);
141
+            this.splitContainer1.Panel2.ResumeLayout(false);
142
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
143
+            this.splitContainer1.ResumeLayout(false);
79 144
             this.ResumeLayout(false);
80 145
 
81 146
         }
@@ -85,5 +150,9 @@ namespace HCTools
85 150
         private System.Windows.Forms.DataGridView dataGridView_Info;
86 151
         private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
87 152
         private System.Windows.Forms.ToolStripMenuItem 缩放至ToolStripMenuItem;
153
+        private System.Windows.Forms.SplitContainer splitContainer1;
154
+        private System.Windows.Forms.Button button1;
155
+        private System.Windows.Forms.Button button_cancelshow;
156
+        private System.Windows.Forms.Button button_show;
88 157
     }
89 158
 }

+ 140
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/AttributeForm.cs Просмотреть файл

@@ -1,11 +1,13 @@
1 1
 using GrxCAD.ApplicationServices;
2 2
 using GrxCAD.DatabaseServices;
3
+using GrxCAD.EditorInput;
3 4
 using GrxCAD.Geometry;
4 5
 using System;
5 6
 using System.Collections.Generic;
6 7
 using System.ComponentModel;
7 8
 using System.Data;
8 9
 using System.Drawing;
10
+using System.IO;
9 11
 using System.Linq;
10 12
 using System.Text;
11 13
 using System.Threading.Tasks;
@@ -49,7 +51,7 @@ namespace HCTools
49 51
             //this.dataGridView_Info.RowHeadersVisible = false;
50 52
             this.dataGridView_Info.ReadOnly = true;
51 53
 
52
-            for (int i = 0;i<info_all.Count;i++)
54
+            for (int i = 0; i < info_all.Count; i++)
53 55
             {
54 56
                 dataGridView_Info.Rows.Add();
55 57
             }
@@ -134,5 +136,142 @@ namespace HCTools
134 136
                 throw;
135 137
             }
136 138
         }
139
+
140
+        private void button1_Click(object sender, EventArgs e)
141
+        {
142
+            SaveFileDialog saveFileDialog = new SaveFileDialog();
143
+            saveFileDialog.Filter = "Text Files|*.txt";
144
+            saveFileDialog.Title = "保存txt文件";
145
+            saveFileDialog.FileName = "导出数据.txt";
146
+
147
+            if (saveFileDialog.ShowDialog() == DialogResult.OK)
148
+            {
149
+                // 使用 StreamWriter 写入文件
150
+                using (StreamWriter writer = new StreamWriter(saveFileDialog.FileName, false, Encoding.UTF8))
151
+                {
152
+                    // 写入列标题
153
+                    for (int i = 0; i < dataGridView_Info.Columns.Count; i++)
154
+                    {
155
+                        writer.Write(dataGridView_Info.Columns[i].HeaderText);
156
+                        if (i < dataGridView_Info.Columns.Count - 1)
157
+                        {
158
+                            writer.Write("\t");
159
+                        }
160
+                    }
161
+                    writer.WriteLine();
162
+
163
+                    // 写入数据
164
+                    //判断是否有被选中数据,有的话导出选中的
165
+                    int flag = 0;
166
+                    foreach (DataGridViewRow row in dataGridView_Info.Rows)
167
+                    {
168
+                        if (row.Selected == true)
169
+                            flag = 1;
170
+                    }
171
+                    if (flag == 0)
172
+                    {
173
+                        for (int i = 0; i < dataGridView_Info.Rows.Count; i++)
174
+                        {
175
+                            for (int j = 0; j < dataGridView_Info.Columns.Count; j++)
176
+                            {
177
+                                writer.Write(dataGridView_Info.Rows[i].Cells[j].Value.ToString());
178
+                                if (j < dataGridView_Info.Columns.Count - 1)
179
+                                {
180
+                                    writer.Write("\t");
181
+                                }
182
+                            }
183
+                            writer.WriteLine();
184
+                        }
185
+                    }
186
+                    else if (flag == 1)
187
+                    {
188
+                        for (int i = 0; i < dataGridView_Info.Rows.Count; i++)
189
+                        {
190
+                            if (dataGridView_Info.Rows[i].Selected == true)
191
+                            {
192
+                                for (int j = 0; j < dataGridView_Info.Columns.Count; j++)
193
+                                {
194
+                                    writer.Write(dataGridView_Info.Rows[i].Cells[j].Value.ToString());
195
+                                    if (j < dataGridView_Info.Columns.Count - 1)
196
+                                    {
197
+                                        writer.Write("\t");
198
+                                    }
199
+                                }
200
+                                writer.WriteLine();
201
+                            }
202
+                        }
203
+                    }
204
+                }
205
+
206
+                MessageBox.Show("数据导出成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
207
+            }
208
+        }
209
+
210
+        private void button_show_Click(object sender, EventArgs e)
211
+        {
212
+            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
213
+            Editor ed = doc.Editor;
214
+            PromptSelectionResult selectionResult = ed.SelectImplied();
215
+            if (selectionResult.Status == PromptStatus.OK)
216
+            {
217
+                SelectionSet selectionSet = selectionResult.Value;
218
+                using (Transaction trans = doc.TransactionManager.StartTransaction())
219
+                {
220
+                    foreach (SelectedObject selectedObject in selectionSet)
221
+                    {
222
+                        ObjectId objectId = selectedObject.ObjectId;
223
+                        for (int i = 0; i < objid_all.Count; i++)
224
+                        {
225
+                            if (objectId == objid_all[i])
226
+                                this.dataGridView_Info.Rows[i].Selected = true;
227
+                        }
228
+                    }
229
+                    trans.Commit();
230
+                }
231
+                foreach (DataGridViewRow row in dataGridView_Info.Rows)
232
+                {   
233
+                    row.Visible = row.Selected;
234
+                }
235
+            }
236
+        }
237
+
238
+        private void button_cancelshow_Click(object sender, EventArgs e)
239
+        {
240
+            foreach (DataGridViewRow row in dataGridView_Info.Rows)
241
+            {
242
+                row.Visible = true;
243
+            }
244
+        }
245
+
246
+        private void AttributeForm_FormClosed(object sender, FormClosedEventArgs e)
247
+        {
248
+            info_all.Clear();
249
+            objid_all.Clear();
250
+        }
251
+
252
+        private void dataGridView_Info_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
253
+        {
254
+            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
255
+            Editor ed = doc.Editor;
256
+            List<ObjectId> ids = new List<ObjectId>(); 
257
+            for(int i =0; i<this.dataGridView_Info.Rows.Count;i++)
258
+            {
259
+                if (this.dataGridView_Info.Rows[i].Selected == true)
260
+                {
261
+                    ids.Add(objid_all[i]);
262
+                }
263
+            }
264
+            ObjectId[] objid = ids.ToArray();
265
+            ed.SetImpliedSelection(objid);
266
+        }
267
+
268
+        private void dataGridView_Info_CellClick(object sender, DataGridViewCellEventArgs e)
269
+        {
270
+            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
271
+            Editor ed = doc.Editor;
272
+            List<ObjectId> ids = new List<ObjectId>();
273
+            ObjectId[] objid = ids.ToArray();
274
+            ed.SetImpliedSelection(objid);
275
+        }
137 276
     }
138 277
 }

+ 177
- 70
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/CMCgis_Basicfunction.cs Просмотреть файл

@@ -9,7 +9,7 @@ using GrxCAD.DatabaseServices;
9 9
 using GrxCAD.ApplicationServices;
10 10
 using GrxCAD.EditorInput;
11 11
 using GrxCAD.Internal;
12
-
12
+using System.Windows.Forms;
13 13
 
14 14
 namespace HCTools
15 15
 {
@@ -54,9 +54,9 @@ namespace HCTools
54 54
         {
55 55
             ObjectId[] ids = null;
56 56
 
57
-            Document doc = Application.DocumentManager.MdiActiveDocument;
57
+            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
58 58
             Database db = doc.Database;
59
-            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
59
+            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
60 60
 
61 61
             TypedValue[] value = new TypedValue[]
62 62
             {
@@ -90,9 +90,9 @@ namespace HCTools
90 90
         {
91 91
             ObjectId[] ids = null;
92 92
 
93
-            Document doc = Application.DocumentManager.MdiActiveDocument;
93
+            Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
94 94
             Database db = doc.Database;
95
-            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
95
+            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
96 96
 
97 97
             TypedValue[] value = new TypedValue[]
98 98
             {
@@ -137,6 +137,21 @@ namespace HCTools
137 137
             doclock.Dispose();
138 138
             return ent;
139 139
         }
140
+        public static Entity GetDBObjectforW(ObjectId i)
141
+        {
142
+            //Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
143
+            //Database db = doc.Database;
144
+            Database db = HostApplicationServices.WorkingDatabase;
145
+            Entity ent = null;
146
+            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
147
+            using (Transaction tr = db.TransactionManager.StartTransaction())
148
+            {
149
+                ent = (Entity)tr.GetObject(i, OpenMode.ForWrite, true);
150
+                tr.Commit();
151
+            }
152
+            doclock.Dispose();
153
+            return ent;
154
+        }
140 155
 
141 156
 
142 157
         /// <summary>
@@ -863,6 +878,11 @@ namespace HCTools
863 878
             {
864 879
                 dist = 100;
865 880
 
881
+            }
882
+            if (BLC == 500)
883
+            {
884
+                dist = 50;
885
+
866 886
             }
867 887
             getinfo();
868 888
             for (int i = 0; i < TKpts.Count; i++)
@@ -912,7 +932,7 @@ namespace HCTools
912 932
 
913 933
                 //新建一个dwg
914 934
                 string templatePath = "acad.dwt";
915
-                DocumentCollection documentcoll = Application.DocumentManager;
935
+                DocumentCollection documentcoll = GrxCAD.ApplicationServices.Application.DocumentManager;
916 936
                 Document document = documentcoll.Add(templatePath);
917 937
                 Database database = document.Database;
918 938
 
@@ -934,8 +954,10 @@ namespace HCTools
934 954
                 draw();
935 955
 
936 956
                 zoom();
937
-                database.SaveAs(TKInfo.SV + "\\" + Number.ToString() + ".dwg", DwgVersion.AC1024);
938
-                document.CloseAndSave(Number.ToString() + ".dwg");
957
+                //database.SaveAs(TKInfo.SV + "\\" + Number.ToString() + ".dwg", DwgVersion.AC1024);
958
+                database.SaveAs(TKInfo.SV + "\\" + Number.ToString() + ".dwg", true, DwgVersion.AC1021, database.SecurityParameters);
959
+                //document.CloseAndSave(Number.ToString() + ".dwg");
960
+                document.CloseAndDiscard();
939 961
             }
940 962
         }
941 963
 
@@ -1079,6 +1101,30 @@ namespace HCTools
1079 1101
 
1080 1102
             }
1081 1103
 
1104
+            if (BLC == 500)
1105
+            {
1106
+                len = len / 4;        //分幅框标长度
1107
+                D22 = D22 / 4;        //内图廓线和外图廓线距离
1108
+                D1 = D1 / 4;        //间距为1
1109
+                D2 = D2 / 4;        //间距为2
1110
+                D3 = D3 / 4;        //间距为3
1111
+                D4 = D4 / 4;        //间距为4
1112
+                D4_8 = D4_8 / 4;      //间距为4.8   
1113
+                D5 = D5 / 4;        //间距为5  
1114
+                D6 = D6 / 4;        //间距为6
1115
+                D7 = D7 / 4;        //间距为7
1116
+                D8 = D8 / 4;        //间距为8
1117
+                D10 = D10 / 4;      //间距为10
1118
+                D12 = D12 / 4;      //间距为12
1119
+                D140 = D140 / 4;      //右下角附注
1120
+                D90 = D90 / 4;
1121
+                D48 = D48 / 4;
1122
+
1123
+                dist1 = dist1 / 4;        //接图表第一格填充间距
1124
+                dist2 = dist2 / 4;  //接图表填充间距
1125
+
1126
+            }
1127
+
1082 1128
 
1083 1129
             ObjectId HZ = gettextstyleID("HZ");
1084 1130
             ObjectId st = gettextstyleID("st");
@@ -1112,8 +1158,8 @@ namespace HCTools
1112 1158
             Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
1113 1159
 
1114 1160
 
1115
-            try
1116
-            {
1161
+            //try
1162
+            //{
1117 1163
 
1118 1164
 
1119 1165
                 //内图廓
@@ -1122,7 +1168,7 @@ namespace HCTools
1122 1168
                 Point3dCollection In1 = new Point3dCollection();
1123 1169
                 In1.Add(new Point3d(LT.X, LT.Y + D22 + D1, 0));
1124 1170
                 In1.Add(new Point3d(LB.X, LB.Y - D22 - D1, 0));
1125
-                Polyline2d LeftLine = new Polyline2d(Poly2dType.SimplePoly, In1, 0, true, 0, 0, null);
1171
+                Polyline2d LeftLine = new Polyline2d(Poly2dType.SimplePoly, In1, 0, false, 0, 0, null);
1126 1172
                 //LeftLine.Color = GrxCAD.Colors.Color.FromColor(System.Drawing.Color.Red);
1127 1173
                 LeftLine.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1128 1174
                 LeftLine.Layer = layername;
@@ -1135,7 +1181,7 @@ namespace HCTools
1135 1181
                 Point3dCollection In2 = new Point3dCollection();
1136 1182
                 In2.Add(new Point3d(LB.X - D22 - D1, LB.Y, 0));
1137 1183
                 In2.Add(new Point3d(RB.X + D22 + D1, RB.Y, 0));
1138
-                Polyline2d LowLine = new Polyline2d(Poly2dType.SimplePoly, In2, 0, true, 0, 0, null);
1184
+                Polyline2d LowLine = new Polyline2d(Poly2dType.SimplePoly, In2, 0, false, 0, 0, null);
1139 1185
                 LowLine.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1140 1186
 
1141 1187
                 LowLine.SetDatabaseDefaults();
@@ -1146,7 +1192,7 @@ namespace HCTools
1146 1192
                 Point3dCollection In3 = new Point3dCollection();
1147 1193
                 In3.Add(new Point3d(RT.X, RT.Y + D22 + D1, 0));
1148 1194
                 In3.Add(new Point3d(RB.X, RB.Y - D22 - D1, 0));
1149
-                Polyline2d RightLine = new Polyline2d(Poly2dType.SimplePoly, In3, 0, true, 0, 0, null);
1195
+                Polyline2d RightLine = new Polyline2d(Poly2dType.SimplePoly, In3, 0, false, 0, 0, null);
1150 1196
                 RightLine.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1151 1197
                 RightLine.Layer = layername;
1152 1198
 
@@ -1158,7 +1204,7 @@ namespace HCTools
1158 1204
                 Point3dCollection In4 = new Point3dCollection();
1159 1205
                 In4.Add(new Point3d(LT.X - D22 - D1, LT.Y, 0));
1160 1206
                 In4.Add(new Point3d(RT.X + D22 + D1, RT.Y, 0));
1161
-                Polyline2d TOPLine = new Polyline2d(Poly2dType.SimplePoly, In4, 0, true, 0, 0, null);
1207
+                Polyline2d TOPLine = new Polyline2d(Poly2dType.SimplePoly, In4, 0, false, 0, 0, null);
1162 1208
                 TOPLine.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1163 1209
                 TOPLine.Layer = layername;
1164 1210
 
@@ -1175,18 +1221,21 @@ namespace HCTools
1175 1221
                 Outcoll.Add(new Point3d(LT.X - D22 - D1, LT.Y + D22 + D1, 0));
1176 1222
 
1177 1223
                 Polyline2d line = new Polyline2d(Poly2dType.SimplePoly, Outcoll, 0, true, D2, D2, null);
1224
+            
1178 1225
                 line.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 1);
1179 1226
                 line.Layer = layername;
1180 1227
 
1181 1228
                 line.SetDatabaseDefaults();
1182 1229
                 blocktablerecord.AppendEntity(line);
1183 1230
                 traction.AddNewlyCreatedDBObject(line, true);
1231
+            line.UpgradeOpen();
1232
+            line.ConstantWidth = D2;
1184 1233
 
1185 1234
 
1186 1235
 
1187 1236
 
1188
-                //分幅框标
1189
-                for (int i = 1; i <= 4; i++)
1237
+            //分幅框标
1238
+            for (int i = 1; i <= 4; i++)
1190 1239
                 {
1191 1240
                     for (int j = 1; j <= 4; j++)
1192 1241
                     {
@@ -1310,21 +1359,50 @@ namespace HCTools
1310 1359
 
1311 1360
                 List<string> RLnote = new List<string>();
1312 1361
                 string str = "";
1313
-                str = "测图员 " + TKInfo.CTY;
1362
+            if (string.IsNullOrEmpty(TKInfo.CTY) == false)
1363
+            {
1364
+                str = TKInfo.CTY;
1314 1365
                 RLnote.Add(str);
1366
+            }
1315 1367
                 if (string.IsNullOrEmpty(TKInfo.TDY) == false)
1316 1368
                 {
1317
-                    str = "土调员 " + TKInfo.TDY;
1369
+                    str = TKInfo.TDY;
1318 1370
                     RLnote.Add(str);
1319 1371
                 }
1320
-                str = "数化员 " + TKInfo.SHY;
1372
+            if (string.IsNullOrEmpty(TKInfo.SHY) == false)
1373
+            {
1374
+                str = TKInfo.SHY;
1321 1375
                 RLnote.Add(str);
1322
-                str = "检查员 " + TKInfo.JCY;
1376
+            }
1377
+            if (string.IsNullOrEmpty(TKInfo.JCY) == false)
1378
+            {
1379
+                str = TKInfo.JCY;
1323 1380
                 RLnote.Add(str);
1381
+            }
1324 1382
                 str = "复查员 ";
1325 1383
                 RLnote.Add(str);
1384
+            //秘密等级
1385
+            if (string.IsNullOrEmpty(TKInfo.Secret) == false)
1386
+            {
1387
+                str = TKInfo.Secret;
1388
+                DBText text1_secret = new DBText();
1389
+                text1_secret.TextString = str;
1390
+                text1_secret.WidthFactor = 1.333;
1391
+                text1_secret.HorizontalMode = TextHorizontalMode.TextLeft;
1392
+                text1_secret.Height = D6;
1393
+                text1_secret.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
1394
+                text1_secret.Layer = layername;
1395
+                text1_secret.TextStyleId = ht;
1396
+                double s_x = RT.X - (text1_secret.Bounds.Value.MaxPoint.X - text1_secret.Bounds.Value.MinPoint.X) - D1;
1397
+                double s_y = LT.Y + D22 + D2 + D10;
1398
+                text1_secret.Position = new Point3d(s_x, s_y, 0);
1399
+
1400
+                text1_secret.SetDatabaseDefaults();
1401
+                blocktablerecord.AppendEntity(text1_secret);
1402
+                traction.AddNewlyCreatedDBObject(text1_secret, true);
1403
+            }
1326 1404
 
1327
-                for (int i = 0; i < RLnote.Count; i++)
1405
+            for (int i = 0; i < RLnote.Count; i++)
1328 1406
                 {
1329 1407
                     yy = yy - D6;
1330 1408
                     DBText text1_fz = new DBText();
@@ -1351,7 +1429,7 @@ namespace HCTools
1351 1429
                 DBText text2_blc = new DBText();
1352 1430
                 text2_blc.TextString = "1:" + BLC;
1353 1431
                 text2_blc.Position = new Point3d(xx, yy, 0);
1354
-                text2_blc.Height = D6;
1432
+                text2_blc.Height = D8;
1355 1433
                 text2_blc.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 2);
1356 1434
                 text2_blc.Layer = layername;
1357 1435
                 text2_blc.HorizontalMode = TextHorizontalMode.TextCenter;
@@ -1405,30 +1483,30 @@ namespace HCTools
1405 1483
 
1406 1484
 
1407 1485
                 //图名后的日期
1408
-                string Time_str = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString("00");
1409
-
1410
-                //左括号
1411
-                string tem_str = text4_tm.TextString;
1412
-                xx = (RB.X - LB.X) / 2 + LB.X + tem_str.Length / 2.0 * (D12);
1413
-                yy = LT.Y + D22 + D2 + D10 + D10 + D6;
1414
-                DBText text_F = new DBText();
1415
-                string black = "";
1416
-                for (int i = 0; i < D12; i++)
1417
-                {
1418
-                    black += " ";
1419
-                }
1420
-                text_F.TextString = "(" + Time_str + ")";
1421
-                text_F.Position = new Point3d(xx, yy, 0);
1422
-                text_F.Height = D12;
1423
-                text_F.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 2);
1424
-                text_F.Layer = layername;
1425
-                text_F.HorizontalMode = TextHorizontalMode.TextLeft;
1426
-                //text_F.TextStyleId = ID12;
1427
-                text_F.TextStyleId = ht;
1486
+                //string Time_str = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString("00");
1428 1487
 
1429
-                text_F.SetDatabaseDefaults();
1430
-                blocktablerecord.AppendEntity(text_F);
1431
-                traction.AddNewlyCreatedDBObject(text_F, true);
1488
+                ////左括号
1489
+                //string tem_str = text4_tm.TextString;
1490
+                //xx = (RB.X - LB.X) / 2 + LB.X + tem_str.Length / 2.0 * (D12);
1491
+                //yy = LT.Y + D22 + D2 + D10 + D10 + D6;
1492
+                //DBText text_F = new DBText();
1493
+                //string black = "";
1494
+                //for (int i = 0; i < D12; i++)
1495
+                //{
1496
+                //    black += " ";
1497
+                //}
1498
+                //text_F.TextString = "(" + Time_str + ")";
1499
+                //text_F.Position = new Point3d(xx, yy, 0);
1500
+                //text_F.Height = D12;
1501
+                //text_F.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 2);
1502
+                //text_F.Layer = layername;
1503
+                //text_F.HorizontalMode = TextHorizontalMode.TextLeft;
1504
+                ////text_F.TextStyleId = ID12;
1505
+                //text_F.TextStyleId = ht;
1506
+
1507
+                //text_F.SetDatabaseDefaults();
1508
+                //blocktablerecord.AppendEntity(text_F);
1509
+                //traction.AddNewlyCreatedDBObject(text_F, true);
1432 1510
 
1433 1511
 
1434 1512
                 //日期
@@ -1465,8 +1543,9 @@ namespace HCTools
1465 1543
 
1466 1544
                     if (i == strs.Length - 3)
1467 1545
                     {
1546
+                    string[] str1 = strs[i].Split(' ');
1468 1547
                         DBText text_fz1 = new DBText();
1469
-                        text_fz1.TextString = "GB/T20257.1-2007";
1548
+                        text_fz1.TextString = str1[0];
1470 1549
                         text_fz1.Position = new Point3d(xx, yy, 0);
1471 1550
                         text_fz1.Height = D6;
1472 1551
                         text_fz1.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
@@ -1478,9 +1557,9 @@ namespace HCTools
1478 1557
                         blocktablerecord.AppendEntity(text_fz1);
1479 1558
                         traction.AddNewlyCreatedDBObject(text_fz1, true);
1480 1559
 
1481
-                        xx = xx + D140 / 2;
1560
+                        xx = xx + D140 / 2 + D2;
1482 1561
                         DBText text_fz2 = new DBText();
1483
-                        text_fz2.TextString = "国家基本比例尺地图图式 第一部分:";
1562
+                        text_fz2.TextString = str1[1] + " " + str1[2];
1484 1563
                         text_fz2.Position = new Point3d(xx, yy, 0);
1485 1564
                         text_fz2.Height = D6;
1486 1565
                         text_fz2.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
@@ -1497,8 +1576,9 @@ namespace HCTools
1497 1576
                     }
1498 1577
                     else if (i == strs.Length - 2)
1499 1578
                     {
1579
+                    string[] str2 = strs[i].Split(' ');
1500 1580
                         DBText text_1 = new DBText();
1501
-                        text_1.TextString = "1:500 1:1000 1:2000";
1581
+                        text_1.TextString = str2[0]+" "+ str2[1] + " "+ str2[2];
1502 1582
                         text_1.Position = new Point3d(xx, yy, 0);
1503 1583
                         text_1.Height = D6;
1504 1584
                         text_1.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
@@ -1512,7 +1592,7 @@ namespace HCTools
1512 1592
 
1513 1593
                         xx = xx + D90;
1514 1594
                         DBText text_2 = new DBText();
1515
-                        text_2.TextString = "地形图图式";
1595
+                        text_2.TextString = str2[3];
1516 1596
                         text_2.Position = new Point3d(xx, yy, 0);
1517 1597
                         text_2.Height = D6;
1518 1598
                         text_2.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
@@ -1680,7 +1760,7 @@ namespace HCTools
1680 1760
                     text_L.TextString = Left_Number;
1681 1761
                     text_L.Position = new Point3d(xx2, yy2, 0);
1682 1762
                     text_L.Height = D5;
1683
-                    text_L.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 3);
1763
+                    text_L.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
1684 1764
                     text_L.Layer = layername;
1685 1765
                     text_L.TextStyleId = HZ;
1686 1766
                     text_L.HorizontalMode = TextHorizontalMode.TextCenter;
@@ -1706,7 +1786,7 @@ namespace HCTools
1706 1786
                     text_R.TextString = Right_Number;
1707 1787
                     text_R.Position = new Point3d(xx2, yy2, 0);
1708 1788
                     text_R.Height = D5;
1709
-                    text_R.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 3);
1789
+                    text_R.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
1710 1790
                     text_R.Layer = layername;
1711 1791
                     text_R.TextStyleId = HZ;
1712 1792
                     text_R.HorizontalMode = TextHorizontalMode.TextCenter;
@@ -1725,7 +1805,7 @@ namespace HCTools
1725 1805
 
1726 1806
                     xx2 = xx1 + D90 / 3 / 2;
1727 1807
                     yy2 = yy1 + D48 / 3 * 2.5;
1728
-                    filjtb(Leftup_Number,traction, HZ, blocktablerecord, xx2, yy2);
1808
+                    filjtb(Leftup_Number,traction, HZ, blocktablerecord, xx2, yy2, D5);
1729 1809
                 }
1730 1810
                 //接图表首行——中
1731 1811
                 if (string.IsNullOrEmpty(Centrolup_Number) == false)
@@ -1735,7 +1815,7 @@ namespace HCTools
1735 1815
 
1736 1816
                     xx2 = xx1 + D90 / 3 * 1.5;
1737 1817
                     yy2 = yy1 + D48 / 3 * 2.5;
1738
-                    filjtb(Centrolup_Number,traction, HZ, blocktablerecord, xx2, yy2);
1818
+                    filjtb(Centrolup_Number,traction, HZ, blocktablerecord, xx2, yy2, D5);
1739 1819
                 }
1740 1820
                 //接图表首行——右
1741 1821
                 if (string.IsNullOrEmpty(Rightup_Number) == false)
@@ -1745,7 +1825,7 @@ namespace HCTools
1745 1825
 
1746 1826
                     xx2 = xx1 + D90 / 3 * 2.5;
1747 1827
                     yy2 = yy1 + D48 / 3 * 2.5;
1748
-                    filjtb(Rightup_Number,traction, HZ, blocktablerecord, xx2, yy2);
1828
+                    filjtb(Rightup_Number,traction, HZ, blocktablerecord, xx2, yy2, D5);
1749 1829
                 }
1750 1830
                 //接图表尾行——左
1751 1831
                 if (string.IsNullOrEmpty(Leftdown_Number) == false)
@@ -1755,7 +1835,7 @@ namespace HCTools
1755 1835
 
1756 1836
                     xx2 = xx1 + D90 / 3 / 2;
1757 1837
                     yy2 = yy1 + D48 / 3 / 2;
1758
-                    filjtb(Leftdown_Number,traction, HZ, blocktablerecord, xx2, yy2);
1838
+                    filjtb(Leftdown_Number,traction, HZ, blocktablerecord, xx2, yy2, D5);
1759 1839
                 }
1760 1840
                 //接图表尾行——中
1761 1841
                 if (string.IsNullOrEmpty(Centroldown_Number) == false)
@@ -1765,7 +1845,7 @@ namespace HCTools
1765 1845
 
1766 1846
                     xx2 = xx1 + D90 / 3 * 1.5;
1767 1847
                     yy2 = yy1 + D48 / 3 / 2;
1768
-                    filjtb(Centroldown_Number,traction, HZ, blocktablerecord, xx2, yy2);
1848
+                    filjtb(Centroldown_Number,traction, HZ, blocktablerecord, xx2, yy2, D5);
1769 1849
                 }
1770 1850
                 //接图表尾行——右
1771 1851
                 if (string.IsNullOrEmpty(Rightdown_Number) == false)
@@ -1775,7 +1855,7 @@ namespace HCTools
1775 1855
 
1776 1856
                     xx2 = xx1 + D90 / 3 * 2.5;
1777 1857
                     yy2 = yy1 + D48 / 3 / 2;
1778
-                    filjtb(Rightdown_Number,traction, HZ, blocktablerecord, xx2, yy2);
1858
+                    filjtb(Rightdown_Number,traction, HZ, blocktablerecord, xx2, yy2, D5);
1779 1859
                 }
1780 1860
 
1781 1861
 
@@ -2213,19 +2293,22 @@ namespace HCTools
2213 2293
                 blocktablerecord.AppendEntity(text22);
2214 2294
                 traction.AddNewlyCreatedDBObject(text22, true);
2215 2295
 
2296
+
2297
+
2298
+                //document.Database.SaveAs(TKInfo.SV + "\\" + Number.ToString() + ".dwg", true, DwgVersion.AC1021, document.Database.SecurityParameters);
2216 2299
                 //database.SaveAs(TKInfo.SV + "\\" + Number.ToString() + ".dwg", DwgVersion.AC1024);
2217 2300
                 traction.Commit();
2218 2301
 
2219
-            }
2220
-            catch (GrxCAD.Runtime.Exception)
2221
-            {
2222
-
2223
-            }
2224
-            finally
2225
-            {
2302
+            //}
2303
+            //catch (GrxCAD.Runtime.Exception e)
2304
+            //{
2305
+            //    MessageBox.Show (e.Message);
2306
+            //}
2307
+            //finally
2308
+            //{
2226 2309
                 traction.Dispose();
2227 2310
                 documentlock.Dispose();
2228
-            }
2311
+            //}
2229 2312
 
2230 2313
         }
2231 2314
 
@@ -2415,6 +2498,23 @@ namespace HCTools
2415 2498
             Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2416 2499
             using (Transaction traction = database.TransactionManager.StartTransaction())
2417 2500
             {
2501
+
2502
+                //删除坐标原点多段线
2503
+                Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2504
+                Point3d pt1 = new Point3d(-1, 1, 0);
2505
+                Point3d pt2 = new Point3d(0, 0, 0);
2506
+                PromptSelectionResult psr = ed.SelectCrossingWindow(pt1, pt2);
2507
+                if (psr.Status == PromptStatus.OK)
2508
+                {
2509
+                    SelectionSet sSet = psr.Value;
2510
+                    ObjectId[] ids = sSet.GetObjectIds();
2511
+                    foreach (ObjectId id in ids)
2512
+                    {
2513
+                        Entity entity1 = traction.GetObject(id, OpenMode.ForWrite) as Entity;
2514
+                        entity1.Erase();
2515
+                    }
2516
+                }
2517
+
2418 2518
                 ViewTableRecord currview = editor.GetCurrentView();
2419 2519
                 currview.CenterPoint = new Point2d((RT.X - LT.X) / 2 + LT.X, (LT.Y - LB.Y) / 2 + LB.Y);
2420 2520
                 currview.ViewDirection = new Vector3d(0, 0, 1);
@@ -2445,9 +2545,16 @@ namespace HCTools
2445 2545
 
2446 2546
                 Editor editor = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
2447 2547
                 TypedValue[] typed = new TypedValue[1];
2448
-                typed.SetValue(new TypedValue((int)DxfCode.Start, "3dFace,LWPolyline"), 0);
2548
+                typed.SetValue(new TypedValue((int)DxfCode.Start, "Polyline,LWPolyline"), 0);
2449 2549
                 SelectionFilter filter = new SelectionFilter(typed);
2450 2550
 
2551
+                ViewTableRecord currview = editor.GetCurrentView();
2552
+                currview.CenterPoint = new Point2d((RT.X - LT.X) / 2 + LT.X, (LT.Y - LB.Y) / 2 + LB.Y);
2553
+                currview.ViewDirection = new Vector3d(0, 0, 1);
2554
+                currview.Width = RT.X - LT.X + TKInfo.BLC / 10;
2555
+                currview.Height = LT.Y - LB.Y + TKInfo.BLC / 10;
2556
+                editor.SetCurrentView(currview);
2557
+
2451 2558
                 PromptSelectionResult psr = editor.SelectWindow(p1, p2, filter);
2452 2559
                 if (psr.Status == PromptStatus.OK)
2453 2560
                 {
@@ -2528,13 +2635,13 @@ namespace HCTools
2528 2635
         }
2529 2636
 
2530 2637
 
2531
-        private void filjtb(string num,Transaction traction,ObjectId HZ,BlockTableRecord blocktablerecord,double xx2,double yy2)
2638
+        private void filjtb(string num,Transaction traction,ObjectId HZ,BlockTableRecord blocktablerecord,double xx2,double yy2,double height)
2532 2639
         {
2533 2640
             DBText text_L = new DBText();
2534 2641
             text_L.TextString = num;
2535 2642
             text_L.Position = new Point3d(xx2, yy2, 0);
2536
-            text_L.Height = 5;
2537
-            text_L.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 3);
2643
+            text_L.Height = height;
2644
+            text_L.Color = GrxCAD.Colors.Color.FromColorIndex(GrxCAD.Colors.ColorMethod.ByColor, 4);
2538 2645
             text_L.Layer = layername;
2539 2646
             text_L.TextStyleId = HZ;
2540 2647
             text_L.HorizontalMode = TextHorizontalMode.TextCenter;

+ 2
- 2
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ChPLContradiction.cs Просмотреть файл

@@ -161,8 +161,8 @@ namespace HCTools
161 161
                 //currview.Height = windowheight;
162 162
                 //editor.SetCurrentView(currview);
163 163
 
164
-                Point3d p1 = new Point3d(p.x - 4, p.y - 4, 0);
165
-                Point3d p2 = new Point3d(p.x + 4, p.y + 4, 0);
164
+                Point3d p1 = new Point3d(p.x - 4 * blc / 2000, p.y - 4 * blc / 2000, 0);
165
+                Point3d p2 = new Point3d(p.x + 4 * blc / 2000, p.y + 4 * blc / 2000, 0);
166 166
                 TypedValue[] typedvalue = new TypedValue[2];
167 167
 
168 168
                 typedvalue.SetValue(new TypedValue((int)DxfCode.Start, "Text"), 0);

+ 9
- 7
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Chaginfos.cs Просмотреть файл

@@ -12,6 +12,7 @@ using GrxCAD.EditorInput;
12 12
 using GrxCAD.DatabaseServices;
13 13
 using GrxCAD.Geometry;
14 14
 using System.IO;
15
+using GrxCAD.ApplicationServices;
15 16
 
16 17
 namespace HCTools
17 18
 {
@@ -87,7 +88,7 @@ namespace HCTools
87 88
                 return;
88 89
             }
89 90
 
90
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
91
+            //Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
91 92
             dataGridView_Update.ReadOnly = true;
92 93
             for (int i = 0; i < dataGridView_Update.Rows.Count; i++)
93 94
             {
@@ -275,9 +276,10 @@ namespace HCTools
275 276
                     trans.Commit();
276 277
                 }
277 278
 
278
-
279
-                //2010版本格式
280
-                data.SaveAs(path_Save + "\\" + name, DwgVersion.AC1024);
279
+                //Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
280
+                //2007版本格式
281
+                //data.SaveAs(path_Save + "\\" + name, true, DwgVersion.AC1021, doc.Database.SecurityParameters);
282
+                data.SaveAs(path_Save + "\\" + name, DwgVersion.AC1021);
281 283
                 //2004版本格式
282 284
                 //data.SaveAs(path_Save + "\\" + name, DwgVersion.AC1800);
283 285
                 //2000版本格式
@@ -297,14 +299,14 @@ namespace HCTools
297 299
                 deleterecord = name + "\t" + deleterecord;
298 300
                 deleterecord += "\r\n";
299 301
 
300
-                System.IO.StreamWriter writer = new StreamWriter("F:\\recore.txt", true);
302
+                System.IO.StreamWriter writer = new StreamWriter(path_Save+"\\改动文件.txt", true);
301 303
                 writer.Write(deleterecord);
302 304
                 writer.Dispose();
303 305
             }
304 306
             if (j > 0)
305
-                ed.WriteMessage("修改成功!");
307
+                MessageBox.Show("修改成功!");
306 308
             else
307
-                ed.WriteMessage("未找到原始内容,修改失败!");
309
+                MessageBox.Show("未找到原始内容,修改失败!");
308 310
             this.Close();
309 311
         }
310 312
 

+ 2
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Conn.cs Просмотреть файл

@@ -103,6 +103,8 @@ namespace HCTools
103 103
                 int blcindex = blctext.LastIndexOf(':');
104 104
                 string strblc = blctext.Substring(blcindex + 1);
105 105
                 Inters.blc = Convert.ToInt32(strblc);
106
+                Inters.jqx = comboBox_jqx.Text;
107
+                Inters.sqx = comboBox_sqx.Text;
106 108
 
107 109
                 this.Close();
108 110
                 Inters eachints = new Inters();

+ 2
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/ContourLineFix.cs Просмотреть файл

@@ -168,6 +168,8 @@ namespace HCTools
168 168
             return true;
169 169
         }
170 170
     }
171
+
172
+
171 173
 }
172 174
 
173 175
 

+ 0
- 97
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinterpl.Designer.cs Просмотреть файл

@@ -1,97 +0,0 @@
1
-
2
-namespace HCTools
3
-{
4
-    partial class Dgxinterpl
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.textBox_dgj = new System.Windows.Forms.TextBox();
34
-            this.button_ok = new System.Windows.Forms.Button();
35
-            this.button_cancel = 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(55, 44);
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
-            // textBox_dgj
48
-            // 
49
-            this.textBox_dgj.Location = new System.Drawing.Point(139, 41);
50
-            this.textBox_dgj.Name = "textBox_dgj";
51
-            this.textBox_dgj.Size = new System.Drawing.Size(157, 25);
52
-            this.textBox_dgj.TabIndex = 1;
53
-            // 
54
-            // button_ok
55
-            // 
56
-            this.button_ok.Location = new System.Drawing.Point(47, 84);
57
-            this.button_ok.Name = "button_ok";
58
-            this.button_ok.Size = new System.Drawing.Size(75, 34);
59
-            this.button_ok.TabIndex = 2;
60
-            this.button_ok.Text = "确 定";
61
-            this.button_ok.UseVisualStyleBackColor = true;
62
-            this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
63
-            // 
64
-            // button_cancel
65
-            // 
66
-            this.button_cancel.Location = new System.Drawing.Point(256, 84);
67
-            this.button_cancel.Name = "button_cancel";
68
-            this.button_cancel.Size = new System.Drawing.Size(75, 34);
69
-            this.button_cancel.TabIndex = 3;
70
-            this.button_cancel.Text = "取 消";
71
-            this.button_cancel.UseVisualStyleBackColor = true;
72
-            this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click);
73
-            // 
74
-            // Dgxinterpl
75
-            // 
76
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
77
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
78
-            this.ClientSize = new System.Drawing.Size(375, 145);
79
-            this.Controls.Add(this.button_cancel);
80
-            this.Controls.Add(this.button_ok);
81
-            this.Controls.Add(this.textBox_dgj);
82
-            this.Controls.Add(this.label1);
83
-            this.Name = "Dgxinterpl";
84
-            this.Text = "Dgxinterpl";
85
-            this.ResumeLayout(false);
86
-            this.PerformLayout();
87
-
88
-        }
89
-
90
-        #endregion
91
-
92
-        private System.Windows.Forms.Label label1;
93
-        private System.Windows.Forms.TextBox textBox_dgj;
94
-        private System.Windows.Forms.Button button_ok;
95
-        private System.Windows.Forms.Button button_cancel;
96
-    }
97
-}

+ 0
- 38
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinterpl.cs Просмотреть файл

@@ -1,38 +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 Dgxinterpl : Form
14
-    {
15
-        public Dgxinterpl()
16
-        {
17
-            InitializeComponent();
18
-        }
19
-
20
-        private void button_ok_Click(object sender, EventArgs e)
21
-        {
22
-            if (textBox_dgj.Text == "")
23
-            {
24
-                MessageBox.Show("请输入等高距!");
25
-                return;
26
-            }
27
-            Dgxinters.dgj = Convert.ToInt32(textBox_dgj.Text);
28
-            Dgxinters dgxinter = new Dgxinters();
29
-            this.Close();
30
-            dgxinter.Interdgx();
31
-        }
32
-
33
-        private void button_cancel_Click(object sender, EventArgs e)
34
-        {
35
-            this.Close();
36
-        }
37
-    }
38
-}

+ 521
- 233
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Dgxinters.cs Просмотреть файл

@@ -12,21 +12,29 @@ namespace HCTools
12 12
 {
13 13
     class Dgxinters
14 14
     {
15
-        public struct Dgx_ct
15
+        public struct SQX
16 16
         {
17 17
             public Polyline pll;
18
-            public double elevation;
18
+            public List<Point3d> intersepts;
19 19
         }
20 20
 
21
-        public struct Angles
22
-        {
23
-            public double angle;
24
-            public int xh;
25
-        }
26
-
27
-        public static int dgj;
28 21
         public void Interdgx()
29 22
         {
23
+            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
24
+            //输入等高距
25
+            PromptDoubleOptions opts = new PromptDoubleOptions("\n请输入等高距: ");
26
+            opts.AllowNegative = false;  // 不允许负数
27
+            opts.AllowZero = false;     // 不允许0
28
+            opts.DefaultValue = Properties.Settings.Default.dgj;     // 默认值
29
+            PromptDoubleResult res = ed.GetDouble(opts);
30
+            if (res.Status != PromptStatus.OK)
31
+            {
32
+                ed.WriteMessage("\n操作取消。");
33
+                return;
34
+            }
35
+            double dgj = res.Value;
36
+            Properties.Settings.Default.dgj = dgj;
37
+
30 38
             Line jigl1 = Fzx();
31 39
             Line jigl2 = Fzx();
32 40
             List<Point3d> ptonline = new List<Point3d>();//两辅助拉线之间的线段上的点
@@ -35,8 +43,6 @@ namespace HCTools
35 43
             var plane = new Plane(Point3d.Origin, Vector3d.ZAxis);
36 44
             ptcoll.Add(jigl1.StartPoint);
37 45
             ptcoll.Add(jigl1.EndPoint);
38
-
39
-            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
40 46
             TypedValue[] value = new TypedValue[]
41 47
                 {
42 48
                 new TypedValue((int)DxfCode.Start,"LWPOLYLINE"),
@@ -44,308 +50,590 @@ namespace HCTools
44 50
             SelectionFilter filter = new SelectionFilter(value);
45 51
             // 要求在图形区域中手动选择对象
46 52
             PromptSelectionResult psr = ed.SelectFence(ptcoll, filter);
47
-
48 53
             if (psr.Status == PromptStatus.OK)
49 54
             {
50 55
                 SelectionSet ss = psr.Value;
51 56
                 ObjectIdCollection idcoll = new ObjectIdCollection(ss.GetObjectIds());
52
-                List<Dgx_ct> dgx_ct = new List<Dgx_ct>();
57
+                List<Polyline> dgx = new List<Polyline>();
58
+                List<Polyline> dgx_sqxs = new List<Polyline>();
53 59
                 for (int i = 0; i < idcoll.Count; i++)
54 60
                 {
55
-                    Dgx_ct temp = getpll(idcoll[i]);
56
-                    dgx_ct.Add(temp);
61
+                    Database db = HostApplicationServices.WorkingDatabase;
62
+                    Entity ent = null;
63
+                    DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
64
+                    using (Transaction tr = db.TransactionManager.StartTransaction())
65
+                    {
66
+                        ent = (Polyline)tr.GetObject(idcoll[i], OpenMode.ForWrite, true);
67
+                        doclock.Dispose();
68
+                        Polyline temp = (Polyline)BasicFunction.GetDBObject(idcoll[i]);
69
+                        if (temp.Layer == "8120" || temp.Layer == "jqx" || temp.Layer == "JQX")
70
+                            dgx.Add(temp);
71
+                        else
72
+                        {
73
+                            dgx_sqxs.Add(temp);
74
+                            temp.Erase();
75
+                        }
76
+                        tr.Commit();
77
+                    }
78
+                }
79
+                //按高程排序
80
+                var dgx_ct = dgx.OrderBy(x => x.Elevation).ToList();
81
+                var dgx_sqx = dgx_sqxs.OrderBy(x => x.Elevation).ToList();
82
+                //记录首曲线以及首曲线与拉线交点
83
+                List<SQX> sqxlist = new List<SQX>();
84
+                for (int i = 0; i < dgx_sqx.Count; i++)
85
+                {
86
+                    List<Point3d> itsresult1 = new List<Point3d>();
87
+                    List<Point3d> itsresult2 = new List<Point3d>();
88
+                    itsresult1 = GetIntersections(dgx_sqx[i], jigl1);
89
+                    itsresult2 = GetIntersections(dgx_sqx[i], jigl2);
90
+                    Point3d start = new Point3d();
91
+                    Point3d end = new Point3d();
92
+                    SQX temp = new SQX();
93
+                    temp.intersepts = new List<Point3d>();
94
+                    if (itsresult1.Count != 0)
95
+                    {
96
+                        start = new Point3d(itsresult1[0].X, itsresult1[0].Y, dgx_sqx[i].Elevation);
97
+                        temp.intersepts.Add(start);
98
+                    }
99
+                    if (itsresult2.Count != 0)
100
+                    {
101
+                        end = new Point3d(itsresult2[0].X, itsresult2[0].Y, dgx_sqx[i].Elevation);
102
+                        temp.intersepts.Add(end);
103
+                    }
104
+                    temp.pll = dgx_sqx[i];
105
+                    sqxlist.Add(temp);
57 106
                 }
58
-                dgx_ct.OrderByDescending(x => x.elevation);
59
-
107
+                //获取计曲线与拉线交点
60 108
                 for (int i = 0; i < dgx_ct.Count - 1; i++)
61 109
                 {
62
-                    Point3dCollection itsresult1 = new Point3dCollection();
63
-                    Point3dCollection itsresult2 = new Point3dCollection();
64
-                    dgx_ct[i].pll.IntersectWith(jigl1, Intersect.OnBothOperands, plane, itsresult1, IntPtr.Zero, IntPtr.Zero);
65
-                    dgx_ct[i].pll.IntersectWith(jigl2, Intersect.OnBothOperands, plane, itsresult2, IntPtr.Zero, IntPtr.Zero);
66
-                    Point3d start = itsresult1[0];
67
-                    Point3d end = itsresult2[0];
68
-                    List<Point3d> pts1 = GetPtsBetweenpts(dgx_ct[i].pll, start, end);
69
-
70
-                    itsresult1 = new Point3dCollection();
71
-                    itsresult2 = new Point3dCollection();
72
-                    dgx_ct[i + 1].pll.IntersectWith(jigl1, Intersect.OnBothOperands, plane, itsresult1, IntPtr.Zero, IntPtr.Zero);
73
-                    dgx_ct[i + 1].pll.IntersectWith(jigl2, Intersect.OnBothOperands, plane, itsresult2, IntPtr.Zero, IntPtr.Zero);
74
-                    Point3d start1 = itsresult1[0];
75
-                    Point3d end1 = itsresult2[0];
76
-                    List<Point3d> pts2 = GetPtsBetweenpts(dgx_ct[i + 1].pll, start1, end1);
110
+                    List<Point3d> itsresult1 = new List<Point3d>();
111
+                    List<Point3d> itsresult2 = new List<Point3d>();
112
+                    itsresult1 = GetIntersections(dgx_ct[i], jigl1);
113
+                    itsresult2 = GetIntersections(dgx_ct[i], jigl2);
114
+                    Point3d start = new Point3d(itsresult1[0].X, itsresult1[0].Y, dgx_ct[i].Elevation);
115
+                    Point3d end = new Point3d(itsresult2[0].X, itsresult2[0].Y, dgx_ct[i].Elevation);
116
+                    //List<Point3d> pts1 = GetPtsBetweenpts(dgx_ct[i], start, end);
117
+                    Polyline pl1 = GetPlBetweenpts(dgx_ct[i], start, end);
118
+
119
+                    List<Point3d> itsresult3 = new List<Point3d>();
120
+                    List<Point3d> itsresult4 = new List<Point3d>();
121
+                    itsresult3 = GetIntersections(dgx_ct[i + 1], jigl1);
122
+                    itsresult4 = GetIntersections(dgx_ct[i + 1], jigl2);
123
+                    Point3d start1 = new Point3d(itsresult3[0].X, itsresult3[0].Y, dgx_ct[i + 1].Elevation);
124
+                    Point3d end1 = new Point3d(itsresult4[0].X, itsresult4[0].Y, dgx_ct[i + 1].Elevation);
77 125
                     List<Point3d> linearinterpt = new List<Point3d>();
126
+                    Polyline pl2 = GetPlBetweenpts(dgx_ct[i + 1], start1, end1);
78 127
 
79
-                    double gcc = dgx_ct[i + 1].pll.Elevation - dgx_ct[i].pll.Elevation;
80
-                    for (int ii = 0; ii < gcc / dgj; ii++)
128
+                    double gcc = dgx_ct[i + 1].Elevation - dgx_ct[i].Elevation;
129
+                    int count = (int)(gcc / dgj - 1);
130
+                    Document doc = Application.DocumentManager.MdiActiveDocument;
131
+                    Database db = doc.Database;
132
+                    using (Transaction tr = db.TransactionManager.StartTransaction())
81 133
                     {
82
-                        double targetgc = dgx_ct[i].pll.Elevation + dgj * (ii + 1);
83
-                        Interpolationpts(pts1, pts2, targetgc);
134
+                        // 执行内插
135
+                        List<Polyline> newContours = InterpolateContours(pl1, pl2, count);
136
+
137
+                        // 将新等高线添加到图形
138
+                        BlockTableRecord btr = (BlockTableRecord)tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite);
139
+                        LayerTableRecord layer = (LayerTableRecord)tr.GetObject(db.Clayer, OpenMode.ForRead);
140
+                        if (dgx_sqxs.Count == 0)
141
+                        {
142
+                            foreach (Polyline contour in newContours)
143
+                            {
144
+                                btr.AppendEntity(contour);
145
+                                tr.AddNewlyCreatedDBObject(contour, true);
146
+                            }
147
+                        }
148
+                        else
149
+                        {
150
+                            foreach (Polyline contour in newContours)
151
+                            {
152
+                                Selesqx(contour, ed, btr, tr, sqxlist);
153
+                            }
154
+                        }
155
+                        tr.Commit();
156
+                        ed.WriteMessage($"\n成功创建 {newContours.Count} 条内插等高线。");
84 157
                     }
85 158
                 }
86
-                ed.WriteMessage("\n等高线内插完成");
87 159
             }
160
+            else
161
+                ed.WriteMessage("\n未选中等高线!");
88 162
         }
89 163
 
90
-
91
-        private static Line Fzx()
164
+        public static List<Polyline> InterpolateContours(Polyline lowerContour,Polyline upperContour,int numberOfInterpolations)
92 165
         {
93
-            Document doc = Application.DocumentManager.MdiActiveDocument;
94
-            Line jigl = new Line();
95
-
96
-            ObjectId jigid = new ObjectId();
97
-            PromptPointResult pPtRes;
98
-            PromptPointOptions pPtOpts = new PromptPointOptions("");
99
-            pPtOpts.Message = "选择起点\n ";
100
-            pPtRes = doc.Editor.GetPoint(pPtOpts);
101
-            Point3d ptStart = pPtRes.Value;
166
+            List<Polyline> interpolatedContours = new List<Polyline>();
102 167
 
103
-            if (pPtRes.Status == PromptStatus.OK)
168
+            // 检查曲线方向,必要时反转其中一条
169
+            if (!CheckContourDirections(lowerContour, upperContour))
104 170
             {
105
-                LineJig lJig = new LineJig(ptStart);
106
-                PromptResult PR = doc.Editor.Drag(lJig);
107
-                if (PR.Status == PromptStatus.OK)
108
-                {
109
-                    jigid = BasicFunction.AddObj(doc, lJig.line_1);
110
-                    jigl = (Line)BasicFunction.GetDBObject(jigid);
111
-                }
171
+                upperContour = ReversePolyline(upperContour);
112 172
             }
113
-            return jigl;
114
-        }
115 173
 
116
-        private static Dgx_ct getpll(ObjectId id)
117
-        {
118
-            Dgx_ct dgx_ct = new Dgx_ct();
119
-            Polyline temp = (Polyline)BasicFunction.GetDBObject(id);
120
-            dgx_ct.pll = temp;
121
-            dgx_ct.elevation = Convert.ToDouble(temp.Elevation.ToString("0.00"));
122
-            return dgx_ct;
123
-        }
174
+            // 初始化起点
175
+            Point3d A = lowerContour.GetPoint3dAt(0);
176
+            Point3d B = upperContour.GetPoint3dAt(0);
177
+            Line l = new Line(A, B);
124 178
 
125
-        private static List<Point3d> GetPtsBetweenpts(Polyline pll, Point3d start, Point3d end)
126
-        {
127
-            List<Point3d> allvertex = new List<Point3d>();
128
-            List<Point3d> vertexbt = new List<Point3d>();
129
-            vertexbt.Add(start);
130
-            for (int i = 0; i < pll.NumberOfVertices; i++)
179
+            int i = 0, j = 0;
180
+            int m = lowerContour.NumberOfVertices - 1;
181
+            int n = upperContour.NumberOfVertices - 1;
182
+
183
+            // 存储所有插值点
184
+            List<Point3d>[] allInterpolatedPoints = new List<Point3d>[numberOfInterpolations];
185
+            for (int k = 0; k < numberOfInterpolations; k++)
131 186
             {
132
-                allvertex.Add(pll.GetPoint3dAt(i));
187
+                allInterpolatedPoints[k] = new List<Point3d>();
133 188
             }
134
-            double dist1 = double.MaxValue;
135
-            int start_index = 0;
136
-            double dist2 = double.MaxValue;
137
-            int end_index = 0;
138
-            bool sort = false;
139
-            for (int i = 0; i < allvertex.Count; i++)
189
+
190
+            while (i < m && j < n)
140 191
             {
141
-                if (start.DistanceTo(allvertex[i]) < dist1)
192
+                //在当前AB辅助线上插值
193
+                for (int L = 1; L <= numberOfInterpolations; L++)
142 194
                 {
143
-                    dist1 = start.DistanceTo(allvertex[i]);
144
-                    start_index = i;
195
+                    double ratio = (double)L / (numberOfInterpolations + 1);
196
+                    Point3d interpolatedPoint = InterpolatePoint(A, B, ratio);
197
+                    if (!allInterpolatedPoints[L - 1].Contains(interpolatedPoint))
198
+                        allInterpolatedPoints[L - 1].Add(interpolatedPoint);
199
+                }
200
+
201
+                //寻找最大角点
202
+                int k1 = FindMaxAnglePoint(lowerContour, i, A, B);
203
+                int k2 = FindMaxAnglePoint(upperContour, j, A, B);
204
+
205
+                //比较角度并选择辅助线
206
+                double angle1 = CalculateAngle(lowerContour.GetPoint3dAt(k1), A, B);
207
+                double angle2 = CalculateAngle(upperContour.GetPoint3dAt(k2), A, B);
208
+
209
+                if (angle1 > angle2)
210
+                {
211
+                    // 选择lowerContour上的点
212
+                    //if (CheckNoIntersection(lowerContour, i, k1, B))
213
+                    for (int x = i + 1; x <= k1; x++)
214
+                    {
215
+                        //for (int x = i + 1; x <= k1; x++)
216
+                        if (CheckNoIntersection(lowerContour, x, k1, B))
217
+                        {
218
+                            Point3d P = lowerContour.GetPoint3dAt(x);
219
+                            for (int L = 1; L <= numberOfInterpolations; L++)
220
+                            {
221
+                                double ratio = (double)L / (numberOfInterpolations + 1);
222
+                                Point3d interpolatedPoint = InterpolatePoint(P, B, ratio);
223
+                                if (!allInterpolatedPoints[L - 1].Contains(interpolatedPoint))
224
+                                    allInterpolatedPoints[L - 1].Add(interpolatedPoint);
225
+                            }
226
+                        }
227
+                        //i = k1;
228
+                        //A = lowerContour.GetPoint3dAt(i);
229
+                    }
230
+                    i = k1;
231
+                    A = lowerContour.GetPoint3dAt(i);
145 232
                 }
146
-                if (end.DistanceTo(allvertex[i]) < dist2)
233
+                else
147 234
                 {
148
-                    dist2 = end.DistanceTo(allvertex[i]);
149
-                    end_index = i;
235
+                    // 选择upperContour上的点
236
+                    //if (CheckNoIntersection(upperContour, j, k2, A))
237
+                    for (int y = j + 2; y <= k2; y++)
238
+                    {
239
+                        //for (int y = j + 1; y <= k2; y++)
240
+                        if (CheckNoIntersection(upperContour, y, k2, A))
241
+                        {
242
+                            Point3d Q = upperContour.GetPoint3dAt(y);
243
+                            for (int L = 1; L <= numberOfInterpolations; L++)
244
+                            {
245
+                                double ratio = (double)L / (numberOfInterpolations + 1);
246
+                                Point3d interpolatedPoint = InterpolatePoint(A, Q, ratio);
247
+                                if (!allInterpolatedPoints[L - 1].Contains(interpolatedPoint))
248
+                                    allInterpolatedPoints[L - 1].Add(interpolatedPoint);
249
+                                Document doc = Application.DocumentManager.MdiActiveDocument;
250
+                                Database db = doc.Database;
251
+                            }
252
+                        }
253
+                        //j = k2;
254
+                        //B = upperContour.GetPoint3dAt(j);
255
+                    }
256
+                    j = k2;
257
+                    B = upperContour.GetPoint3dAt(j);
150 258
                 }
151 259
             }
152
-            if (start_index > end_index)
260
+
261
+            // 处理剩余点
262
+            while (i < m)
153 263
             {
154
-                int temp = start_index;
155
-                start_index = end_index;
156
-                end_index = temp;
157
-                sort = true;
264
+                i++;
265
+                Point3d P = lowerContour.GetPoint3dAt(i);
266
+                for (int L = 1; L <= numberOfInterpolations; L++)
267
+                {
268
+                    double ratio = (double)L / (numberOfInterpolations + 1);
269
+                    Point3d interpolatedPoint = InterpolatePoint(P, B, ratio);
270
+                    if (!allInterpolatedPoints[L - 1].Contains(interpolatedPoint))
271
+                        allInterpolatedPoints[L - 1].Add(interpolatedPoint);
272
+                }
158 273
             }
159
-            for (int i = start_index; i < end_index + 1; i++)
274
+
275
+            while (j < n)
160 276
             {
161
-                if (!vertexbt.Contains(allvertex[i]))
277
+                j++;
278
+                Point3d Q = upperContour.GetPoint3dAt(j);
279
+                for (int L = 1; L <= numberOfInterpolations; L++)
162 280
                 {
163
-                    vertexbt.Add(allvertex[i]);
164
-                    if (i == end_index && !vertexbt.Contains(end))
165
-                        vertexbt.Add(end);
281
+                    double ratio = (double)L / (numberOfInterpolations + 1);
282
+                    Point3d interpolatedPoint = InterpolatePoint(A, Q, ratio);
283
+                    if (!allInterpolatedPoints[L - 1].Contains(interpolatedPoint))
284
+                        allInterpolatedPoints[L - 1].Add(interpolatedPoint);
166 285
                 }
167 286
             }
168
-            if (sort)
169
-                vertexbt.Reverse();
170
-            return vertexbt;
171
-        }
172 287
 
173
-        private static double CalculateAngles(Point3d pt1, Point3d pt2, Point3d pt3)
174
-        {
175
-            //计算角度
176
-            Vector3d vectorAB = pt1.GetVectorTo(pt2);
177
-            Vector3d vectorBC = pt2.GetVectorTo(pt3);
288
+            // 创建插值后的等高线
289
+            for (int L = 0; L < numberOfInterpolations; L++)
290
+            {
291
+                Polyline newContour = new Polyline();
292
+                for (int idx = 0; idx < allInterpolatedPoints[L].Count; idx++)
293
+                {
294
+                    Point3d pt = allInterpolatedPoints[L][idx];
295
+                    newContour.AddVertexAt(idx, new Point2d(pt.X, pt.Y), 0, 0, 0);
296
+                }
178 297
 
179
-            double dotProduct = vectorAB.DotProduct(vectorBC);
298
+                // 设置高程
299
+                double elevation = lowerContour.Elevation +
300
+                                 (upperContour.Elevation - lowerContour.Elevation) *
301
+                                 (double)(L + 1) / (numberOfInterpolations + 1);
302
+                newContour.Elevation = elevation;
303
+                Polyline smoothpl = Smooth(newContour);
304
+                interpolatedContours.Add(smoothpl);
305
+            }
180 306
 
181
-            // 计算两个向量的长度  
182
-            double lengthAB = vectorAB.Length;
183
-            double lengthBC = vectorBC.Length;
307
+            return interpolatedContours;
308
+        }
184 309
 
185
-            double angleDegrees = new double();
186
-            // 防止除以零的错误  
187
-            if (lengthAB > 0 && lengthBC > 0)
188
-            {
189
-                // 计算两个向量之间夹角的余弦值  
190
-                double cosAngle = dotProduct / (lengthAB * lengthBC);
310
+        // 检查两条等高线方向是否一致
311
+        private static bool CheckContourDirections(Polyline pline1, Polyline pline2)
312
+        {
313
+            bool result;
314
+            Point3d pl1st = pline1.StartPoint;
315
+            Point3d pl2st = pline2.StartPoint;
316
+            Point3d pl2ed = pline2.EndPoint;
317
+            Line l1 = new Line(pl1st, pl2st);
318
+            Line l2 = new Line(pl1st, pl2ed);
319
+            if (l1.Length < l2.Length)
320
+                result = true;
321
+            else
322
+                result = false;
323
+            return result;
191 324
 
192
-                // 使用反余弦函数计算夹角(以弧度为单位)  
193
-                double angleRadians = Math.Acos(cosAngle);
325
+        }
194 326
 
195
-                // 将弧度转换为度  
196
-                angleDegrees = angleRadians * (180.0 / Math.PI);
327
+        // 反转多段线顶点顺序
328
+        private static Polyline ReversePolyline(Polyline pline)
329
+        {
330
+            Polyline reversed = new Polyline();
331
+            for (int i = pline.NumberOfVertices - 1; i >= 0; i--)
332
+            {
333
+                Point3d pt = pline.GetPoint3dAt(i);
334
+                reversed.AddVertexAt(reversed.NumberOfVertices,
335
+                                   new Point2d(pt.X, pt.Y), 0, 0, 0);
197 336
             }
198
-            return angleDegrees;
337
+            reversed.Elevation = pline.Elevation;
338
+            return reversed;
199 339
         }
200 340
 
201
-        private static bool LineIntersect(double x1, double y1, double x2, double y2,
202
-                                          double x3, double y3, double x4, double y4)
341
+        // 在两点之间插值
342
+        private static Point3d InterpolatePoint(Point3d pt1, Point3d pt2, double ratio)
203 343
         {
204
-            double d1x = x2 - x1;
205
-            double d1y = y2 - y1;
206
-            double d2x = x4 - x3;
207
-            double d2y = y4 - y3;
344
+            return new Point3d(
345
+                pt1.X + ratio * (pt2.X - pt1.X),
346
+                pt1.Y + ratio * (pt2.Y - pt1.Y),
347
+                pt1.Z + ratio * (pt2.Z - pt1.Z));
348
+        }
208 349
 
209
-            // 计算点1和点2相对于线段CD的叉积  
210
-            double cp1 = d2x * (y1 - y3) - (x1 - x3) * d2y;
211
-            double cp2 = d2x * (y2 - y3) - (x2 - x3) * d2y;
350
+        // 寻找最大角点
351
+        private static int FindMaxAnglePoint(Polyline pline, int startIdx, Point3d A, Point3d B)
352
+        {
353
+            int maxIndex = startIdx;
354
+            double maxAngle = 0;
212 355
 
213
-            // 如果点1和点2相对于线段CD的叉积符号相反,则它们跨立在CD的两侧  
214
-            if (cp1 * cp2 < 0)
356
+            for (int i = startIdx + 1; i < pline.NumberOfVertices; i++)
215 357
             {
216
-                // 计算点3和点4相对于线段AB的叉积  
217
-                double cp3 = d1x * (y3 - y1) - (x3 - x1) * d1y;
218
-                double cp4 = d1x * (y4 - y1) - (x4 - x1) * d1y;
358
+                Point3d P = pline.GetPoint3dAt(i);
359
+                double angle = CalculateAngle(P, A, B);
219 360
 
220
-                // 如果点3和点4相对于线段AB的叉积符号也相反,则它们跨立在AB的两侧  
221
-                if (cp3 * cp4 < 0)
361
+                if (angle > maxAngle)
222 362
                 {
223
-                    // 根据跨立实验,如果以上条件都满足,则线段一定相交  
224
-                    return true;
363
+                    maxAngle = angle;
364
+                    maxIndex = i;
225 365
                 }
226 366
             }
227
-            // 线段不相交  
228
-            return false;
367
+
368
+            return maxIndex;
229 369
         }
230 370
 
231
-        private static Point3d Interpolation(Point3d p1, Point3d p2, double targetZ)
371
+        // 计算角度(使用余弦定理)
372
+        private static double CalculateAngle(Point3d P, Point3d A, Point3d B)
232 373
         {
233
-            double t = (targetZ - p1.Z) / dgj;
234
-            double x = p1.X + t * (p2.X - p1.X);
235
-            double y = p1.Y + t * (p2.Y - p1.Y);
236
-            return new Point3d(x, y, targetZ);
374
+            Vector3d PA = A - P;
375
+            Vector3d PB = B - P;
376
+
377
+            double dotProduct = PA.DotProduct(PB);
378
+            double magnitudePA = PA.Length;
379
+            double magnitudePB = PB.Length;
380
+
381
+            // 避免除以零
382
+            if (magnitudePA < 1e-9 || magnitudePB < 1e-9)
383
+                return 0;
384
+
385
+            double cosTheta = dotProduct / (magnitudePA * magnitudePB);
386
+            cosTheta = Math.Max(-1, Math.Min(1, cosTheta)); // 确保在[-1,1]范围内
387
+
388
+            return Math.Acos(cosTheta);
237 389
         }
238 390
 
239
-        public static void Interpolationpts(List<Point3d> pts1, List<Point3d> pts2, double targetgc)
391
+        // 检查辅助线是否与曲线相交
392
+        private static bool CheckNoIntersection(Polyline pline, int startIdx, int endIdx, Point3d point)
240 393
         {
241
-            Point3d pt1 = pts1[0];
242
-            Point3d pt2 = pts2[0];
243
-            List<Point3d> itspt = new List<Point3d>();
244
-            int index1 = 0;
245
-            int index2 = 0;
246
-            List<Point3d> interplpts = new List<Point3d>();
247
-            for (int i = 0; i < pts1.Count; i++)
248
-            {
249
-                List<Angles> angle1 = new List<Angles>();//等高线1上的点
250
-                List<Angles> angle2 = new List<Angles>();//等高线2上的点
251
-                List<int> errindex1 = new List<int>();
252
-                List<int> errindex2 = new List<int>();
253
-                bool flag = false;
394
+            //LineSegment3d testSegment = new LineSegment3d(
395
+            //    pline.GetPoint3dAt(startIdx), point);
254 396
 
255
-                for (int j = i; j < pts1.Count - 1; j++)
256
-                {
257
-                    if (errindex1.Contains(j))
258
-                        continue;
259
-                    else
260
-                    {
261
-                        double angle = CalculateAngles(pt1, pts1[j + 1], pt2);
262
-                        Angles temp = new Angles();
263
-                        temp.angle = angle;
264
-                        temp.xh = j;
265
-                        angle1.Add(temp);
266
-                    }
267
-                }
268
-                for (int j = i; j < pts2.Count - 1; j++)
269
-                {
270
-                    if (errindex2.Contains(j))
271
-                        continue;
272
-                    else
273
-                    {
274
-                        double angle = CalculateAngles(pt1, pts2[j + 1], pt2);
275
-                        Angles temp = new Angles();
276
-                        temp.angle = angle;
277
-                        temp.xh = j;
278
-                        angle2.Add(temp);
279
-                    }
280
-                }
281
-                angle1.OrderByDescending(x => x.angle);
282
-                angle2.OrderByDescending(x => x.angle);
283
-                while (flag)
397
+            //for (int i = 0; i < pline.NumberOfVertices - 1; i++)
398
+            //{
399
+            //    if (i == startIdx) continue;
400
+
401
+            //    LineSegment3d plineSegment = new LineSegment3d(
402
+            //        pline.GetPoint3dAt(i), pline.GetPoint3dAt(i + 1));
403
+
404
+            //    Point3d intersection = new Point3d();
405
+            //    if (testSegment.IntersectWith(plineSegment, out intersection))
406
+            //    {
407
+            //        return false;
408
+            //    }
409
+            //}
410
+            Line line = new Line(point, pline.GetPoint3dAt(startIdx));
411
+            List<Point3d> pts = GetIntersections(pline, line);
412
+            if (pts.Count > 1)
413
+                return false;
414
+
415
+            return true;
416
+        }
417
+
418
+        private static void Selesqx(Polyline pll, Editor ed, BlockTableRecord btr, Transaction tr, List<SQX> sqxlist)
419
+        {
420
+            for (int i = 0; i < sqxlist.Count; i++)
421
+            {
422
+                if(sqxlist[i].pll.Elevation==pll.Elevation)
284 423
                 {
285
-                    double px = pts1[angle1[0].xh].X;
286
-                    double py = pts1[angle1[0].xh].Y;
287
-                    double qx = pts1[angle2[0].xh].X;
288
-                    double qy = pts1[angle2[0].xh].Y;
289
-                    double dx1 = pt1.X - px;
290
-                    double dy1 = pt1.Y - py;
291
-                    double dx2 = pt2.X - qx;
292
-                    double dy2 = pt2.Y - qy;
293
-                    bool interck1 = LineIntersect(pt1.X, pt1.Y, pts1[index1].X, pts1[index1].Y, pt2.X, pt2.Y, px, py);
294
-                    bool interck2 = LineIntersect(pt1.X, pt1.Y, px, py, pt2.X, pt2.Y, pts2[index2].X, pts2[index2].Y);
295
-                    bool interck3 = LineIntersect(pt1.X, pt1.Y, qx, qy, pt2.X, pt2.Y, pts2[index2].X, pts2[index2].Y);
296
-                    bool interck4 = LineIntersect(pt1.X, pt1.Y, pts1[index1].X, pts1[index1].Y, pt2.X, pt2.Y, qx, qy);
297
-                    if (interck1 & interck2)
424
+                    for (int j = 0; j < sqxlist[i].intersepts.Count; j++)
298 425
                     {
299
-                        if (interck3 & interck4)
426
+                        Polyline pl_Clone = (Polyline)sqxlist[i].pll.Clone();
427
+                        Point3dCollection splitpts = new Point3dCollection(sqxlist[i].intersepts.OrderBy(x=>sqxlist[i].pll.GetParameterAtPoint(x)).ToArray());
428
+                        var splitpl = pl_Clone.GetSplitCurves(splitpts);
429
+                        if (splitpl.Count == 2)
300 430
                         {
301
-                            if (angle1[0].angle > angle2[0].angle)
302
-                            {
303
-                                for (int ii = index1 + 1; ii < angle1[0].xh; ii++)
304
-                                {
305
-                                    Point3d pt = Interpolation(pt2, pts1[ii], targetgc);
306
-                                    itspt.Add(pt);
307
-                                    if(ii)
308
-                                    pt1 = pts1[ii];
309
-                                }
310
-                                flag = true;
311
-                            }
431
+                            Polyline pllsplit1 = (Polyline)splitpl[0];
432
+                            Polyline pllsplit2 = (Polyline)splitpl[1];
433
+                            Polyline plladd;
434
+                            if (pllsplit1.Length < pllsplit2.Length)
435
+                                plladd = pllsplit2;
312 436
                             else
437
+                                plladd = pllsplit1;
438
+                            Polyline pll_new = new Polyline();
439
+                            if (plladd.EndPoint != sqxlist[i].intersepts[0])
440
+                                plladd.ReverseCurve();
441
+                            Line line3 = new Line(plladd.EndPoint, pll.StartPoint);
442
+                            Line line4 = new Line(plladd.EndPoint, pll.EndPoint);
443
+                            if (line3.Length > line4.Length)
444
+                                pll.ReverseCurve();
445
+                            int ptnum = pll.NumberOfVertices + plladd.NumberOfVertices - 1;
446
+                            for (int l = 0; l < ptnum - 1; l++)
313 447
                             {
314
-                                
448
+                                if (l < plladd.NumberOfVertices - 1)
449
+                                    pll_new.AddVertexAt(l, plladd.GetPoint2dAt(l), 0, sqxlist[i].pll.ConstantWidth, sqxlist[i].pll.ConstantWidth);
450
+                                else
451
+                                    pll_new.AddVertexAt(l, pll.GetPoint2dAt(l - plladd.NumberOfVertices + 2), 0, sqxlist[i].pll.ConstantWidth, sqxlist[i].pll.ConstantWidth);
315 452
                             }
453
+                            pll_new.Elevation = pl_Clone.Elevation;
454
+                            Polyline smoothpl = Smooth(pll_new);
455
+                            btr.AppendEntity(smoothpl);
456
+                            tr.AddNewlyCreatedDBObject(smoothpl, true);
457
+
316 458
                         }
317
-                        else
459
+                        else if (splitpl.Count > 2)
318 460
                         {
319
-                            angle2.RemoveAt(0);
320
-                            continue;
461
+                            Polyline pll_split1 = (Polyline)splitpl[0];
462
+                            Polyline pll_split2 = (Polyline)splitpl[1];
463
+                            Polyline pll_split3 = (Polyline)splitpl[2];
464
+                            Polyline pll_new = new Polyline();
465
+                            Line line1 = new Line(pll_split2.StartPoint,pll.StartPoint);
466
+                            Line line2 = new Line(pll_split2.StartPoint,pll.EndPoint);
467
+                            if (line1.Length > line2.Length)
468
+                                pll.ReverseCurve();
469
+                            int ptnum = pll.NumberOfVertices + pll_split1.NumberOfVertices + +pll_split3.NumberOfVertices - 4;
470
+                            for (int l = 0; l < ptnum; l++)
471
+                            {
472
+                                if (l < pll_split1.NumberOfVertices - 1)
473
+                                    pll_new.AddVertexAt(l, pll_split1.GetPoint2dAt(l), 0, sqxlist[i].pll.ConstantWidth, sqxlist[i].pll.ConstantWidth);
474
+                                else if(l<pll.NumberOfVertices + pll_split1.NumberOfVertices - 3&&l>= pll_split1.NumberOfVertices-1)
475
+                                    pll_new.AddVertexAt(l, pll.GetPoint2dAt(l - pll_split1.NumberOfVertices + 2), 0, sqxlist[i].pll.ConstantWidth, sqxlist[i].pll.ConstantWidth);
476
+                                else
477
+                                    pll_new.AddVertexAt(l, pll_split3.GetPoint2dAt(l - pll.NumberOfVertices - pll_split1.NumberOfVertices + 4), 0, sqxlist[i].pll.ConstantWidth, sqxlist[i].pll.ConstantWidth);
478
+                            }
479
+                            pll_new.Elevation = pl_Clone.Elevation;
480
+                            Polyline smoothpl = Smooth(pll_new);
481
+                            btr.AppendEntity(smoothpl);
482
+                            tr.AddNewlyCreatedDBObject(smoothpl, true);
321 483
                         }
322 484
                     }
323
-                    else
324
-                    {
325
-                        angle1.RemoveAt(0);
326
-                        continue;
327
-                    }
328 485
                 }
329 486
             }
487
+        }
488
+        
489
+        private static Polyline Smooth(Polyline pl)
490
+        {
491
+            Point3dCollection ptcoll = new Point3dCollection();
492
+            for (int i = 0; i < pl.NumberOfVertices; i++)
493
+            {
494
+                ptcoll.Add(pl.GetPoint3dAt(i));
495
+            }
496
+            Spline spline = new Spline(ptcoll, 3, 0.01);
497
+            spline.SetDatabaseDefaults();
498
+            Polyline pl_smooth = new Polyline();
499
+            pl_smooth.SetDatabaseDefaults();
500
+            int ptnum = pl.NumberOfVertices - 1;
501
+            for (int i = 0; i <= ptnum; i++)
502
+            {
503
+                double param = spline.StartParam +(spline.EndParam - spline.StartParam) * i / ptnum;
504
+                Point3d pt = spline.GetPointAtParameter(param);
505
+                pl_smooth.AddVertexAt(pl_smooth.NumberOfVertices, new Point2d(pt.X, pt.Y), 0, 0, 0);
506
+            }
507
+            pl_smooth.Elevation = pl.Elevation;
508
+            return pl_smooth;
509
+        }
330 510
 
331
-            Database db = HostApplicationServices.WorkingDatabase;
511
+        //辅助线
512
+        private static Line Fzx()
513
+        {
332 514
             Document doc = Application.DocumentManager.MdiActiveDocument;
333
-            DocumentLock doclock = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument();
334
-            using (Transaction trans = db.TransactionManager.StartTransaction())
515
+            Line jigl = new Line();
516
+
517
+            ObjectId jigid = new ObjectId();
518
+            PromptPointResult pPtRes;
519
+            PromptPointOptions pPtOpts = new PromptPointOptions("");
520
+            pPtOpts.Message = "选择起点\n ";
521
+            pPtRes = doc.Editor.GetPoint(pPtOpts);
522
+            Point3d ptStart = pPtRes.Value;
523
+
524
+            if (pPtRes.Status == PromptStatus.OK)
525
+            {
526
+                LineJig lJig = new LineJig(ptStart);
527
+                PromptResult PR = doc.Editor.Drag(lJig);
528
+                if (PR.Status == PromptStatus.OK)
529
+                {
530
+                    //jigid = BasicFunction.AddObj(doc, lJig.line_1);
531
+                    jigl = lJig.line_1;
532
+                }
533
+            }
534
+            return jigl;
535
+        }
536
+
537
+        private static Polyline GetPlBetweenpts(Polyline pll, Point3d start, Point3d end)
538
+        {
539
+            Polyline result = new Polyline();
540
+            Polyline copy_pll = (Polyline)pll.Clone();
541
+            Point3d start1 = pll.GetClosestPointTo(start,false);
542
+            double test = pll.GetParameterAtPoint(start);
543
+            Point3d end1 = pll.GetClosestPointTo(end, false);
544
+            double test2 = pll.GetParameterAtPoint(end);
545
+            if (test > test2)
546
+            {
547
+                Point3d temp = end1;
548
+                end1 = start1;
549
+                start1 = temp;
550
+            }
551
+            Point3dCollection pts = new Point3dCollection(new Point3d[] { start1, end1 });
552
+            var split = copy_pll.GetSplitCurves(pts);
553
+            //foreach (var item in split)
554
+            //{
555
+            result = (Polyline)split[1];
556
+            //if (pts.Contains(pll_temp.StartPoint) && pts.Contains(pll_temp.EndPoint))
557
+            //{
558
+            //    result = pll_temp;
559
+            //}
560
+            //}
561
+            return result;
562
+        }
563
+
564
+        /// <summary>
565
+        /// 为保证精度,将待获取相交情况的线移到原点处再进行相交检查
566
+        /// </summary>
567
+        private static List<Point3d> GetIntersections(Polyline pll, Line line)
568
+        {
569
+            List<Point3d> result = new List<Point3d>();
570
+
571
+            // 创建临时副本
572
+            Polyline tempLine1 = (Polyline)pll.Clone();
573
+            Line tempLine2 = (Line)line.Clone();
574
+
575
+            // 计算平移向量(以线1起点为基准,移动至原点)
576
+            Vector3d translation = -tempLine1.StartPoint.GetAsVector();
577
+            Matrix3d translateMatrix = Matrix3d.Displacement(translation);
578
+
579
+            // 应用平移变换
580
+            tempLine1.TransformBy(translateMatrix);
581
+            tempLine2.TransformBy(translateMatrix);
582
+
583
+            Point3dCollection translatedPoints = new Point3dCollection();
584
+            var plane = new Plane(Point3d.Origin, Vector3d.ZAxis);
585
+            tempLine2.IntersectWith(tempLine1, Intersect.OnBothOperands, plane, translatedPoints, IntPtr.Zero, IntPtr.Zero);
586
+
587
+            // 计算逆平移矩阵
588
+            Matrix3d inverseMatrix = Matrix3d.Displacement(-translation);
589
+            if (translatedPoints.Count > 0)
335 590
             {
336
-                BlockTable blocktable = trans.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
337
-                BlockTableRecord blctablerecord = trans.GetObject(blocktable[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
591
+                // 获取平移后的交点
592
+                foreach (Point3d item in translatedPoints)
593
+                {
594
+                    // 恢复交点坐标
595
+                    var pt = item.TransformBy(inverseMatrix);
596
+                    result.Add(pt);
597
+                }
598
+            }
599
+            return result;
600
+        }
601
+
602
+        private static List<Point3d> GetIntersections(Polyline pll1, Polyline pll2)
603
+        {
604
+            List<Point3d> result = new List<Point3d>();
605
+
606
+            // 创建临时副本
607
+            Polyline tempLine1 = (Polyline)pll1.Clone();
608
+            Polyline tempLine2 = (Polyline)pll2.Clone();
609
+
610
+            // 计算平移向量(以线1起点为基准,移动至原点)
611
+            Vector3d translation = -tempLine1.StartPoint.GetAsVector();
612
+            Matrix3d translateMatrix = Matrix3d.Displacement(translation);
338 613
 
339
-                Polyline pll = new Polyline();
340
-                for (int i = 0; i < itspt.Count; i++)
614
+            // 应用平移变换
615
+            tempLine1.TransformBy(translateMatrix);
616
+            tempLine2.TransformBy(translateMatrix);
617
+
618
+            Point3dCollection translatedPoints = new Point3dCollection();
619
+            var plane = new Plane(Point3d.Origin, Vector3d.ZAxis);
620
+            tempLine1.IntersectWith(tempLine2, Intersect.OnBothOperands, plane, translatedPoints, IntPtr.Zero, IntPtr.Zero);
621
+
622
+            // 计算逆平移矩阵
623
+            Matrix3d inverseMatrix = Matrix3d.Displacement(-translation);
624
+            if (translatedPoints.Count > 0)
625
+            {
626
+                // 获取平移后的交点
627
+                foreach (Point3d item in translatedPoints)
341 628
                 {
342
-                    pll.AddVertexAt(i, new Point2d(itspt[i].X, itspt[i].Y), 0, 0, 0);
629
+                    // 恢复交点坐标
630
+                    var pt = item.TransformBy(inverseMatrix);
631
+                    result.Add(pt);
343 632
                 }
344
-                blctablerecord.AppendEntity(pll);
345
-                trans.AddNewlyCreatedDBObject(pll, true);
346
-                trans.Commit();
347 633
             }
348
-            doclock.Dispose();
634
+            return result;
349 635
         }
636
+
637
+        
350 638
     }
351 639
 }

+ 224
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/HCTools.csproj Просмотреть файл

@@ -1,5 +1,6 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
3 4
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4 5
   <PropertyGroup>
5 6
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,8 @@
12 13
     <FileAlignment>512</FileAlignment>
13 14
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14 15
     <Deterministic>true</Deterministic>
16
+    <NuGetPackageImportStamp>
17
+    </NuGetPackageImportStamp>
15 18
   </PropertyGroup>
16 19
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17 20
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -36,6 +39,9 @@
36 39
     <StartupObject />
37 40
   </PropertyGroup>
38 41
   <ItemGroup>
42
+    <Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
43
+      <HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
44
+    </Reference>
39 45
     <Reference Include="gmap">
40 46
       <HintPath>..\..\..\..\..\..\04\浩辰\GstarCAD2020_Development_Tool\浩辰CAD2020_grxsdk\inc\gmap.dll</HintPath>
41 47
       <Private>False</Private>
@@ -53,18 +59,163 @@
53 59
       <EmbedInteropTypes>True</EmbedInteropTypes>
54 60
       <HintPath>..\..\..\CADTools\CADtools\bin\Debug\Microsoft.Office.Interop.Excel.dll</HintPath>
55 61
     </Reference>
62
+    <Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
63
+      <HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
64
+      <Private>True</Private>
65
+      <Private>True</Private>
66
+    </Reference>
67
+    <Reference Include="NetTopologySuite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=f580a05016ebada1, processorArchitecture=MSIL">
68
+      <HintPath>..\packages\NetTopologySuite.2.6.0\lib\netstandard2.0\NetTopologySuite.dll</HintPath>
69
+    </Reference>
56 70
     <Reference Include="System" />
71
+    <Reference Include="System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
72
+      <HintPath>..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll</HintPath>
73
+      <Private>True</Private>
74
+      <Private>True</Private>
75
+    </Reference>
76
+    <Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
77
+      <HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
78
+    </Reference>
79
+    <Reference Include="System.ComponentModel.Composition" />
80
+    <Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
81
+      <HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
82
+      <Private>True</Private>
83
+      <Private>True</Private>
84
+    </Reference>
57 85
     <Reference Include="System.Core" />
86
+    <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
87
+      <HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
88
+    </Reference>
89
+    <Reference Include="System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
90
+      <HintPath>..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll</HintPath>
91
+      <Private>True</Private>
92
+      <Private>True</Private>
93
+    </Reference>
94
+    <Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
95
+      <HintPath>..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
96
+      <Private>True</Private>
97
+      <Private>True</Private>
98
+    </Reference>
99
+    <Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
100
+      <HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
101
+      <Private>True</Private>
102
+      <Private>True</Private>
103
+    </Reference>
104
+    <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
105
+      <HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
106
+      <Private>True</Private>
107
+      <Private>True</Private>
108
+    </Reference>
109
+    <Reference Include="System.IO.Compression.FileSystem" />
110
+    <Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
111
+      <HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
112
+      <Private>True</Private>
113
+      <Private>True</Private>
114
+    </Reference>
115
+    <Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
116
+      <HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
117
+      <Private>True</Private>
118
+      <Private>True</Private>
119
+    </Reference>
120
+    <Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
121
+      <HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
122
+      <Private>True</Private>
123
+      <Private>True</Private>
124
+    </Reference>
125
+    <Reference Include="System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
126
+      <HintPath>..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
127
+      <Private>True</Private>
128
+      <Private>True</Private>
129
+    </Reference>
130
+    <Reference Include="System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
131
+      <HintPath>..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll</HintPath>
132
+      <Private>True</Private>
133
+      <Private>True</Private>
134
+    </Reference>
58 135
     <Reference Include="System.Management" />
136
+    <Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
137
+      <HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
138
+    </Reference>
139
+    <Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
140
+      <HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
141
+      <Private>True</Private>
142
+      <Private>True</Private>
143
+    </Reference>
144
+    <Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
145
+      <HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
146
+      <Private>True</Private>
147
+      <Private>True</Private>
148
+    </Reference>
149
+    <Reference Include="System.Numerics" />
150
+    <Reference Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
151
+      <HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
152
+    </Reference>
153
+    <Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
154
+      <HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
155
+      <Private>True</Private>
156
+      <Private>True</Private>
157
+    </Reference>
158
+    <Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
159
+      <HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
160
+      <Private>True</Private>
161
+      <Private>True</Private>
162
+    </Reference>
163
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
164
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
165
+    </Reference>
166
+    <Reference Include="System.Runtime.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
167
+      <HintPath>..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
168
+      <Private>True</Private>
169
+      <Private>True</Private>
170
+    </Reference>
171
+    <Reference Include="System.Runtime.InteropServices, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
172
+      <HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll</HintPath>
173
+      <Private>True</Private>
174
+      <Private>True</Private>
175
+    </Reference>
176
+    <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
177
+      <HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
178
+      <Private>True</Private>
179
+      <Private>True</Private>
180
+    </Reference>
181
+    <Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
182
+      <HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
183
+      <Private>True</Private>
184
+      <Private>True</Private>
185
+    </Reference>
186
+    <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
187
+      <HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
188
+      <Private>True</Private>
189
+      <Private>True</Private>
190
+    </Reference>
191
+    <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
192
+      <HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
193
+      <Private>True</Private>
194
+      <Private>True</Private>
195
+    </Reference>
196
+    <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
197
+      <HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
198
+      <Private>True</Private>
199
+      <Private>True</Private>
200
+    </Reference>
201
+    <Reference Include="System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
202
+      <HintPath>..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll</HintPath>
203
+      <Private>True</Private>
204
+      <Private>True</Private>
205
+    </Reference>
59 206
     <Reference Include="System.Xml.Linq" />
60 207
     <Reference Include="System.Data.DataSetExtensions" />
61 208
     <Reference Include="Microsoft.CSharp" />
62 209
     <Reference Include="System.Data" />
63 210
     <Reference Include="System.Deployment" />
64 211
     <Reference Include="System.Drawing" />
65
-    <Reference Include="System.Net.Http" />
66 212
     <Reference Include="System.Windows.Forms" />
67 213
     <Reference Include="System.Xml" />
214
+    <Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
215
+      <HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
216
+      <Private>True</Private>
217
+      <Private>True</Private>
218
+    </Reference>
68 219
   </ItemGroup>
69 220
   <ItemGroup>
70 221
     <Compile Include="AttributeForm.cs">
@@ -126,6 +277,14 @@
126 277
       <DependentUpon>DGXGeneral.cs</DependentUpon>
127 278
     </Compile>
128 279
     <Compile Include="DGXGeneralization.cs" />
280
+    <Compile Include="Dgxinters.cs" />
281
+    <Compile Include="Dgxthrorvrd.cs" />
282
+    <Compile Include="Dgxthrorvrd_Form.cs">
283
+      <SubType>Form</SubType>
284
+    </Compile>
285
+    <Compile Include="Dgxthrorvrd_Form.Designer.cs">
286
+      <DependentUpon>Dgxthrorvrd_Form.cs</DependentUpon>
287
+    </Compile>
129 288
     <Compile Include="ElePtCheck.cs" />
130 289
     <Compile Include="EleptDenck.cs" />
131 290
     <Compile Include="EleptDensity.cs">
@@ -142,6 +301,12 @@
142 301
     </Compile>
143 302
     <Compile Include="EleRound.cs" />
144 303
     <Compile Include="FeatureOverlap.cs" />
304
+    <Compile Include="GCDdelete_Form.cs">
305
+      <SubType>Form</SubType>
306
+    </Compile>
307
+    <Compile Include="GCDdelete_Form.Designer.cs">
308
+      <DependentUpon>GCDdelete_Form.cs</DependentUpon>
309
+    </Compile>
145 310
     <Compile Include="Hierak.cs">
146 311
       <SubType>Form</SubType>
147 312
     </Compile>
@@ -150,6 +315,12 @@
150 315
     </Compile>
151 316
     <Compile Include="Hierarchy.cs" />
152 317
     <Compile Include="InsertDOM.cs" />
318
+    <Compile Include="InsertDOMs_to_one.cs">
319
+      <SubType>Form</SubType>
320
+    </Compile>
321
+    <Compile Include="InsertDOMs_to_one.Designer.cs">
322
+      <DependentUpon>InsertDOMs_to_one.cs</DependentUpon>
323
+    </Compile>
153 324
     <Compile Include="InstDOM.cs">
154 325
       <SubType>Form</SubType>
155 326
     </Compile>
@@ -157,6 +328,12 @@
157 328
       <DependentUpon>InstDOM.cs</DependentUpon>
158 329
     </Compile>
159 330
     <Compile Include="Inters.cs" />
331
+    <Compile Include="JQXlabel.cs">
332
+      <SubType>Form</SubType>
333
+    </Compile>
334
+    <Compile Include="JQXlabel.Designer.cs">
335
+      <DependentUpon>JQXlabel.cs</DependentUpon>
336
+    </Compile>
160 337
     <Compile Include="LayerChange.cs" />
161 338
     <Compile Include="Layerchange_Form.cs">
162 339
       <SubType>Form</SubType>
@@ -166,6 +343,18 @@
166 343
     </Compile>
167 344
     <Compile Include="MainClass.cs" />
168 345
     <Compile Include="Menus.cs" />
346
+    <Compile Include="ModifyTFH.cs">
347
+      <SubType>Form</SubType>
348
+    </Compile>
349
+    <Compile Include="ModifyTFH.Designer.cs">
350
+      <DependentUpon>ModifyTFH.cs</DependentUpon>
351
+    </Compile>
352
+    <Compile Include="OutputbyTK_Form.cs">
353
+      <SubType>Form</SubType>
354
+    </Compile>
355
+    <Compile Include="OutputbyTK_Form.Designer.cs">
356
+      <DependentUpon>OutputbyTK_Form.cs</DependentUpon>
357
+    </Compile>
169 358
     <Compile Include="PickupPoint.cs" />
170 359
     <Compile Include="PicPts.cs">
171 360
       <SubType>Form</SubType>
@@ -200,6 +389,7 @@
200 389
     </Compile>
201 390
     <EmbeddedResource Include="AttributeForm.resx">
202 391
       <DependentUpon>AttributeForm.cs</DependentUpon>
392
+      <SubType>Designer</SubType>
203 393
     </EmbeddedResource>
204 394
     <EmbeddedResource Include="Chaginfos.resx">
205 395
       <DependentUpon>Chaginfos.cs</DependentUpon>
@@ -222,21 +412,39 @@
222 412
     <EmbeddedResource Include="DGXGeneral.resx">
223 413
       <DependentUpon>DGXGeneral.cs</DependentUpon>
224 414
     </EmbeddedResource>
415
+    <EmbeddedResource Include="Dgxthrorvrd_Form.resx">
416
+      <DependentUpon>Dgxthrorvrd_Form.cs</DependentUpon>
417
+    </EmbeddedResource>
225 418
     <EmbeddedResource Include="EleptDensity.resx">
226 419
       <DependentUpon>EleptDensity.cs</DependentUpon>
227 420
     </EmbeddedResource>
228 421
     <EmbeddedResource Include="EleRd.resx">
229 422
       <DependentUpon>EleRd.cs</DependentUpon>
230 423
     </EmbeddedResource>
424
+    <EmbeddedResource Include="GCDdelete_Form.resx">
425
+      <DependentUpon>GCDdelete_Form.cs</DependentUpon>
426
+    </EmbeddedResource>
231 427
     <EmbeddedResource Include="Hierak.resx">
232 428
       <DependentUpon>Hierak.cs</DependentUpon>
233 429
     </EmbeddedResource>
430
+    <EmbeddedResource Include="InsertDOMs_to_one.resx">
431
+      <DependentUpon>InsertDOMs_to_one.cs</DependentUpon>
432
+    </EmbeddedResource>
234 433
     <EmbeddedResource Include="InstDOM.resx">
235 434
       <DependentUpon>InstDOM.cs</DependentUpon>
236 435
     </EmbeddedResource>
436
+    <EmbeddedResource Include="JQXlabel.resx">
437
+      <DependentUpon>JQXlabel.cs</DependentUpon>
438
+    </EmbeddedResource>
237 439
     <EmbeddedResource Include="Layerchange_Form.resx">
238 440
       <DependentUpon>Layerchange_Form.cs</DependentUpon>
239 441
     </EmbeddedResource>
442
+    <EmbeddedResource Include="ModifyTFH.resx">
443
+      <DependentUpon>ModifyTFH.cs</DependentUpon>
444
+    </EmbeddedResource>
445
+    <EmbeddedResource Include="OutputbyTK_Form.resx">
446
+      <DependentUpon>OutputbyTK_Form.cs</DependentUpon>
447
+    </EmbeddedResource>
240 448
     <EmbeddedResource Include="PicPts.resx">
241 449
       <DependentUpon>PicPts.cs</DependentUpon>
242 450
     </EmbeddedResource>
@@ -261,6 +469,8 @@
261 469
     <EmbeddedResource Include="TKInfo.resx">
262 470
       <DependentUpon>TKInfo.cs</DependentUpon>
263 471
     </EmbeddedResource>
472
+    <None Include="App.config" />
473
+    <None Include="packages.config" />
264 474
     <None Include="Properties\Settings.settings">
265 475
       <Generator>SettingsSingleFileGenerator</Generator>
266 476
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -271,5 +481,18 @@
271 481
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
272 482
     </Compile>
273 483
   </ItemGroup>
484
+  <ItemGroup>
485
+    <Content Include="FodyWeavers.xml" />
486
+  </ItemGroup>
274 487
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
488
+  <Import Project="..\packages\Fody.6.8.0\build\Fody.targets" Condition="Exists('..\packages\Fody.6.8.0\build\Fody.targets')" />
489
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
490
+    <PropertyGroup>
491
+      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
492
+    </PropertyGroup>
493
+    <Error Condition="!Exists('..\packages\Fody.6.8.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.8.0\build\Fody.targets'))" />
494
+    <Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
495
+    <Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
496
+  </Target>
497
+  <Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
275 498
 </Project>

+ 2
- 2
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/HCTools.csproj.user Просмотреть файл

@@ -1,10 +1,10 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 3
   <PropertyGroup>
4
-    <ProjectView>ProjectFiles</ProjectView>
4
+    <ProjectView>ShowAllFiles</ProjectView>
5 5
   </PropertyGroup>
6 6
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
7 7
     <StartAction>Program</StartAction>
8
-    <StartProgram>E:\浩辰CAD 2021\gcad.exe</StartProgram>
8
+    <StartProgram>E:\浩辰CAD 2020\gcad.exe</StartProgram>
9 9
   </PropertyGroup>
10 10
 </Project>

+ 2
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/InsertDOM.cs Просмотреть файл

@@ -221,7 +221,8 @@ namespace HCTools
221 221
                     }
222 222
                 }
223 223
             }
224
-            doc.CloseAndSave(db.Filename);
224
+            doc.Database.Save();
225
+            doc.CloseAndDiscard();
225 226
         }
226 227
     }
227 228
 }

+ 128
- 26
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/LayerChange.cs Просмотреть файл

@@ -23,8 +23,8 @@ namespace HCTools
23 23
 
24 24
         public void chagly()
25 25
         {
26
-            try
27
-            {
26
+            //try
27
+            //{
28 28
                 List<String> dwgname = GetNameList(dwgpath, ".dwg");//获取dwg文件
29 29
                 if (dwgname.Count == 0)
30 30
                 {
@@ -35,7 +35,7 @@ namespace HCTools
35 35
                 {
36 36
                     string dwg = dwgpath + "\\" + dwgfile;
37 37
                     Document doc = GrxCAD.ApplicationServices.Application.DocumentManager.Add(dwg);
38
-                    if (flag == 0)
38
+                    if (flag == 0|| flag == 3 || flag == 4)
39 39
                     {
40 40
                         Delete(lys, doc, dwgfile);
41 41
                     }
@@ -48,35 +48,127 @@ namespace HCTools
48 48
                         Openly(lys, doc, dwgfile);
49 49
                     }
50 50
                     doc.CloseAndDiscard();
51
-                }
52
-            }
53
-            catch (GrxCAD.Runtime.Exception ex)
54
-            {
55
-                GrxCAD.ApplicationServices.Application.ShowAlertDialog("Error:\n" + ex.Message);
56 51
             }
57
-        }
52
+        //}
53
+            //catch (GrxCAD.Runtime.Exception ex)
54
+            //{
55
+            //    GrxCAD.ApplicationServices.Application.ShowAlertDialog("Error:\n" + ex.Message);
56
+            //}
57
+}
58 58
 
59
-        private void Delete(List<string> lys, Document doc,string dwgfile)
59
+        private void Delete(List<string> lys, Document doc, string dwgfile)
60 60
         {
61 61
             Database database = doc.Database;
62 62
             Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
63
-            using (Transaction transaction = database.TransactionManager.StartTransaction())
63
+            if (flag == 0)
64 64
             {
65
-                LayerTable layerTable = transaction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
66
-                for (int i = 0; i < lys.Count; i++)
65
+                using (Transaction trans = doc.Database.TransactionManager.StartTransaction())
67 66
                 {
68
-                    LayerTableRecord layerTableRecord = transaction.GetObject(layerTable[lys[i]], OpenMode.ForWrite) as LayerTableRecord;
69
-                    if (database.Clayer == layerTableRecord.ObjectId)
67
+                    LayerTable layerTable = trans.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
68
+                    for (int i = 0; i < lys.Count; i++)
70 69
                     {
71
-                        database.Clayer = layerTable["0"];
70
+                        if (layerTable.Has(lys[i]))
71
+                        {
72
+                            TypedValue[] value = new TypedValue[]
73
+                            {
74
+                                new TypedValue((int)DxfCode.LayerName,lys[i])
75
+                            };
76
+                            SelectionFilter filter = new SelectionFilter(value);
77
+                            PromptSelectionResult psr = ed.SelectAll(filter);
78
+                            if (psr.Status == PromptStatus.OK)
79
+                            {
80
+                                SelectionSet ss = psr.Value;
81
+                                ObjectIdCollection idcoll = new ObjectIdCollection(ss.GetObjectIds());
82
+                                for (int ii = 0; ii < idcoll.Count; ii++)
83
+                                {
84
+                                    Entity ent = trans.GetObject(idcoll[ii], OpenMode.ForWrite) as Entity;
85
+                                    ent.Erase();
86
+                                }
87
+                            }
88
+                        }
72 89
                     }
73
-                    layerTableRecord.Erase();
90
+                    database.SaveAs(savepath + "\\" + dwgfile, true, DwgVersion.AC1021, doc.Database.SecurityParameters);
91
+                    ed.WriteMessage("删除成功!\n");
92
+                    trans.Commit();
93
+                }
94
+            }
95
+
96
+            if (flag == 3)
97
+            {
98
+                using (Transaction transaction = database.TransactionManager.StartTransaction())
99
+                {
100
+                    LayerTable layerTable = transaction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
101
+                    foreach (ObjectId objid in layerTable)
102
+                    {
103
+                        LayerTableRecord layerTableRecord = transaction.GetObject(objid, OpenMode.ForWrite) as LayerTableRecord;
104
+                        //if (layerTableRecord == null)
105
+                        //    continue;
106
+                        layerTableRecord.IsLocked = false;
107
+                        if (database.Clayer == layerTableRecord.ObjectId)
108
+                            continue;
109
+                        TypedValue[] value = new TypedValue[]
110
+                        {
111
+                            new TypedValue((int)DxfCode.LayerName,layerTableRecord.Name)
112
+                        };
113
+                        SelectionFilter filter = new SelectionFilter(value);
114
+                        PromptSelectionResult psr = ed.SelectAll(filter);
115
+                        if (psr.Status == PromptStatus.Error&& lys.Contains(layerTableRecord.Name))
116
+                            layerTableRecord.Erase();
117
+                    }
118
+                    transaction.Commit();
119
+                    database.SaveAs(savepath + "\\" + dwgfile, true, DwgVersion.AC1021, doc.Database.SecurityParameters);
120
+                }
121
+                ed.WriteMessage("删除成功!\n");
122
+            }
123
+
124
+            if (flag == 4)
125
+            {
126
+                using (Transaction transaction = database.TransactionManager.StartTransaction())
127
+                {
128
+                    LayerTable layerTable = transaction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
129
+                    for (int i = 0; i < lys.Count; i++)
130
+                    {
131
+                        if (layerTable.Has(lys[i]))
132
+                        {
133
+                            LayerTableRecord layerTableRecord = transaction.GetObject(layerTable[lys[i]], OpenMode.ForWrite) as LayerTableRecord;
134
+                            if (layerTableRecord == null)
135
+                                continue;
136
+                            if (database.Clayer == layerTableRecord.ObjectId)
137
+                            {
138
+                                database.Clayer = layerTable["0"];
139
+                            }
140
+                            layerTableRecord.IsLocked = false;
141
+                            layerTableRecord.Erase();
142
+                            BlockTable bt = transaction.GetObject(database.BlockTableId, OpenMode.ForRead) as BlockTable;
143
+                            foreach (ObjectId btrId in bt)
144
+                            {
145
+                                BlockTableRecord btr = transaction.GetObject(btrId, OpenMode.ForRead) as BlockTableRecord;
146
+                                foreach (ObjectId entId in btr)
147
+                                {
148
+                                    Entity entity = transaction.GetObject(entId, OpenMode.ForRead) as Entity;
149
+                                    if (entity.Layer == lys[i])
150
+                                    {
151
+                                        entity.UpgradeOpen();
152
+                                        try
153
+                                        {
154
+                                            entity.Erase();
155
+                                        }
156
+                                        catch
157
+                                        {
158
+                                            continue;
159
+                                        }
160
+                                    }
161
+                                }
162
+                            }
163
+                        }
164
+                    }
165
+                    database.SaveAs(savepath + "\\" + dwgfile, true, DwgVersion.AC1021, doc.Database.SecurityParameters);
166
+                    transaction.Commit();
167
+                    ed.WriteMessage("删除成功!\n");
74 168
                 }
75
-                database.SaveAs(savepath + "\\" + dwgfile, DwgVersion.AC1024);
76
-                transaction.Commit();
77 169
             }
78
-            ed.WriteMessage("删除成功!\n");
79 170
         }
171
+        
80 172
 
81 173
         private void Openly(List<string> lys, Document doc, string dwgfile)
82 174
         {
@@ -87,10 +179,15 @@ namespace HCTools
87 179
                 LayerTable layerTable = transaction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
88 180
                 for (int i = 0; i < lys.Count; i++)
89 181
                 {
90
-                    LayerTableRecord layerTableRecord = transaction.GetObject(layerTable[lys[i]], OpenMode.ForWrite) as LayerTableRecord;
91
-                    layerTableRecord.IsOff = false;
182
+                    if (layerTable.Has(lys[i]))
183
+                    {
184
+                        LayerTableRecord layerTableRecord = transaction.GetObject(layerTable[lys[i]], OpenMode.ForWrite) as LayerTableRecord;
185
+                        if (layerTableRecord == null)
186
+                            continue;
187
+                        layerTableRecord.IsOff = false;
188
+                    }
92 189
                 }
93
-                database.SaveAs(savepath + "\\" + dwgfile, DwgVersion.AC1024);
190
+                database.SaveAs(savepath + "\\" + dwgfile, true, DwgVersion.AC1021, doc.Database.SecurityParameters);
94 191
                 transaction.Commit();
95 192
             }
96 193
             ed.WriteMessage("打开成功!\n");
@@ -105,10 +202,15 @@ namespace HCTools
105 202
                 LayerTable layerTable = transaction.GetObject(database.LayerTableId, OpenMode.ForRead) as LayerTable;
106 203
                 for (int i = 0; i < lys.Count; i++)
107 204
                 {
108
-                    LayerTableRecord layerTableRecord = transaction.GetObject(layerTable[lys[i]], OpenMode.ForWrite) as LayerTableRecord;
109
-                    layerTableRecord.IsOff = true;
205
+                    if (layerTable.Has(lys[i]))
206
+                    {
207
+                        LayerTableRecord layerTableRecord = transaction.GetObject(layerTable[lys[i]], OpenMode.ForWrite) as LayerTableRecord;
208
+                        if (layerTableRecord == null)
209
+                            continue;
210
+                        layerTableRecord.IsOff = true;
211
+                    }
110 212
                 }
111
-                database.SaveAs(savepath + "\\" + dwgfile, DwgVersion.AC1024);
213
+                database.SaveAs(savepath + "\\" + dwgfile, true, DwgVersion.AC1021, doc.Database.SecurityParameters);
112 214
                 transaction.Commit();
113 215
             }
114 216
             ed.WriteMessage("关闭成功!\n");

+ 48
- 8
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Layerchange_Form.Designer.cs Просмотреть файл

@@ -42,6 +42,9 @@ namespace HCTools
42 42
             this.label3 = new System.Windows.Forms.Label();
43 43
             this.textBox_savepath = new System.Windows.Forms.TextBox();
44 44
             this.button_cssavepath = new System.Windows.Forms.Button();
45
+            this.checkBox_deletself = new System.Windows.Forms.CheckBox();
46
+            this.checkBox_deletnull = new System.Windows.Forms.CheckBox();
47
+            this.checkBox_selectall = new System.Windows.Forms.CheckBox();
45 48
             this.SuspendLayout();
46 49
             // 
47 50
             // label1
@@ -71,7 +74,7 @@ namespace HCTools
71 74
             // 
72 75
             // button_ok
73 76
             // 
74
-            this.button_ok.Location = new System.Drawing.Point(98, 276);
77
+            this.button_ok.Location = new System.Drawing.Point(101, 310);
75 78
             this.button_ok.Name = "button_ok";
76 79
             this.button_ok.Size = new System.Drawing.Size(71, 31);
77 80
             this.button_ok.TabIndex = 4;
@@ -81,7 +84,7 @@ namespace HCTools
81 84
             // 
82 85
             // button_cancel
83 86
             // 
84
-            this.button_cancel.Location = new System.Drawing.Point(403, 276);
87
+            this.button_cancel.Location = new System.Drawing.Point(406, 310);
85 88
             this.button_cancel.Name = "button_cancel";
86 89
             this.button_cancel.Size = new System.Drawing.Size(75, 31);
87 90
             this.button_cancel.TabIndex = 5;
@@ -92,7 +95,7 @@ namespace HCTools
92 95
             // checkedListBox_tc
93 96
             // 
94 97
             this.checkedListBox_tc.FormattingEnabled = true;
95
-            this.checkedListBox_tc.Location = new System.Drawing.Point(158, 102);
98
+            this.checkedListBox_tc.Location = new System.Drawing.Point(158, 128);
96 99
             this.checkedListBox_tc.Name = "checkedListBox_tc";
97 100
             this.checkedListBox_tc.Size = new System.Drawing.Size(275, 164);
98 101
             this.checkedListBox_tc.TabIndex = 6;
@@ -102,15 +105,15 @@ namespace HCTools
102 105
             this.checkBox_delete.AutoSize = true;
103 106
             this.checkBox_delete.Location = new System.Drawing.Point(476, 128);
104 107
             this.checkBox_delete.Name = "checkBox_delete";
105
-            this.checkBox_delete.Size = new System.Drawing.Size(89, 19);
108
+            this.checkBox_delete.Size = new System.Drawing.Size(164, 34);
106 109
             this.checkBox_delete.TabIndex = 7;
107
-            this.checkBox_delete.Text = "删除图层";
110
+            this.checkBox_delete.Text = "删除图层\n(不包括图层本身)";
108 111
             this.checkBox_delete.UseVisualStyleBackColor = true;
109 112
             // 
110 113
             // checkBox_open
111 114
             // 
112 115
             this.checkBox_open.AutoSize = true;
113
-            this.checkBox_open.Location = new System.Drawing.Point(476, 176);
116
+            this.checkBox_open.Location = new System.Drawing.Point(631, 168);
114 117
             this.checkBox_open.Name = "checkBox_open";
115 118
             this.checkBox_open.Size = new System.Drawing.Size(89, 19);
116 119
             this.checkBox_open.TabIndex = 8;
@@ -120,7 +123,7 @@ namespace HCTools
120 123
             // checkBox_close
121 124
             // 
122 125
             this.checkBox_close.AutoSize = true;
123
-            this.checkBox_close.Location = new System.Drawing.Point(476, 223);
126
+            this.checkBox_close.Location = new System.Drawing.Point(631, 215);
124 127
             this.checkBox_close.Name = "checkBox_close";
125 128
             this.checkBox_close.Size = new System.Drawing.Size(89, 19);
126 129
             this.checkBox_close.TabIndex = 9;
@@ -163,11 +166,45 @@ namespace HCTools
163 166
             this.button_cssavepath.UseVisualStyleBackColor = true;
164 167
             this.button_cssavepath.Click += new System.EventHandler(this.button_cssavepath_Click);
165 168
             // 
169
+            // checkBox_deletself
170
+            // 
171
+            this.checkBox_deletself.AutoSize = true;
172
+            this.checkBox_deletself.Location = new System.Drawing.Point(476, 179);
173
+            this.checkBox_deletself.Name = "checkBox_deletself";
174
+            this.checkBox_deletself.Size = new System.Drawing.Size(149, 34);
175
+            this.checkBox_deletself.TabIndex = 14;
176
+            this.checkBox_deletself.Text = "删除图层\n(包括图层本身)";
177
+            this.checkBox_deletself.UseVisualStyleBackColor = true;
178
+            // 
179
+            // checkBox_deletnull
180
+            // 
181
+            this.checkBox_deletnull.AutoSize = true;
182
+            this.checkBox_deletnull.Location = new System.Drawing.Point(476, 235);
183
+            this.checkBox_deletnull.Name = "checkBox_deletnull";
184
+            this.checkBox_deletnull.Size = new System.Drawing.Size(104, 19);
185
+            this.checkBox_deletnull.TabIndex = 15;
186
+            this.checkBox_deletnull.Text = "删除空图层";
187
+            this.checkBox_deletnull.UseVisualStyleBackColor = true;
188
+            // 
189
+            // checkBox_selectall
190
+            // 
191
+            this.checkBox_selectall.AutoSize = true;
192
+            this.checkBox_selectall.Location = new System.Drawing.Point(374, 103);
193
+            this.checkBox_selectall.Name = "checkBox_selectall";
194
+            this.checkBox_selectall.Size = new System.Drawing.Size(59, 19);
195
+            this.checkBox_selectall.TabIndex = 16;
196
+            this.checkBox_selectall.Text = "全选";
197
+            this.checkBox_selectall.UseVisualStyleBackColor = true;
198
+            this.checkBox_selectall.CheckedChanged += new System.EventHandler(this.checkBox_selectall_CheckedChanged);
199
+            // 
166 200
             // Layerchange_Form
167 201
             // 
168 202
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
169 203
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
170
-            this.ClientSize = new System.Drawing.Size(599, 337);
204
+            this.ClientSize = new System.Drawing.Size(750, 379);
205
+            this.Controls.Add(this.checkBox_selectall);
206
+            this.Controls.Add(this.checkBox_deletnull);
207
+            this.Controls.Add(this.checkBox_deletself);
171 208
             this.Controls.Add(this.button_cssavepath);
172 209
             this.Controls.Add(this.textBox_savepath);
173 210
             this.Controls.Add(this.label3);
@@ -204,5 +241,8 @@ namespace HCTools
204 241
         private System.Windows.Forms.Label label3;
205 242
         private System.Windows.Forms.TextBox textBox_savepath;
206 243
         private System.Windows.Forms.Button button_cssavepath;
244
+        private System.Windows.Forms.CheckBox checkBox_deletself;
245
+        private System.Windows.Forms.CheckBox checkBox_deletnull;
246
+        private System.Windows.Forms.CheckBox checkBox_selectall;
207 247
     }
208 248
 }

+ 32
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Layerchange_Form.cs Просмотреть файл

@@ -117,6 +117,20 @@ namespace HCTools
117 117
                     lyc.chagly();
118 118
                     this.Close();
119 119
                 }
120
+                if (checkBox_deletnull.Checked == true)
121
+                {
122
+                    LayerChange lyc = new LayerChange();
123
+                    LayerChange.flag = 3;
124
+                    lyc.chagly();
125
+                    this.Close();
126
+                }
127
+                if (checkBox_deletself.Checked == true)
128
+                {
129
+                    LayerChange lyc = new LayerChange();
130
+                    LayerChange.flag = 4;
131
+                    lyc.chagly();
132
+                    this.Close();
133
+                }
120 134
             }
121 135
         }
122 136
 
@@ -139,5 +153,23 @@ namespace HCTools
139 153
                 textBox_savepath.Text = open.SelectedPath;
140 154
             LayerChange.savepath = textBox_savepath.Text;
141 155
         }
156
+
157
+        private void checkBox_selectall_CheckedChanged(object sender, EventArgs e)
158
+        {
159
+            if (checkBox_selectall.Checked == true)
160
+            {
161
+                for (int i = 0; i < checkedListBox_tc.Items.Count; i++)
162
+                {
163
+                    checkedListBox_tc.SetItemCheckState(i, CheckState.Checked);
164
+                }
165
+            }
166
+            else
167
+            {
168
+                for (int i = 0; i < checkedListBox_tc.Items.Count; i++)
169
+                {
170
+                    checkedListBox_tc.SetItemCheckState(i, CheckState.Unchecked);
171
+                }
172
+            }
173
+        }
142 174
     }
143 175
 }

+ 85
- 6
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/MainClass.cs Просмотреть файл

@@ -66,7 +66,6 @@ namespace HCTools
66 66
             //functions.deleteCommand();
67 67
         }
68 68
 
69
-        public static int FormNumber = 0; //0和1记录窗体是否已经打开
70 69
         public static string Flag = "";      //标记不同命令
71 70
         public int num = 1; //0超过期限,-1空
72 71
         public int slf_flag = 0;
@@ -477,6 +476,21 @@ namespace HCTools
477 476
             }
478 477
         }
479 478
 
479
+        //批量插入DOM(多对一)
480
+        [CommandMethod("InstDOMs")]
481
+        public void IstDOMs()
482
+        {
483
+            Verify();
484
+            if (num == 1)
485
+            {
486
+                InsertDOMs_to_one istdom = new InsertDOMs_to_one();
487
+                istdom.Show();
488
+                //Flag = "SlopeLine";
489
+                //Parameters SL = new Parameters();
490
+                //SL.Show();
491
+            }
492
+        }
493
+
480 494
         //等高线缩编
481 495
         [CommandMethod("Dgxsb")]
482 496
         public void dgxSB()
@@ -501,7 +515,7 @@ namespace HCTools
501 515
             }
502 516
         }
503 517
 
504
-        //图层删改
518
+        //属性表
505 519
         [CommandMethod("Attribute")]
506 520
         public void Attribute()
507 521
         {
@@ -574,11 +588,76 @@ namespace HCTools
574 588
         }
575 589
 
576 590
         //等高线内插
577
-        //[CommandMethod("Dgxinter")]
578
-        //public void Dgxnc()
591
+        [CommandMethod("Dgxinter")]
592
+        public void Dgxnc()
593
+        {
594
+            Verify();
595
+            if (num == 1)
596
+            {
597
+                Dgxinters dgxinter = new Dgxinters();
598
+                dgxinter.Interdgx();
599
+            }
600
+        }
601
+
602
+        //等高线过河流道路房屋陡坎裁剪
603
+        //[CommandMethod("Cutdgxthrorvrd")]
604
+        //public void Cutdgxthrorvrd()
579 605
         //{
580
-        //    Dgxinterpl form = new Dgxinterpl();
581
-        //    form.Show();
606
+        //    Verify();
607
+        //    if (num == 1)
608
+        //    {
609
+        //        Dgxthrorvrd_Form form = new Dgxthrorvrd_Form();
610
+        //        form.Show();
611
+        //    }
582 612
         //}
613
+
614
+        //删除整数值高程点
615
+        [CommandMethod("Deleteintgcd")]
616
+        public void Deleteintgcd()
617
+        {
618
+            Verify();
619
+            if (num == 1)
620
+            {
621
+                GCDdelete_Form form = new GCDdelete_Form();
622
+                form.Show();
623
+            }
624
+        }
625
+
626
+        //分幅输出地形图
627
+        [CommandMethod("Clipdwg")]
628
+        public void Clipdwg()
629
+        {
630
+            Verify();
631
+            if (num == 1)
632
+            {
633
+                OutputbyTK_Form form = new OutputbyTK_Form();
634
+                form.Show();
635
+            }
636
+        }
637
+
638
+
639
+        //图幅号修改
640
+        [CommandMethod("ChangeTFH")]
641
+        public void ChgTFH()
642
+        {
643
+            Verify();
644
+            if (num == 1)
645
+            {
646
+                ModifyTFH form = new ModifyTFH();
647
+                form.Show();
648
+            }
649
+        }
650
+
651
+        //计曲线高程标注
652
+        [CommandMethod("JQXLabel")]
653
+        public void Jqxlb()
654
+        {
655
+            Verify();
656
+            if (num == 1)
657
+            {
658
+                JQXlabel form = new JQXlabel();
659
+                form.Show();
660
+            }
661
+        }
583 662
     }
584 663
 }

+ 21
- 3
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Menus.cs Просмотреть файл

@@ -50,6 +50,9 @@ namespace HCTools
50 50
             pmi = pm.AddMenuItem(pm.Count + 1, "批量插入DOM", "InstDOM ");
51 51
             pmi.HelpString = "批量插入DOM";
52 52
 
53
+            pmi = pm.AddMenuItem(pm.Count + 1, "批量插入DOM(多对一)", "InstDOMs ");
54
+            pmi.HelpString = "批量插入DOM(多对一)";
55
+
53 56
             //添加一个分隔条以区分不同类型的命令
54 57
             pm.AddSeparator(pm.Count + 1);
55 58
 
@@ -72,6 +75,12 @@ namespace HCTools
72 75
             pmi = pm.AddMenuItem(pm.Count + 1, "自动生成图框", "SheetMap ");
73 76
             pmi.HelpString = "自动生成图框";
74 77
 
78
+            pmi = pm.AddMenuItem(pm.Count + 1, "分幅输出地形图", "Clipdwg ");
79
+            pmi.HelpString = "分幅输出地形图";
80
+
81
+            pmi = pm.AddMenuItem(pm.Count + 1, "图幅号修改", "ChangeTFH ");
82
+            pmi.HelpString = "图幅号修改";
83
+
75 84
             pmi = pm.AddMenuItem(pm.Count + 1, "批量修改图框信息", "BATChange ");
76 85
             pmi.HelpString = "批量修改图框信息";
77 86
 
@@ -92,7 +101,10 @@ namespace HCTools
92 101
             pmi.HelpString = "检查高程点在一定范围内密度";
93 102
 
94 103
             pmi = pm.AddMenuItem(pm.Count + 1, "删除内部高程点", "Deletept ");
95
-            pmi.HelpString = "删除高程点";
104
+            pmi.HelpString = "删除内部高程点";
105
+
106
+            pmi = pm.AddMenuItem(pm.Count + 1, "删除整数高程点", "Deleteintgcd ");
107
+            pmi.HelpString = "删除整数高程点";
96 108
 
97 109
             pmi = pm.AddMenuItem(pm.Count + 1, "等高线分层", "Hierarchy ");
98 110
             pmi.HelpString = "等高线分层";
@@ -109,8 +121,11 @@ namespace HCTools
109 121
             pmi = pm.AddMenuItem(pm.Count + 1, "等高线拉线修改", "CLfix ");
110 122
             pmi.HelpString = "等高线拉线修改";
111 123
 
112
-            //pmi = pm.AddMenuItem(pm.Count + 1, "等高线内插", "Dgxinter ");
113
-            //pmi.HelpString = "等高线内插";
124
+            pmi = pm.AddMenuItem(pm.Count + 1, "等高线内插", "Dgxinter ");
125
+            pmi.HelpString = "等高线内插";
126
+
127
+            pmi = pm.AddMenuItem(pm.Count + 1, "计曲线高程标注", "JQXLabel ");
128
+            pmi.HelpString = "计曲线高程标注";
114 129
 
115 130
             //pmi = pm.AddMenuItem(pm.Count + 1, "示坡线绘制", "SlopeLine ");
116 131
             //pmi.HelpString = "示坡线绘制";
@@ -130,6 +145,9 @@ namespace HCTools
130 145
             pmi = pm.AddMenuItem(pm.Count + 1, "等高线高程取整", "EleRd ");
131 146
             pmi.HelpString = "等高线高程取整";
132 147
 
148
+            //pmi = pm.AddMenuItem(pm.Count + 1, "等高线过河流道路房屋陡坎裁剪", "Cutdgxthrorvrd ");
149
+            //pmi.HelpString = "等高线过河流道路房屋陡坎裁剪";
150
+
133 151
             //添加一个分隔条以区分不同类型的命令
134 152
             pm.AddSeparator(pm.Count + 1);
135 153
 

+ 134
- 16
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.Designer.cs Просмотреть файл

@@ -1,29 +1,147 @@
1 1
 //------------------------------------------------------------------------------
2 2
 // <auto-generated>
3
-//     This code was generated by a tool.
4
-//     Runtime Version:4.0.30319.42000
3
+//     此代码由工具生成。
4
+//     运行时版本:4.0.30319.42000
5 5
 //
6
-//     Changes to this file may cause incorrect behavior and will be lost if
7
-//     the code is regenerated.
6
+//     对此文件的更改可能会导致不正确的行为,并且如果
7
+//     重新生成代码,这些更改将会丢失。
8 8
 // </auto-generated>
9 9
 //------------------------------------------------------------------------------
10 10
 
11
-
12
-namespace HCTools.Properties
13
-{
11
+namespace HCTools.Properties {
12
+    
13
+    
14 14
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
17
-    {
18
-
15
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
16
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17
+        
19 18
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
20
-
21
-        public static Settings Default
22
-        {
23
-            get
24
-            {
19
+        
20
+        public static Settings Default {
21
+            get {
25 22
                 return defaultInstance;
26 23
             }
27 24
         }
25
+        
26
+        [global::System.Configuration.UserScopedSettingAttribute()]
27
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
29
+        public string TFName {
30
+            get {
31
+                return ((string)(this["TFName"]));
32
+            }
33
+            set {
34
+                this["TFName"] = value;
35
+            }
36
+        }
37
+        
38
+        [global::System.Configuration.UserScopedSettingAttribute()]
39
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40
+        [global::System.Configuration.DefaultSettingValueAttribute("2000国家大地坐标系,1985国家高程基准,等高距为1m。\r\nGB/T20257.1-2007 国家基本比例尺地图图式 第一部分\r\n1:500 1:1000 1" +
41
+            ":2000 地形图图式\r\nxxxx年xx月测制")]
42
+        public string Note2 {
43
+            get {
44
+                return ((string)(this["Note2"]));
45
+            }
46
+            set {
47
+                this["Note2"] = value;
48
+            }
49
+        }
50
+        
51
+        [global::System.Configuration.UserScopedSettingAttribute()]
52
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
53
+        [global::System.Configuration.DefaultSettingValueAttribute("测图员 ")]
54
+        public string CTY {
55
+            get {
56
+                return ((string)(this["CTY"]));
57
+            }
58
+            set {
59
+                this["CTY"] = value;
60
+            }
61
+        }
62
+        
63
+        [global::System.Configuration.UserScopedSettingAttribute()]
64
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
65
+        [global::System.Configuration.DefaultSettingValueAttribute("检查员 ")]
66
+        public string JCY {
67
+            get {
68
+                return ((string)(this["JCY"]));
69
+            }
70
+            set {
71
+                this["JCY"] = value;
72
+            }
73
+        }
74
+        
75
+        [global::System.Configuration.UserScopedSettingAttribute()]
76
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
77
+        [global::System.Configuration.DefaultSettingValueAttribute("土调员 ")]
78
+        public string TDY {
79
+            get {
80
+                return ((string)(this["TDY"]));
81
+            }
82
+            set {
83
+                this["TDY"] = value;
84
+            }
85
+        }
86
+        
87
+        [global::System.Configuration.UserScopedSettingAttribute()]
88
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
89
+        [global::System.Configuration.DefaultSettingValueAttribute("数调员 ")]
90
+        public string SDY {
91
+            get {
92
+                return ((string)(this["SDY"]));
93
+            }
94
+            set {
95
+                this["SDY"] = value;
96
+            }
97
+        }
98
+        
99
+        [global::System.Configuration.UserScopedSettingAttribute()]
100
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
101
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]
102
+        public int DH {
103
+            get {
104
+                return ((int)(this["DH"]));
105
+            }
106
+            set {
107
+                this["DH"] = value;
108
+            }
109
+        }
110
+        
111
+        [global::System.Configuration.UserScopedSettingAttribute()]
112
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
113
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
114
+        public string svpath {
115
+            get {
116
+                return ((string)(this["svpath"]));
117
+            }
118
+            set {
119
+                this["svpath"] = value;
120
+            }
121
+        }
122
+        
123
+        [global::System.Configuration.UserScopedSettingAttribute()]
124
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
125
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
126
+        public string secret {
127
+            get {
128
+                return ((string)(this["secret"]));
129
+            }
130
+            set {
131
+                this["secret"] = value;
132
+            }
133
+        }
134
+        
135
+        [global::System.Configuration.UserScopedSettingAttribute()]
136
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
137
+        [global::System.Configuration.DefaultSettingValueAttribute("1")]
138
+        public double dgj {
139
+            get {
140
+                return ((double)(this["dgj"]));
141
+            }
142
+            set {
143
+                this["dgj"] = value;
144
+            }
145
+        }
28 146
     }
29 147
 }

+ 38
- 6
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/Properties/Settings.settings Просмотреть файл

@@ -1,7 +1,39 @@
1 1
 <?xml version='1.0' encoding='utf-8'?>
2
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
3
-  <Profiles>
4
-    <Profile Name="(Default)" />
5
-  </Profiles>
6
-  <Settings />
7
-</SettingsFile>
2
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HCTools.Properties" GeneratedClassName="Settings">
3
+  <Profiles />
4
+  <Settings>
5
+    <Setting Name="TFName" Type="System.String" Scope="User">
6
+      <Value Profile="(Default)" />
7
+    </Setting>
8
+    <Setting Name="Note2" Type="System.String" Scope="User">
9
+      <Value Profile="(Default)">2000国家大地坐标系,1985国家高程基准,等高距为1m。
10
+GB/T20257.1-2007 国家基本比例尺地图图式 第一部分
11
+1:500 1:1000 1:2000 地形图图式
12
+xxxx年xx月测制</Value>
13
+    </Setting>
14
+    <Setting Name="CTY" Type="System.String" Scope="User">
15
+      <Value Profile="(Default)">测图员 </Value>
16
+    </Setting>
17
+    <Setting Name="JCY" Type="System.String" Scope="User">
18
+      <Value Profile="(Default)">检查员 </Value>
19
+    </Setting>
20
+    <Setting Name="TDY" Type="System.String" Scope="User">
21
+      <Value Profile="(Default)">土调员 </Value>
22
+    </Setting>
23
+    <Setting Name="SDY" Type="System.String" Scope="User">
24
+      <Value Profile="(Default)">数调员 </Value>
25
+    </Setting>
26
+    <Setting Name="DH" Type="System.Int32" Scope="User">
27
+      <Value Profile="(Default)">0</Value>
28
+    </Setting>
29
+    <Setting Name="svpath" Type="System.String" Scope="User">
30
+      <Value Profile="(Default)" />
31
+    </Setting>
32
+    <Setting Name="secret" Type="System.String" Scope="User">
33
+      <Value Profile="(Default)" />
34
+    </Setting>
35
+    <Setting Name="dgj" Type="System.Double" Scope="User">
36
+      <Value Profile="(Default)">1</Value>
37
+    </Setting>
38
+  </Settings>
39
+</SettingsFile>

+ 55
- 81
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.Designer.cs Просмотреть файл

@@ -36,11 +36,6 @@ namespace HCTools
36 36
             this.textBox_SHY = new System.Windows.Forms.TextBox();
37 37
             this.textBox_TDY = new System.Windows.Forms.TextBox();
38 38
             this.textBox_CTY = new System.Windows.Forms.TextBox();
39
-            this.label_Tdy = new System.Windows.Forms.Label();
40
-            this.label_DH = new System.Windows.Forms.Label();
41
-            this.label_Jcy = new System.Windows.Forms.Label();
42
-            this.label_Shy = new System.Windows.Forms.Label();
43
-            this.label_Cty = new System.Windows.Forms.Label();
44 39
             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
45 40
             this.label_Rich = new System.Windows.Forms.Label();
46 41
             this.textBox_Name = new System.Windows.Forms.TextBox();
@@ -50,12 +45,15 @@ namespace HCTools
50 45
             this.label1 = new System.Windows.Forms.Label();
51 46
             this.textBox_savepath = new System.Windows.Forms.TextBox();
52 47
             this.button_chse = new System.Windows.Forms.Button();
48
+            this.label_DH = new System.Windows.Forms.Label();
49
+            this.label2 = new System.Windows.Forms.Label();
50
+            this.textBox_secret = new System.Windows.Forms.TextBox();
53 51
             this.SuspendLayout();
54 52
             // 
55 53
             // label_blc_TK
56 54
             // 
57 55
             this.label_blc_TK.AutoSize = true;
58
-            this.label_blc_TK.Location = new System.Drawing.Point(290, 317);
56
+            this.label_blc_TK.Location = new System.Drawing.Point(306, 304);
59 57
             this.label_blc_TK.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
60 58
             this.label_blc_TK.Name = "label_blc_TK";
61 59
             this.label_blc_TK.Size = new System.Drawing.Size(52, 15);
@@ -70,7 +68,7 @@ namespace HCTools
70 68
             "1:500",
71 69
             "1:1000",
72 70
             "1:2000"});
73
-            this.comboBox_BLC1.Location = new System.Drawing.Point(350, 314);
71
+            this.comboBox_BLC1.Location = new System.Drawing.Point(366, 301);
74 72
             this.comboBox_BLC1.Margin = new System.Windows.Forms.Padding(4);
75 73
             this.comboBox_BLC1.Name = "comboBox_BLC1";
76 74
             this.comboBox_BLC1.Size = new System.Drawing.Size(166, 23);
@@ -78,7 +76,7 @@ namespace HCTools
78 76
             // 
79 77
             // textBox_DH
80 78
             // 
81
-            this.textBox_DH.Location = new System.Drawing.Point(117, 312);
79
+            this.textBox_DH.Location = new System.Drawing.Point(133, 299);
82 80
             this.textBox_DH.Margin = new System.Windows.Forms.Padding(4);
83 81
             this.textBox_DH.Name = "textBox_DH";
84 82
             this.textBox_DH.Size = new System.Drawing.Size(156, 25);
@@ -86,85 +84,39 @@ namespace HCTools
86 84
             // 
87 85
             // textBox_JCY
88 86
             // 
89
-            this.textBox_JCY.Location = new System.Drawing.Point(350, 233);
87
+            this.textBox_JCY.Location = new System.Drawing.Point(309, 220);
90 88
             this.textBox_JCY.Margin = new System.Windows.Forms.Padding(4);
91 89
             this.textBox_JCY.Name = "textBox_JCY";
92
-            this.textBox_JCY.Size = new System.Drawing.Size(166, 25);
90
+            this.textBox_JCY.Size = new System.Drawing.Size(223, 25);
93 91
             this.textBox_JCY.TabIndex = 104;
92
+            this.textBox_JCY.Text = "检察员 ";
94 93
             // 
95 94
             // textBox_SHY
96 95
             // 
97
-            this.textBox_SHY.Location = new System.Drawing.Point(350, 271);
96
+            this.textBox_SHY.Location = new System.Drawing.Point(309, 258);
98 97
             this.textBox_SHY.Margin = new System.Windows.Forms.Padding(4);
99 98
             this.textBox_SHY.Name = "textBox_SHY";
100
-            this.textBox_SHY.Size = new System.Drawing.Size(166, 25);
99
+            this.textBox_SHY.Size = new System.Drawing.Size(223, 25);
101 100
             this.textBox_SHY.TabIndex = 103;
101
+            this.textBox_SHY.Text = "数调员 ";
102 102
             // 
103 103
             // textBox_TDY
104 104
             // 
105
-            this.textBox_TDY.Location = new System.Drawing.Point(117, 271);
105
+            this.textBox_TDY.Location = new System.Drawing.Point(76, 258);
106 106
             this.textBox_TDY.Margin = new System.Windows.Forms.Padding(4);
107 107
             this.textBox_TDY.Name = "textBox_TDY";
108
-            this.textBox_TDY.Size = new System.Drawing.Size(156, 25);
108
+            this.textBox_TDY.Size = new System.Drawing.Size(213, 25);
109 109
             this.textBox_TDY.TabIndex = 102;
110
+            this.textBox_TDY.Text = "土调员 ";
110 111
             // 
111 112
             // textBox_CTY
112 113
             // 
113
-            this.textBox_CTY.Location = new System.Drawing.Point(117, 233);
114
+            this.textBox_CTY.Location = new System.Drawing.Point(76, 220);
114 115
             this.textBox_CTY.Margin = new System.Windows.Forms.Padding(4);
115 116
             this.textBox_CTY.Name = "textBox_CTY";
116
-            this.textBox_CTY.Size = new System.Drawing.Size(156, 25);
117
+            this.textBox_CTY.Size = new System.Drawing.Size(213, 25);
117 118
             this.textBox_CTY.TabIndex = 101;
118
-            // 
119
-            // label_Tdy
120
-            // 
121
-            this.label_Tdy.AutoSize = true;
122
-            this.label_Tdy.Location = new System.Drawing.Point(57, 279);
123
-            this.label_Tdy.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
124
-            this.label_Tdy.Name = "label_Tdy";
125
-            this.label_Tdy.Size = new System.Drawing.Size(52, 15);
126
-            this.label_Tdy.TabIndex = 100;
127
-            this.label_Tdy.Text = "土调员";
128
-            // 
129
-            // label_DH
130
-            // 
131
-            this.label_DH.AutoSize = true;
132
-            this.label_DH.Location = new System.Drawing.Point(57, 320);
133
-            this.label_DH.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
134
-            this.label_DH.Name = "label_DH";
135
-            this.label_DH.Size = new System.Drawing.Size(37, 15);
136
-            this.label_DH.TabIndex = 99;
137
-            this.label_DH.Text = "带号";
138
-            // 
139
-            // label_Jcy
140
-            // 
141
-            this.label_Jcy.AutoSize = true;
142
-            this.label_Jcy.Location = new System.Drawing.Point(290, 236);
143
-            this.label_Jcy.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
144
-            this.label_Jcy.Name = "label_Jcy";
145
-            this.label_Jcy.Size = new System.Drawing.Size(52, 15);
146
-            this.label_Jcy.TabIndex = 98;
147
-            this.label_Jcy.Text = "检查员";
148
-            // 
149
-            // label_Shy
150
-            // 
151
-            this.label_Shy.AutoSize = true;
152
-            this.label_Shy.Location = new System.Drawing.Point(290, 274);
153
-            this.label_Shy.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
154
-            this.label_Shy.Name = "label_Shy";
155
-            this.label_Shy.Size = new System.Drawing.Size(52, 15);
156
-            this.label_Shy.TabIndex = 97;
157
-            this.label_Shy.Text = "数化员";
158
-            // 
159
-            // label_Cty
160
-            // 
161
-            this.label_Cty.AutoSize = true;
162
-            this.label_Cty.Location = new System.Drawing.Point(57, 236);
163
-            this.label_Cty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
164
-            this.label_Cty.Name = "label_Cty";
165
-            this.label_Cty.Size = new System.Drawing.Size(52, 15);
166
-            this.label_Cty.TabIndex = 96;
167
-            this.label_Cty.Text = "测图员";
119
+            this.textBox_CTY.Text = "测图员 ";
168 120
             // 
169 121
             // richTextBox1
170 122
             // 
@@ -205,7 +157,7 @@ namespace HCTools
205 157
             // 
206 158
             // btn_Cancel
207 159
             // 
208
-            this.btn_Cancel.Location = new System.Drawing.Point(324, 411);
160
+            this.btn_Cancel.Location = new System.Drawing.Point(323, 418);
209 161
             this.btn_Cancel.Margin = new System.Windows.Forms.Padding(4);
210 162
             this.btn_Cancel.Name = "btn_Cancel";
211 163
             this.btn_Cancel.Size = new System.Drawing.Size(100, 29);
@@ -216,7 +168,7 @@ namespace HCTools
216 168
             // 
217 169
             // btn_OK
218 170
             // 
219
-            this.btn_OK.Location = new System.Drawing.Point(173, 410);
171
+            this.btn_OK.Location = new System.Drawing.Point(172, 417);
220 172
             this.btn_OK.Margin = new System.Windows.Forms.Padding(4);
221 173
             this.btn_OK.Name = "btn_OK";
222 174
             this.btn_OK.Size = new System.Drawing.Size(100, 29);
@@ -228,7 +180,7 @@ namespace HCTools
228 180
             // label1
229 181
             // 
230 182
             this.label1.AutoSize = true;
231
-            this.label1.Location = new System.Drawing.Point(50, 369);
183
+            this.label1.Location = new System.Drawing.Point(49, 376);
232 184
             this.label1.Name = "label1";
233 185
             this.label1.Size = new System.Drawing.Size(82, 15);
234 186
             this.label1.TabIndex = 110;
@@ -236,14 +188,14 @@ namespace HCTools
236 188
             // 
237 189
             // textBox_savepath
238 190
             // 
239
-            this.textBox_savepath.Location = new System.Drawing.Point(138, 366);
191
+            this.textBox_savepath.Location = new System.Drawing.Point(137, 373);
240 192
             this.textBox_savepath.Name = "textBox_savepath";
241 193
             this.textBox_savepath.Size = new System.Drawing.Size(304, 25);
242 194
             this.textBox_savepath.TabIndex = 111;
243 195
             // 
244 196
             // button_chse
245 197
             // 
246
-            this.button_chse.Location = new System.Drawing.Point(458, 362);
198
+            this.button_chse.Location = new System.Drawing.Point(457, 369);
247 199
             this.button_chse.Name = "button_chse";
248 200
             this.button_chse.Size = new System.Drawing.Size(75, 29);
249 201
             this.button_chse.TabIndex = 112;
@@ -251,11 +203,39 @@ namespace HCTools
251 203
             this.button_chse.UseVisualStyleBackColor = true;
252 204
             this.button_chse.Click += new System.EventHandler(this.button_chse_Click);
253 205
             // 
206
+            // label_DH
207
+            // 
208
+            this.label_DH.AutoSize = true;
209
+            this.label_DH.Location = new System.Drawing.Point(73, 307);
210
+            this.label_DH.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
211
+            this.label_DH.Name = "label_DH";
212
+            this.label_DH.Size = new System.Drawing.Size(37, 15);
213
+            this.label_DH.TabIndex = 99;
214
+            this.label_DH.Text = "带号";
215
+            // 
216
+            // label2
217
+            // 
218
+            this.label2.AutoSize = true;
219
+            this.label2.Location = new System.Drawing.Point(51, 340);
220
+            this.label2.Name = "label2";
221
+            this.label2.Size = new System.Drawing.Size(187, 15);
222
+            this.label2.TabIndex = 113;
223
+            this.label2.Text = "保密等级(没有则为空):";
224
+            // 
225
+            // textBox_secret
226
+            // 
227
+            this.textBox_secret.Location = new System.Drawing.Point(244, 337);
228
+            this.textBox_secret.Name = "textBox_secret";
229
+            this.textBox_secret.Size = new System.Drawing.Size(151, 25);
230
+            this.textBox_secret.TabIndex = 114;
231
+            // 
254 232
             // TKInfo
255 233
             // 
256 234
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
257 235
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
258
-            this.ClientSize = new System.Drawing.Size(610, 467);
236
+            this.ClientSize = new System.Drawing.Size(610, 457);
237
+            this.Controls.Add(this.textBox_secret);
238
+            this.Controls.Add(this.label2);
259 239
             this.Controls.Add(this.button_chse);
260 240
             this.Controls.Add(this.textBox_savepath);
261 241
             this.Controls.Add(this.label1);
@@ -268,11 +248,7 @@ namespace HCTools
268 248
             this.Controls.Add(this.textBox_SHY);
269 249
             this.Controls.Add(this.textBox_TDY);
270 250
             this.Controls.Add(this.textBox_CTY);
271
-            this.Controls.Add(this.label_Tdy);
272 251
             this.Controls.Add(this.label_DH);
273
-            this.Controls.Add(this.label_Jcy);
274
-            this.Controls.Add(this.label_Shy);
275
-            this.Controls.Add(this.label_Cty);
276 252
             this.Controls.Add(this.richTextBox1);
277 253
             this.Controls.Add(this.label_Rich);
278 254
             this.Controls.Add(this.textBox_Name);
@@ -294,11 +270,6 @@ namespace HCTools
294 270
         private System.Windows.Forms.TextBox textBox_SHY;
295 271
         private System.Windows.Forms.TextBox textBox_TDY;
296 272
         private System.Windows.Forms.TextBox textBox_CTY;
297
-        private System.Windows.Forms.Label label_Tdy;
298
-        private System.Windows.Forms.Label label_DH;
299
-        private System.Windows.Forms.Label label_Jcy;
300
-        private System.Windows.Forms.Label label_Shy;
301
-        private System.Windows.Forms.Label label_Cty;
302 273
         private System.Windows.Forms.RichTextBox richTextBox1;
303 274
         private System.Windows.Forms.Label label_Rich;
304 275
         private System.Windows.Forms.TextBox textBox_Name;
@@ -308,5 +279,8 @@ namespace HCTools
308 279
         private System.Windows.Forms.Label label1;
309 280
         private System.Windows.Forms.TextBox textBox_savepath;
310 281
         private System.Windows.Forms.Button button_chse;
282
+        private System.Windows.Forms.Label label_DH;
283
+        private System.Windows.Forms.Label label2;
284
+        private System.Windows.Forms.TextBox textBox_secret;
311 285
     }
312 286
 }

+ 31
- 10
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/TKInfo.cs Просмотреть файл

@@ -28,21 +28,32 @@ namespace HCTools
28 28
         public static string FCY = "";
29 29
         public static string SV = "";
30 30
         public static int DH = -1;
31
+        public static string Secret = "";
31 32
 
32 33
         public static int BLC = 2000;
33
-        public static string ConstLine1 = "GB/T20257.1-2007国家基本比例尺地图图式 第一部分:";
34
-        public static string ConstLine2 = "1:500 1:1000 1:2000地形图图式";
34
+        //public static string ConstLine1 = "GB/T20257.1-2007国家基本比例尺地图图式 第一部分:";
35
+        //public static string ConstLine2 = "1:500 1:1000 1:2000地形图图式";
35 36
         #endregion
36 37
 
37 38
         private void TKInfo_Load(object sender, EventArgs e)
38 39
         {
39
-            this.richTextBox1.Text = "\r\n";
40
-            this.richTextBox1.Text += ConstLine1;
41
-            this.richTextBox1.Text += "\r\n";
42
-            this.richTextBox1.Text += ConstLine2;
43
-            this.richTextBox1.Text += "\r\n";
44
-            this.richTextBox1.Text += System.DateTime.Now.Year + "年" + System.DateTime.Now.Month + "月数字化成图。";
40
+            //this.richTextBox1.Text = "\r\n";
41
+            //this.richTextBox1.Text += ConstLine1;
42
+            //this.richTextBox1.Text += "\r\n";
43
+            //this.richTextBox1.Text += ConstLine2;
44
+            //this.richTextBox1.Text += "\r\n";
45
+            //this.richTextBox1.Text += System.DateTime.Now.Year + "年" + System.DateTime.Now.Month + "月数字化成图。";
45 46
 
47
+
48
+            this.textBox_Name.Text = Properties.Settings.Default.TFName;
49
+            this.richTextBox1.Text = Properties.Settings.Default.Note2;
50
+            this.textBox_CTY.Text = Properties.Settings.Default.CTY;
51
+            this.textBox_TDY.Text = Properties.Settings.Default.TDY;
52
+            this.textBox_SHY.Text = Properties.Settings.Default.SDY;
53
+            this.textBox_JCY.Text = Properties.Settings.Default.JCY;
54
+            this.textBox_DH.Text = Properties.Settings.Default.DH.ToString();
55
+            this.textBox_secret.Text = Properties.Settings.Default.secret.ToString();
56
+            textBox_savepath.Text = Properties.Settings.Default.svpath;
46 57
         }
47 58
 
48 59
         private void btn_OK_Click(object sender, EventArgs e)
@@ -70,6 +81,7 @@ namespace HCTools
70 81
             SHY = this.textBox_SHY.Text;
71 82
             JCY = this.textBox_JCY.Text;
72 83
             SV = textBox_savepath.Text;
84
+            Secret = textBox_secret.Text;
73 85
 
74 86
             if (string.IsNullOrEmpty(textBox_DH.Text.Trim()) == false)
75 87
             {
@@ -94,8 +106,17 @@ namespace HCTools
94 106
 
95 107
             CreateSheetMap map = new CreateSheetMap();
96 108
             map.create();
97
-            Editor ed = GrxCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
98
-            ed.WriteMessage("生成完毕\n");
109
+            Properties.Settings.Default.TFName = name;
110
+            Properties.Settings.Default.Note2 = note;
111
+            Properties.Settings.Default.CTY = CTY;
112
+            Properties.Settings.Default.JCY = JCY;
113
+            Properties.Settings.Default.TDY = TDY;
114
+            Properties.Settings.Default.SDY = SHY;
115
+            Properties.Settings.Default.DH = DH;
116
+            Properties.Settings.Default.svpath = SV;
117
+            Properties.Settings.Default.secret = Secret;
118
+            Properties.Settings.Default.Save();
119
+            MessageBox.Show("生成完毕");
99 120
         }
100 121
 
101 122
         private void btn_Cancel_Click(object sender, EventArgs e)

Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.dll Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/bin/Debug/HCTools.pdb Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferences.cache Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Просмотреть файл


+ 1
- 1
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.CoreCompileInputs.cache Просмотреть файл

@@ -1 +1 @@
1
-4e3c4767d845fa36fb55751b677a88ae0dd51aac
1
+77524447917898d81ef1041c17a73b0be2e35819

+ 17
- 0
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.FileListAbsolute.txt Просмотреть файл

@@ -24,8 +24,15 @@ F:\2024\04\浩辰\HCTools\HCTools\HCTools\obj\Debug\HCTools.DeleteElept.resource
24 24
 F:\2024\04\浩辰\HCTools\HCTools\HCTools\obj\Debug\HCTools.CutCountL.resources
25 25
 F:\2024\04\浩辰\HCTools\HCTools\HCTools\obj\Debug\HCTools.EleRd.resources
26 26
 F:\2024\04\浩辰\HCTools\HCTools\HCTools\obj\Debug\HCTools.csproj.AssemblyReference.cache
27
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\HCTools.dll.config
27 28
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\HCTools.dll
28 29
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\HCTools.pdb
30
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\NetTopologySuite.xml
31
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\System.Buffers.xml
32
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\System.Diagnostics.DiagnosticSource.xml
33
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\System.Memory.xml
34
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\System.Numerics.Vectors.xml
35
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
29 36
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.AttributeForm.resources
30 37
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.Chaginfos.resources
31 38
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.CheckL.resources
@@ -34,11 +41,14 @@ F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\D
34 41
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.DeleteElept.resources
35 42
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.DgxAnno.resources
36 43
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.DGXGeneral.resources
44
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.Dgxthrorvrd_Form.resources
37 45
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.EleptDensity.resources
38 46
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.EleRd.resources
47
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.GCDdelete_Form.resources
39 48
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.Hierak.resources
40 49
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.InstDOM.resources
41 50
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.Layerchange_Form.resources
51
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.OutputbyTK_Form.resources
42 52
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.PicPts.resources
43 53
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.PLError_Overlay.resources
44 54
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.Properties.Resources.resources
@@ -47,5 +57,12 @@ F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\D
47 57
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.TKInfo.resources
48 58
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.GenerateResource.cache
49 59
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.CoreCompileInputs.cache
60
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.Fody.CopyLocal.cache
61
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.Fody.RuntimeCopyLocal.cache
62
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.CopyComplete
50 63
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.dll
51 64
 F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.pdb
65
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.csproj.AssemblyReference.cache
66
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.ModifyTFH.resources
67
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.JQXlabel.resources
68
+F:\2024\08\加密后软件工具\CAD插件工具\源代码\HCTools\HCTools\obj\Debug\HCTools.InsertDOMs_to_one.resources

Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.csproj.GenerateResource.cache Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.dll Просмотреть файл


Двоичные данные
加密后软件工具/CAD插件工具/源代码/HCTools/HCTools/obj/Debug/HCTools.pdb Просмотреть файл


Загрузка…
Отмена
Сохранить