From 78e91efc666606328e3fc63fbd54eb2da4442799 Mon Sep 17 00:00:00 2001
From: QuakeGod <quakegod@sina.com>
Date: 星期二, 12 九月 2023 20:07:08 +0800
Subject: [PATCH] update mterm1doc.h with comment

---
 MTerm1/MainFrm.cpp |  265 ++++++++++------------------------------------------
 1 files changed, 51 insertions(+), 214 deletions(-)

diff --git a/MTerm1/MainFrm.cpp b/MTerm1/MainFrm.cpp
index 176f4fa..bdd1f4b 100644
--- a/MTerm1/MainFrm.cpp
+++ b/MTerm1/MainFrm.cpp
@@ -37,34 +37,14 @@
 	ON_UPDATE_COMMAND_UI(ID_VIEW_INPUTSEG_BAR, &CMainFrame::OnUpdateViewInputsegBar)
 	ON_COMMAND(ID_VIEW_COMMENTS_BAR, &CMainFrame::OnViewCommentsBar)
 	ON_UPDATE_COMMAND_UI(ID_VIEW_COMMENTS_BAR, &CMainFrame::OnUpdateViewCommentsBar)
-	ON_COMMAND(ID_BUTTON_0, &CMainFrame::OnBtn0)
-	ON_COMMAND(ID_BUTTON_1, &CMainFrame::OnBtn1)
-	ON_COMMAND(ID_BUTTON_2, &CMainFrame::OnBtn2)
-	ON_COMMAND(ID_BUTTON_3, &CMainFrame::OnBtn3)
-	ON_COMMAND(ID_BUTTON_4, &CMainFrame::OnBtn4)
-	ON_COMMAND(ID_BUTTON_5, &CMainFrame::OnBtn5)
-	ON_COMMAND(ID_BUTTON_6, &CMainFrame::OnBtn6)
-	ON_COMMAND(ID_BUTTON_7, &CMainFrame::OnBtn7)
-	ON_COMMAND(ID_BUTTON_8, &CMainFrame::OnBtn8)
-	ON_COMMAND(ID_BUTTON_9, &CMainFrame::OnBtn9)
-	ON_COMMAND(ID_BUTTON_A, &CMainFrame::OnBtnA)
-	ON_COMMAND(ID_BUTTON_B, &CMainFrame::OnBtnB)
-	ON_COMMAND(ID_BUTTON_C, &CMainFrame::OnBtnC)
-	ON_COMMAND(ID_BUTTON_D, &CMainFrame::OnBtnD)
-	ON_COMMAND(ID_BUTTON_E, &CMainFrame::OnBtnE)
-	ON_COMMAND(ID_BUTTON_F, &CMainFrame::OnBtnF)
-	ON_COMMAND(ID_BUTTON_MINUS, &CMainFrame::OnBtnMinus)
-	ON_COMMAND(ID_BUTTON_DOT, &CMainFrame::OnBtnDot)
-	ON_COMMAND(ID_BUTTON_RET, &CMainFrame::OnBtnRet)
-	ON_COMMAND(ID_BUTTON_INSERT, &CMainFrame::OnBtnInsert)
-	ON_COMMAND(ID_BUTTON_DELETE, &CMainFrame::OnBtnDelete)
-	ON_COMMAND(ID_BUTTON_ESC, &CMainFrame::OnBtnEsc)
+
 //	ON_COMMAND(ID_MENU_VIEW_LDS, &CMainFrame::OnMenuViewLds)
 //	ON_COMMAND(ID_MENU_VIEW_BLD, &CMainFrame::OnMenuViewBld)
 //	ON_COMMAND(ID_MENU_VIEW_BNL, &CMainFrame::OnMenuViewBnl)
 
 ON_COMMAND(ID_MENU_SHOW_LOG, &CMainFrame::OnMenuShowLog)
 ON_COMMAND(ID_MENU_SHOW_DEV, &CMainFrame::OnMenuShowDev)
+ON_COMMAND(ID_MENU_SHOWNAV, &CMainFrame::OnMenuShownav)
 END_MESSAGE_MAP()
 
 static UINT indicators[] =
@@ -233,6 +213,17 @@
 		return FALSE;
 	}
 	m_wndMyPaneLog.EnableDocking(CBRS_ALIGN_ANY);
+//*/
+// // 
+///*
+	
+	if (!m_wndMyPaneInputShow.Create(_T("杈撳叆绐楀彛"), this, CRect(2, 2, 20, 20), TRUE, 1236, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
+		| WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
+	{
+		TRACE0("鏈兘鍒涘缓鈥淢yPaneInputShow绐楀彛\n");
+		return FALSE;
+	}
+	m_wndMyPaneInputShow.EnableDocking(CBRS_ALIGN_BOTTOM);
 
 //*/
 //	m_dlgMyLog.Create(m_dlgMyLog.IDD, this);
@@ -270,9 +261,11 @@
 //	DockPane(&m_wndToolBar_Func_Key);
 //	DockPane(&m_wndDlgBar_Func_Key);
 //	DockControlBar(&m_wndDlgBar_Func_Key);
+	DockPane(&m_wndMyPaneInputShow);
 	DockPane(&m_wndNavView);
 	DockPane(&m_wndMyPaneLog);
 
+//	m_wndMyPaneInputShow.m_pMyFormInputShow->SetBtnDisplayESC(1);
 
 //*/
 	return 0;
@@ -433,206 +426,44 @@
 	s1.Format(_T("From MainFrame , input %s"), m_InputInfo);
 	SysLog(s1);
 
+	//	m_wndDlgBar_InputShow.SetDisplay(inputInfo);
+
+	return 0;
+}
+
+int CMainFrame::SetDisplayInfo(int Info)
+{
+	// TODO: 鍦ㄦ澶勬坊鍔犲疄鐜颁唬鐮�.
+	CString        m_InputInfo;
+
+	CString s1;
+	s1.Format(_T("From MainFrame , SetDisplayInfo %x"), Info);
+	SysLog(s1);
+
+	//	m_wndDlgBar_InputShow.SetDisplay(inputInfo);
+	m_wndMyPaneInputShow.m_pMyFormInputShow->SetDisplay(Info);
+	return 0;
+}
+
+int CMainFrame::SetCellInfo(int info)
+{
+	// TODO: 鍦ㄦ澶勬坊鍔犲疄鐜颁唬鐮�.
+	CString        m_InputInfo;
+
+	CString s1;
+	s1.Format(_T("From MainFrame , SetCellInfo %x"), info);
+	SysLog(s1);
+
 //	m_wndDlgBar_InputShow.SetDisplay(inputInfo);
 
 	return 0;
 }
 
-void CMainFrame::OnBtn0()
+int CMainFrame::GetInputCell(tagInputCell inputCell)
 {
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030000);
-}
-void CMainFrame::OnBtn1()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030001);
-}
-void CMainFrame::OnBtn2()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030002);
-}
-void CMainFrame::OnBtn3()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030003);
-}
-void CMainFrame::OnBtn4()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030004);
-}
-void CMainFrame::OnBtn5()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030005);
-}
-void CMainFrame::OnBtn6()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030006);
-}
-void CMainFrame::OnBtn7()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030007);
-}
-void CMainFrame::OnBtn8()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030008);
-}
-void CMainFrame::OnBtn9()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00030009);
-}
-void CMainFrame::OnBtnA()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x0003000A);
-}
-void CMainFrame::OnBtnB()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x0003000B);
-}
-void CMainFrame::OnBtnC()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x0003000C);
-}
 
-void CMainFrame::OnBtnD()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x0003000D);
-}
-void CMainFrame::OnBtnE()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x0003000E);
-}
-void CMainFrame::OnBtnF()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-
-//	m_wndDlgBar_InputShow.SetDisplay(0x0003000F);
-
-
-
-}
-void CMainFrame::OnBtnMinus()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-	//m_wndDlgBar_InputShow.SetDisplay(_T("-"));
-}
-void CMainFrame::OnBtnDot()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-	//m_wndDlgBar_InputShow.SetDisplay(_T("."));
-}
-
-
-
-
-int CMainFrame::GetInputCell(CMyDlgBarInputShow::tagInputCell inputCell)
-{
-	
-	localInputCell = inputCell;
+	//	localInputCell = inputCell;
 	return 0;
-}
-
-
-void CMainFrame::OnBtnRet()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-	CString strName;
-	 CMTerm1View::stCell cell1;
-
-	CMDIChildWnd  *pChild = (CMDIChildWnd   *)GetActiveFrame();
-	CView   *p1 = (CView*)pChild->GetActiveView();
-	if (p1 == NULL) return;
-	CMTerm1View * p2 = (CMTerm1View *)p1;
-//	m_wndDlgBar_InputShow.SetDisplay(0x00140000);
-
-	switch (localInputCell.OP)
-	{
-	case CMTerm1View::typeNO:
-	case CMTerm1View::typeNC:
-	case CMTerm1View::typeOUT:
-	case CMTerm1View::typeSET:
-	case CMTerm1View::typeRESET:
-	case CMTerm1View::typeTM:
-		switch (localInputCell.param)
-		{
-		case KLCoilTypeX:
-			strName = "X";
-			break;
-		case KLCoilTypeY:
-			strName = "Y";
-			break;
-		case KLCoilTypeR:
-			strName = "R";
-			break;
-		case KLCoilTypeLR:
-			strName = "L";
-			break;
-		case KLCoilTypeT:
-			strName = "T";
-			break;
-		case KLCoilTypeC:
-			strName = "C";
-			break;
-		case OP_TMX:
-			strName = "TMX   ";
-		case OP_TMY:
-			strName = "TMY   ";
-		case OP_TMR:
-			strName = "TMR   ";
-		case OP_TML:
-			strName = "TML   ";
-		default:
-			break;
-		}
-	default:
-		break;		
-	}
-
-
-
-	cell1.sCoilName = strName + localInputCell.num;
-	cell1.nType = localInputCell.OP;
-	//cell1.sCoilName = "R555";
-	cell1.nProgStep = 0;
-	cell1.bEditing = 1;
-	cell1.sParam = "D88";
-	cell1.bLeftLineUp = 0;
-	cell1.nDataType = CMTerm1View::typeCoil;
-
-	p2->GetIncToView(cell1);   
-
-	
-//	m_wndDlgBar_Func_Key.SetBtnDisplayESC();
-}
-void CMainFrame::OnBtnInsert()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00240000);
-//	m_wndDlgBar_Func_Key.SetBtnDisplayESC();
-}
-void CMainFrame::OnBtnDelete()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-//	m_wndDlgBar_InputShow.SetDisplay(0x00340000);
-//	m_wndDlgBar_Func_Key.SetBtnDisplayESC();
-}
-void CMainFrame::OnBtnEsc()
-{
-	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
-	//m_wndDlgBar_InputShow.SetDisplay(_T("Esc"));
-//	m_wndDlgBar_Func_Key.SetBtnDisplayESC();
 }
 
 void CMainFrame::OnMenuShowDev()
@@ -640,3 +471,9 @@
 	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
 
 }
+
+void CMainFrame::OnMenuShownav()
+{
+	// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
+	m_wndNavView.ShowWindow(SW_SHOW);
+}

--
Gitblit v1.9.1