Parcourir la source

使用xml来存储命令。

jianfeng1.wang il y a 2 ans
Parent
commit
f2373b0cda

+ 1 - 1
TCLTools/TCLTools/TCLTools.cpp

@@ -52,7 +52,7 @@ BOOL CTCLToolsApp::InitInstance()
 
     g_tclCommand.SetInternalCMDParams(BIN_CMD);
     // 应该动态加载;
-    g_tclCommand.SetExternalCMDParams("cmds.dat");
+    g_tclCommand.SetExternalCMDParams("cmd.xml");
 
 	// 标准初始化
 	// 如果未使用这些功能并希望减小

+ 1 - 1
TCLTools/TCLTools/TCLTools.rc

@@ -183,7 +183,7 @@ END
 // BIN
 //
 
-BIN_CMD                 BIN                     "command.data"
+BIN_CMD                 BIN                     "cmd.xml"
 #endif    // ÖĞÎÄ(ÖĞ»ªÈËÃñ¹²ºÍ¹ú) resources
 /////////////////////////////////////////////////////////////////////////////
 

+ 29 - 1
TCLTools/TCLTools/TCLTools.vcproj

@@ -214,6 +214,26 @@
 				RelativePath=".\TCLToolsDlg.cpp"
 				>
 			</File>
+			<File
+				RelativePath=".\tinyxml2.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"
+					/>
+				</FileConfiguration>
+			</File>
 		</Filter>
 		<Filter
 			Name="Í·Îļþ"
@@ -228,6 +248,10 @@
 				RelativePath=".\stdafx.h"
 				>
 			</File>
+			<File
+				RelativePath=".\stdint.h"
+				>
+			</File>
 			<File
 				RelativePath=".\targetver.h"
 				>
@@ -240,6 +264,10 @@
 				RelativePath=".\TCLToolsDlg.h"
 				>
 			</File>
+			<File
+				RelativePath=".\tinyxml2.h"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="×ÊÔ´Îļþ"
@@ -312,7 +340,7 @@
 			</File>
 		</Filter>
 		<File
-			RelativePath=".\command.data"
+			RelativePath=".\cmd.xml"
 			>
 		</File>
 		<File

+ 1 - 1
TCLTools/TCLTools/TCLToolsDlg.cpp

@@ -420,7 +420,7 @@ void CTCLToolsDlg::OnCancel()
 void CTCLToolsDlg::OnBnClickedReloadCmd()
 {
     // ÖØÐ¼ÓÔØÍⲿÃüÁîÎļþ;
-    g_tclCommand.SetExternalCMDParams("cmds.dat");
+    g_tclCommand.SetExternalCMDParams("cmd.xml");
     InitCommandCombobox();
 }
 

+ 3 - 2
TCLTools/TCLTools/resource.h

@@ -4,7 +4,8 @@
 //
 #define IDD_TCLTOOLS_DIALOG             102
 #define IDR_MAINFRAME                   128
-#define BIN_CMD                         129
+#define IDR_BIN1                        131
+#define BIN_CMD                         131
 #define IDC_COMBO_PORTS                 1001
 #define IDC_COMBO_CMDS                  1002
 #define IDC_EDIT2                       1003
@@ -36,7 +37,7 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        131
+#define _APS_NEXT_RESOURCE_VALUE        132
 #define _APS_NEXT_COMMAND_VALUE         32771
 #define _APS_NEXT_CONTROL_VALUE         1017
 #define _APS_NEXT_SYMED_VALUE           101