From 0200a36062386b937567265e3ea01f93eaa8f1f5 Mon Sep 17 00:00:00 2001
From: QuakeGod <quakegod@sina.com>
Date: 星期五, 20 十月 2023 22:10:19 +0800
Subject: [PATCH] dev1

---
 MTerm1/Resource.h             |    5 +++--
 ConfigTool/ConfigTool.rc      |    0 
 MTerm1/MyFormInputShow.h      |    1 +
 MTerm1/MyFormInputShow.cpp    |   11 +++++++++++
 ConfigTool/ConfigToolView.cpp |    1 +
 KLink1/KLink1.rc              |    0 
 MTerm1/MTerm1.rc              |    0 
 KLink1/CDialogCommSet1.cpp    |    4 ++--
 MTerm1.sln                    |    3 +++
 9 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/ConfigTool/ConfigTool.rc b/ConfigTool/ConfigTool.rc
index 33d77cf..6e3dd68 100644
--- a/ConfigTool/ConfigTool.rc
+++ b/ConfigTool/ConfigTool.rc
Binary files differ
diff --git a/ConfigTool/ConfigToolView.cpp b/ConfigTool/ConfigToolView.cpp
index 7a11b2c..2fcde61 100644
--- a/ConfigTool/ConfigToolView.cpp
+++ b/ConfigTool/ConfigToolView.cpp
@@ -466,6 +466,7 @@
 	CString s1;
 	s1.Empty();
 	SetDlgItemText(IDC_EDIT_DEVICE_TYPE, s1);
+	SetDlgItemText(IDC_EDIT_DEVICE_NAME, s1);
 	SetDlgItemText(IDC_EDIT_FIRM_VER, s1);
 	SetDlgItemText(IDC_EDIT_KLINK_VER, s1);
 	SetDlgItemText(IDC_EDIT_KBUS_VER, s1);
diff --git a/KLink1/CDialogCommSet1.cpp b/KLink1/CDialogCommSet1.cpp
index ed90bee..fb57d19 100644
--- a/KLink1/CDialogCommSet1.cpp
+++ b/KLink1/CDialogCommSet1.cpp
@@ -101,11 +101,11 @@
 	for (int i = 1; i <= 16; i++)
 	{
 		s1.Format(_T("COM%d"), i);
-		if (get_com_name(s1, s2)) { s1 = s2; }
+		if (get_com_name(s1 + _T(")"), s2)) { s1 = s2; }
 		m_combo_comport.AddString(s1);
 	}
 	// sComSelStr = _T("COM3");
-	m_combo_comport.SelectString(0, sComSelStr);
+	// m_combo_comport.SelectString(0, sComSelStr);
 	// m_combo_comport.SetCurSel(2);
 	if (m_nComNum >0)
 		m_combo_comport.SetCurSel(m_nComNum - 1);
diff --git a/KLink1/KLink1.rc b/KLink1/KLink1.rc
index c800826..344222b 100644
--- a/KLink1/KLink1.rc
+++ b/KLink1/KLink1.rc
Binary files differ
diff --git a/MTerm1.sln b/MTerm1.sln
index 1ab7ff6..1f4f2f0 100644
--- a/MTerm1.sln
+++ b/MTerm1.sln
@@ -16,6 +16,9 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KLink3", "KLink3\KLink3.vcxproj", "{A9132770-20D8-423A-8F25-4B5F5B4459D3}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConfigTool", "ConfigTool\ConfigTool.vcxproj", "{E60A8A23-131E-49E5-B61E-C374C721ACBA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1F782E34-9087-4F87-9674-E4BDAA319726} = {1F782E34-9087-4F87-9674-E4BDAA319726}
+	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LCDDisplayTest", "LCDDisplay\LCDDisplay.vcxproj", "{C9541E40-C2A2-4200-85E4-A94F58084D27}"
 EndProject
diff --git a/MTerm1/MTerm1.rc b/MTerm1/MTerm1.rc
index 89a1c74..673cd8a 100644
--- a/MTerm1/MTerm1.rc
+++ b/MTerm1/MTerm1.rc
Binary files differ
diff --git a/MTerm1/MyFormInputShow.cpp b/MTerm1/MyFormInputShow.cpp
index a604166..b98e912 100644
--- a/MTerm1/MyFormInputShow.cpp
+++ b/MTerm1/MyFormInputShow.cpp
@@ -166,6 +166,7 @@
 
 
 	ON_WM_CHAR()
+	ON_COMMAND(ID_KEY_X, &CMyFormInputShow::OnKeyX)
 END_MESSAGE_MAP()
 
 
@@ -3412,3 +3413,13 @@
 	if (nChar == 13) { OnBtnRet(); }
 	CFormView::OnChar(nChar, nRepCnt, nFlags);
 }
+
+
+void CMyFormInputShow::OnKeyX()
+{
+	// TODO: 在此添加命令处理程序代码
+	CMainFrame* p1 = (CMainFrame*)AfxGetMainWnd();
+	p1->GetInputInfo(0x00020001);
+
+	SetDisplay(0x00020001);
+}
diff --git a/MTerm1/MyFormInputShow.h b/MTerm1/MyFormInputShow.h
index 5680a86..b5e49bd 100644
--- a/MTerm1/MyFormInputShow.h
+++ b/MTerm1/MyFormInputShow.h
@@ -237,6 +237,7 @@
 
 
 	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
+	afx_msg void OnKeyX();
 };
 
 
diff --git a/MTerm1/Resource.h b/MTerm1/Resource.h
index 483b541..1a7a37d 100644
--- a/MTerm1/Resource.h
+++ b/MTerm1/Resource.h
@@ -645,6 +645,7 @@
 #define ID_SHOW_LOG                     33092
 #define ID_33093                        33093
 #define ID_MENU_SHOWNAV                 33094
+#define ID_KEY_X                        33095
 #define IDS_STRING101                   33101
 #define ID_INDICATOR_SEL_TYPE           59135
 #define ID_INDICATOR_MACHINE_TYPE       59142
@@ -659,8 +660,8 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        359
-#define _APS_NEXT_COMMAND_VALUE         33095
+#define _APS_NEXT_RESOURCE_VALUE        360
+#define _APS_NEXT_COMMAND_VALUE         33097
 #define _APS_NEXT_CONTROL_VALUE         1087
 #define _APS_NEXT_SYMED_VALUE           319
 #endif

--
Gitblit v1.9.1