| | |
| | | xform1.eM12 = 0;
|
| | | xform1.eM21 = 0;
|
| | | xform1.eM22 = 1;
|
| | | xform1.eDx = -scroll1.x;
|
| | | xform1.eDy = -scroll1.y;
|
| | | xform1.eDx = float(-scroll1.x);
|
| | | xform1.eDy = float(-scroll1.y);
|
| | |
|
| | | XFORM xform2 = { 1, 0, 0, 1, 0, 0 };
|
| | |
|
| | |
| | | s1.Format(_T("LD db Clk %d %d %02X Scroll %d %d Total %d %d Row %d Col %d"),
|
| | | point.x, point.y, nFlags, scroll1.x, scroll1.y, tx, ty, nRow, nCol);
|
| | | m_pStatusBar->SetPaneText(6, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(6, RGB(255, 255, 0));
|
| | | m_pStatusBar->SetPaneTextColor(6, RGB(0, 0, 255));
|
| | | // m_pStatusBar->SetPaneBackgroundColor(6, RGB(255, 255, 0));
|
| | | // m_pStatusBar->SetPaneTextColor(6, RGB(0, 0, 255));
|
| | | // m_pStatusBar->EnablePaneProgressBar(6);
|
| | | // m_pStatusBar->SetPaneProgress(6, 5);
|
| | | SysLog(s1);
|
| | |
| | | Cells[m_FocusRow][j].bLeftLineDn = 1;
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | m_bModified = 1;
|
| | | needReDraw = 1;
|
| | | this->RedrawWindow();
|
| | | }
|
| | | int FindTypeIndex(CString str[], CString strType, int num)
|
| | | {
|
| | | for (int i = 0;i < num;i++)
|
| | | {
|
| | | if (strType == str[i])
|
| | | {
|
| | | return i;
|
| | | }
|
| | | }
|
| | | return -1;
|
| | | }
|
| | | void CMTerm2View::GetIncToView(stCell cell1) //**************************************************************************************************//
|
| | | {
|
| | |
|
| | |
|
| | | Cells[m_FocusRow][m_FocusCol] = cell1;
|
| | |
|
| | | m_bModified = 1;
|
| | | needReDraw = 1;
|
| | | m_FocusCol += 1;
|
| | | if (m_FocusCol >= 16) |
| | | { m_FocusCol = 0;m_FocusRow += 1; }
|
| | | |
| | | this->RedrawWindow();
|
| | | |
| | | }
|
| | | void CMTerm2View::OnUpdateInsertBlankLine(CCmdUI *pCmdUI)
|
| | | {
|
| | | // TODO: 在此添加命令更新用户界面处理程序代码
|
| | |
| | | if (!pDoc->m_bOnline) {
|
| | | s1 = _T("离线");
|
| | | m_pStatusBar->SetPaneText(idxOnline, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxOnline);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxOnline);
|
| | | }
|
| | | else if (pDoc->m_bOnline) {
|
| | | if (pDoc->m_bSimulate) {
|
| | | s1 = _T("在线(仿真)");
|
| | | m_pStatusBar->SetPaneText(2, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxOnline, OnlineColor);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxOnline, OnlineColor);
|
| | | }else{
|
| | | s1 = _T("在线");
|
| | | m_pStatusBar->SetPaneText(2, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxOnline, OnlineColor);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxOnline, OnlineColor);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | if (!pDoc->m_bOnline) {
|
| | | s1 = _T("");
|
| | | m_pStatusBar->SetPaneText(idxRunning, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxRunning);
|
| | | m_pStatusBar->SetPaneWidth(idxRunning, 0);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxRunning);
|
| | | // m_pStatusBar->SetPaneWidth(idxRunning, 0);
|
| | | m_pStatusBar->SetPaneStyle(idxRunning, SBPS_DISABLED);
|
| | |
|
| | | }else if (!pDoc->m_bPlcRunning) {
|
| | | s1 = _T("PROG");
|
| | | m_pStatusBar->SetPaneText(idxRunning, s1);
|
| | | m_pStatusBar->SetPaneWidth(idxRunning, s1.GetLength()*8);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxRunning, ProgColor);
|
| | | // m_pStatusBar->SetPaneWidth(idxRunning, s1.GetLength()*8);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxRunning, ProgColor);
|
| | | }else {
|
| | | s1 = _T("RUN");
|
| | | m_pStatusBar->SetPaneText(idxRunning, s1);
|
| | | m_pStatusBar->SetPaneWidth(idxRunning, s1.GetLength() * 8);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxRunning, RunningColor);
|
| | | // m_pStatusBar->SetPaneWidth(idxRunning, s1.GetLength() * 8);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxRunning, RunningColor);
|
| | | }
|
| | | }
|
| | | if (nIndex == idxMonitor || nIndex == -1) { // 监控 //
|
| | |
| | | if (!m_bMonitoring) {
|
| | | s1 = _T("[监控停止]");
|
| | | m_pStatusBar->SetPaneText(idxMonitor, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxMonitor);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxMonitor);
|
| | | }else{
|
| | | s1 = _T("[正在监控]");
|
| | | m_pStatusBar->SetPaneText(idxMonitor, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxMonitor, MonitorColor);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxMonitor, MonitorColor);
|
| | | }
|
| | | }
|
| | | if (nIndex == idxAddress || nIndex == -1) { // 地址,本站
|
| | |
| | | if (!pDoc->m_bOnline) {
|
| | | s1 = _T("本站");
|
| | | m_pStatusBar->SetPaneText(idxAddress, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxMonitor);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxMonitor);
|
| | | }else {
|
| | | s1 = _T("本站");
|
| | | m_pStatusBar->SetPaneText(idxAddress, s1);
|
| | | m_pStatusBar->SetPaneBackgroundColor(idxMonitor, AddressColor);
|
| | | // m_pStatusBar->SetPaneBackgroundColor(idxMonitor, AddressColor);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | if (pDoc->m_bPlcRunning) {
|
| | | s1 = _T("运行");
|
| | | m_pStatusBar->SetPaneText(3, s1);
|
| | | m_pStatusBar->SetPaneTextColor(3, RGB(0, 0, 0));
|
| | | // m_pStatusBar->SetPaneTextColor(3, RGB(0, 0, 0));
|
| | | }
|
| | | else {
|
| | | s1 = _T("停止");
|
| | | m_pStatusBar->SetPaneText(3, s1);
|
| | | m_pStatusBar->SetPaneTextColor(3, RGB(0, 0, 0));
|
| | | // m_pStatusBar->SetPaneTextColor(3, RGB(0, 0, 0));
|
| | | }
|
| | | s1.Format(_T("PCmdUI %d %d"), pCmdUI->m_nID, pCmdUI->m_nIndex);
|
| | | DbgLog(s1);
|
| | |
| | | Progsec += thisprogsec;
|
| | | }
|
| | | DbgLog(_T("\r\n")+ sProg);
|
| | | int n = Progsec.Progs.size();
|
| | | int n = int(Progsec.Progs.size());
|
| | | s1.Format(_T("progSec steps %d "), n);
|
| | | DbgLog(s1);
|
| | | for (int i = 0; i < n; i++) {
|
| | |
| | | allprogs += Progsec;
|
| | | }
|
| | | //输出程序
|
| | | int n=allprogs.Progs.size();
|
| | | int n=(int)allprogs.Progs.size();
|
| | | s1.Format(_T("all prog steps %d "), n);
|
| | | DbgLog(s1);
|
| | | for (int i = 0; i < n; i++) {
|
| | |
| | | OpTxt = OpTxtA;
|
| | | OpShowTxt = OpShowTxtA;
|
| | | s1.Format(_T("%d %s %s"), optype, OpTxt, OpShowTxt);
|
| | | DbgLog(s1);
|
| | | // DbgLog(s1);
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|