void WIDGET_HOTKEY_LIST::OnMenu( wxCommandEvent& aEvent ) { switch( aEvent.GetId() ) { case ID_EDIT: EditItem( m_context_menu_item ); break; case ID_RESET: ResetItem( m_context_menu_item ); break; case ID_DEFAULT: ResetItemToDefault( m_context_menu_item ); break; case ID_RESET_ALL: ResetAllHotkeys( false ); break; case ID_DEFAULT_ALL: ResetAllHotkeys( true ); break; default: wxFAIL_MSG( wxT( "Unknown ID in context menu event" ) ); } }
ICCItem::ICCItem (IObjectClass *pClass) : CObject(pClass) // ICCItem constructor { ResetItem(); }
void CComplexSymbolLayerCtrl::OnNMClick(NMHDR *pNMHDR, LRESULT *pResult) { UINT uFlags = 0; LPNMITEMACTIVATE phdr = reinterpret_cast< LPNMITEMACTIVATE >( pNMHDR ); POINT point; bool bSet; point.x=phdr->ptAction.x; point.y=phdr->ptAction.y; if( phdr->iItem!=-1 ) { ResetItem( m_nSelect ); if( m_nSelect==phdr->iItem ) bSet = false; else bSet = true; m_nSelect = phdr->iItem; CRect rect; this->GetItemRect( m_nSelect , rect , LVIR_ICON ); if ( point.x < rect.left) { CheckItem( phdr->iItem ); m_IComplexSymbolLayerCtrl->SetCopySymbol(); } else { CheckItemEx( phdr->iItem ); } if(bSet) m_IComplexSymbolLayerCtrl->SetPropList( phdr->iItem ); ::SendMessage(GetParent()->m_hWnd , WM_REPAINTLEGEND , 0L , 0L ); } }
void WIDGET_HOTKEY_LIST::OnMenu( wxCommandEvent& aEvent ) { switch( aEvent.GetId() ) { case ID_EDIT: EditItem( m_context_menu_item ); break; case ID_RESET: ResetItem( m_context_menu_item ); break; case ID_DEFAULT: ResetItemToDefault( m_context_menu_item ); break; case ID_RESET_ALL: TransferDataToControl(); break; case ID_DEFAULT_ALL: TransferDefaultsToControl(); break; default: wxFAIL_MSG( wxT( "Unknown ID in context menu event" ) ); } }
bool CXTBackForth::Start(void) { if (0 == m_nThreadId) { m_nCurLeftPos = 0; m_bToRight = true; m_bLeftOk = false; m_bRightOk = false; for (int i = 0; i < m_nAllItemCount; i++) ResetItem(i); SetItem(0, LEFT); SetItem(m_nItemCount - 1, RIGHT); for (int i = 1; i < m_nItemCount - 1; i++) SetItem(i, MED); if (0 != m_nThreadId) return false; HANDLE hThread = (HANDLE)_beginthreadex(NULL, 0, DrawProgressThread, this, 0, &m_nThreadId); if (NULL == hThread) { TRACE(" CXTProgressBackForth::Start _beginthreadex Error\n"); return false; } } return true; }
void CXTBackForth::DrawDefaultImage(void) { if (m_bToRight) { int nLastPos = m_nCurLeftPos - 1; if (nLastPos >= 0) ResetItem(nLastPos); SetItem(m_nCurLeftPos, LEFT); SetItem(m_nCurLeftPos + m_nItemCount - 2, MED); SetItem(m_nCurLeftPos + m_nItemCount - 1, RIGHT); if ((++m_nCurLeftPos) > (m_nAllItemCount - m_nItemCount)) { m_nCurLeftPos--; m_bToRight = false; } } else { int nLastPos = m_nCurLeftPos + m_nItemCount; if (nLastPos < m_nAllItemCount) ResetItem(nLastPos); SetItem(m_nCurLeftPos, LEFT); SetItem(m_nCurLeftPos + 1, MED); SetItem(m_nCurLeftPos + m_nItemCount - 1, RIGHT); if ((--m_nCurLeftPos) < 0) { m_nCurLeftPos = 0; m_bToRight = true; } } m_nCurRightPos = m_nCurLeftPos + m_nItemCount - 1; }
// all param in // nAllItemCount 整个进度条上小块的数量 // nItemCount 行走的小块数量 // nItemcx 小块宽 // nItemcy 小块高 // nInterval 块间隔 bool CXTBackForth::Initial(int x, int y, int nAllItemCount, int nItemCount, int nItemcx, int nItemcy, int nInterval, int sx, int sy, CXTDC *pDBuffDC) { if (pDBuffDC == NULL) return false; m_hDC = pDBuffDC->GetHDC(WNDDC, 0); m_hCompDC = pDBuffDC->GetHDC(COMPDC, 0); m_hBmpDC = pDBuffDC->GetHDC(IMAGEDC, 0); m_ItemSz.cx = nItemcx; m_ItemSz.cy = nItemcy; m_Pt.x = x; m_Pt.y = y; m_SrcLeftPt.x = sx; m_SrcLeftPt.y = sy; m_SrcMedPt.x = m_SrcLeftPt.x + m_ItemSz.cx + nInterval; m_SrcMedPt.y = sy; m_SrcRightPt.x = m_SrcMedPt.x + m_ItemSz.cx + nInterval; m_SrcRightPt.y = sy; m_BckLeftPt.x = m_SrcRightPt.x + m_ItemSz.cx + nInterval; m_BckLeftPt.y = sy; m_BckMedPt.x = m_BckLeftPt.x + m_ItemSz.cx + nInterval; m_BckMedPt.y = sy; m_BckRightPt.x = m_BckMedPt.x + m_ItemSz.cx + nInterval; m_BckRightPt.y = sy; m_nAllItemCount = nAllItemCount; m_nItemCount = nItemCount; m_nInterval = nInterval; m_nCurLeftPos = 0; m_bToRight = true; for (int i = 0; i < m_nAllItemCount; i++) ResetItem(i); return true; }
void CJSRModParam::OnModparamsReset() { // TRACE("CJSRModParam::OnModparamsReset\n"); if (m_pPS)m_pPS->SetToClose(0); m_bDataSetup = true; if (!m_bCollectingParametersForNewISO) { GetDlgItem(IDC_JSRMODPARAMS_PORT)->EnableWindow(FALSE); GetDlgItem(IDC_JSRMODPARAMS_NODE)->EnableWindow(FALSE); } ResetItem(m_pParent->m_pName,FILE_ID, FILEID_SPIN_DEF, IDC_JSRMODPARAMS_FILEID_SPIN,IDC_JSRMODPARAMS_FILEID); ResetItem(m_pParent->m_pName,"SLOW_RESET",SLOW_RESET_SPIN_DEF, IDC_JSRMODPARAMS_SLOW_RESET_SPIN,SLOW_RESET_SPIN_MIN,SLOW_RESET_SPIN_MAX); ResetItem(m_pParent->m_pName,"COMMFAIL",MAX_TIMEOUT_SPIN_DEF, IDC_JSRMODPARAMS_MAX_TIMEOUT_SPIN,MAX_TIMEOUT_SPIN_MIN,MAX_TIMEOUT_SPIN_MAX); ResetItem(m_pParent->m_pName, NODE ,NODE_SPIN_DEF, IDC_JSRMODPARAMS_NODE_SPIN,NODE_SPIN_MIN,NODE_SPIN_MAX); ResetItem(m_pParent->m_pName,"MAXCYCLE",MAXCYCLE_SPIN_DEF, IDC_JSRMODPARAMS_MAXCYCLE_SPIN,MAXCYCLE_SPIN_MIN,MAXCYCLE_SPIN_MAX); ResetItem(m_pParent->m_pName,"DO_DUMP", DODUMP_DEF, IDC_JSRMODPARAMS_DODUMP); ResetItem(m_pParent->m_pName,"LOG_FILTER", LOGFILTER_DEF, IDC_JSRMODPARAMS_LOGFILTER); // ResetItem(m_pParent->m_pName,"LOG_MII", LOGMII_DEF, IDC_JSRMODPARAMS_LOGMII); ResetItem(m_pParent->m_pName,SAVE_LOC, SAVELOC_DEF, IDC_JSRMODPARAMS_SAVELOC); char buff[16384]; char buff2[64]; if (GetPrivateProfileSection(COMMUNICATIONS,buff, sizeof(buff), m_pParent->m_szIniFile)>0) { char *at = buff; ((CComboBox*)GetDlgItem(IDC_JSRMODPARAMS_PORT))->ResetContent(); while (strlen(at) > 0) { strcpy(buff2,at); strtok(buff2,"="); ((CComboBox*)GetDlgItem(IDC_JSRMODPARAMS_PORT))->AddString(buff2); at = at + strlen(at)+1; } ((CComboBox*)GetDlgItem(IDC_JSRMODPARAMS_PORT))->SetCurSel(0); } ResetItem(m_pParent->m_pName,PORT, PORT_DEF, IDC_JSRMODPARAMS_PORT); ResetItemI(m_pParent->m_pName,MAXPAUSE, MAXPAUSE_SPIN_DEF, IDC_JSRMODPARAMS_MAXPAUSE_SPIN, MAXPAUSE_SPIN_MIN, MAXPAUSE_SPIN_MAX, IDC_JSRMODPARAMS_MAXPAUSE); ResetItemI(m_pParent->m_pName,"HIGHVOLTH",HIGHVOLTH_SPIN_DEF, IDC_JSRMODPARAMS_HIGHVOLTH_SPIN,HIGHVOLTH_SPIN_MIN,HIGHVOLTH_SPIN_MAX, IDC_JSRMODPARAMS_HIGHVOLTH); ResetItemI(m_pParent->m_pName,"HIGHVOLTL",HIGHVOLTL_SPIN_DEF, IDC_JSRMODPARAMS_HIGHVOLTL_SPIN,HIGHVOLTL_SPIN_MIN,HIGHVOLTL_SPIN_MAX, IDC_JSRMODPARAMS_HIGHVOLTL); ResetItem(m_pParent->m_pName,"REALSTHRESH", REALSTHRESH_SPIN_DEF, IDC_JSRMODPARAMS_REALSTHRESH_SPIN, REALSTHRESH_SPIN_MIN, REALSTHRESH_SPIN_MAX); ResetItem(m_pParent->m_pName,"TOTALSTHRESH", TOTALSTHRESH_SPIN_DEF, IDC_JSRMODPARAMS_TOTALSTHRESH_SPIN, TOTALSTHRESH_SPIN_MIN, TOTALSTHRESH_SPIN_MAX); ResetItem(m_pParent->m_pName,"TOTALS1THRESH", TOTALS1THRESH_SPIN_DEF, IDC_JSRMODPARAMS_TOTALS1THRESH_SPIN, TOTALS1THRESH_SPIN_MIN, TOTALS1THRESH_SPIN_MAX); ResetItem(m_pParent->m_pName,"TOTALSLOWTHRESH", TOTALSLTHRESH_SPIN_DEF, IDC_JSRMODPARAMS_TOTALSLTHRESH_SPIN, TOTALSLTHRESH_SPIN_MIN, TOTALSLTHRESH_SPIN_MAX); ResetItem(m_pParent->m_pName,"SIGMATHRESH", SIGMATHRESH_SPIN_DEF, IDC_JSRMODPARAMS_SIGMATHRESH_SPIN, SIGMATHRESH_SPIN_MIN, SIGMATHRESH_SPIN_MAX); ResetItem(m_pParent->m_pName,"GATEWIDTH", GATEWIDTH_SPIN_DEF, IDC_JSRMODPARAMS_GATEWIDTH_SPIN, GATEWIDTH_SPIN_MIN, GATEWIDTH_SPIN_MAX); ResetItem(m_pParent->m_pName,"HIGHV", HIGHV_SPIN_DEF, IDC_JSRMODPARAMS_HIGHV_SPIN, HIGHV_SPIN_MIN, HIGHV_SPIN_MAX); ResetItem(m_pParent->m_pName,"MAXCOMPRESS", MAXCOMPRESS_SPIN_DEF, IDC_JSRMODPARAMS_MAXCOMPRESS_SPIN, MAXCOMPRESS_SPIN_MIN, MAXCOMPRESS_SPIN_MAX); ResetItemI(m_pParent->m_pName,"COUNTTIMEUNIT", CT_UNITS_SPIN_DEF, IDC_JSRMODPARAMS_CT_UNITS_SPIN, CT_UNITS_SPIN_MIN, CT_UNITS_SPIN_MAX, IDC_JSRMODPARAMS_CT_UNITS); ResetItemI(m_pParent->m_pName,"COUNTTIMEEXP", CT_EXP_SPIN_DEF, IDC_JSRMODPARAMS_CT_EXP_SPIN, CT_EXP_SPIN_MIN, CT_EXP_SPIN_MAX, IDC_JSRMODPARAMS_CT_EXP); ResetItemL(m_pParent->m_pName,"PREDELAY", PREDELAY_DEF, IDC_JSRMODPARAMS_PREDELAY); m_bChange = false; if (m_pApplyButton) m_pApplyButton->EnableWindow(FALSE); }
void CJSRModParam::OnModparamsDefault(bool SetPort) { if (m_pPS)m_pPS->SetToClose(0); m_bDataSetup = true; ResetItem(JSR_DEFAULT, FILE_ID, FILEID_SPIN_DEF, IDC_JSRMODPARAMS_FILEID_SPIN, IDC_JSRMODPARAMS_FILEID); ResetItem(JSR_DEFAULT,"SLOW_RESET",SLOW_RESET_SPIN_DEF, IDC_JSRMODPARAMS_SLOW_RESET_SPIN,SLOW_RESET_SPIN_MIN,SLOW_RESET_SPIN_MAX); ResetItem(JSR_DEFAULT,"COMMFAIL",MAX_TIMEOUT_SPIN_DEF, IDC_JSRMODPARAMS_MAX_TIMEOUT_SPIN,MAX_TIMEOUT_SPIN_MIN,MAX_TIMEOUT_SPIN_MAX); ResetItem(JSR_DEFAULT,"MAXCYCLE",MAXCYCLE_SPIN_DEF, IDC_JSRMODPARAMS_MAXCYCLE_SPIN,MAXCYCLE_SPIN_MIN,MAXCYCLE_SPIN_MAX); ResetItem(JSR_DEFAULT,"DO_DUMP",DODUMP_DEF,IDC_JSRMODPARAMS_DODUMP); ResetItem(JSR_DEFAULT,"LOG_FILTER",LOGFILTER_DEF,IDC_JSRMODPARAMS_LOGFILTER); ResetItem(JSR_DEFAULT,SAVE_LOC,SAVELOC_DEF,IDC_JSRMODPARAMS_SAVELOC); if (SetPort || m_bCollectingParametersForNewISO) { ResetItem(JSR_DEFAULT,"NODE",NODE_SPIN_DEF, IDC_JSRMODPARAMS_NODE_SPIN,NODE_SPIN_MIN,NODE_SPIN_MAX); char buff[16384]; char buff2[32]; if (GetPrivateProfileSection(COMMUNICATIONS,buff, sizeof(buff), m_pParent->m_szIniFile)>0) { char *at = buff; ((CComboBox*)GetDlgItem(IDC_JSRMODPARAMS_PORT))->ResetContent(); while (strlen(at) > 0) { strcpy(buff2,at); strtok(buff2,"="); ((CComboBox*)GetDlgItem(IDC_JSRMODPARAMS_PORT))->AddString(buff2); at = at + strlen(at)+1; } } ((CComboBox*)GetDlgItem(IDC_JSRMODPARAMS_PORT))->SetCurSel(0); ResetItem(JSR_DEFAULT,PORT,PORT_DEF,IDC_JSRMODPARAMS_PORT); } ResetItemI(JSR_DEFAULT,"MAXPAUSE",MAXPAUSE_SPIN_DEF, IDC_JSRMODPARAMS_MAXPAUSE_SPIN,MAXPAUSE_SPIN_MIN,MAXPAUSE_SPIN_MAX, IDC_JSRMODPARAMS_MAXPAUSE); ResetItemI(JSR_DEFAULT,"HIGHVOLTH",HIGHVOLTH_SPIN_DEF, IDC_JSRMODPARAMS_HIGHVOLTH_SPIN,HIGHVOLTH_SPIN_MIN,HIGHVOLTH_SPIN_MAX, IDC_JSRMODPARAMS_HIGHVOLTH); ResetItemI(JSR_DEFAULT,"HIGHVOLTL",HIGHVOLTL_SPIN_DEF, IDC_JSRMODPARAMS_HIGHVOLTL_SPIN,HIGHVOLTL_SPIN_MIN,HIGHVOLTL_SPIN_MAX, IDC_JSRMODPARAMS_HIGHVOLTL); ResetItem(JSR_DEFAULT,"REALSTHRESH", REALSTHRESH_SPIN_DEF, IDC_JSRMODPARAMS_REALSTHRESH_SPIN, REALSTHRESH_SPIN_MIN, REALSTHRESH_SPIN_MAX); ResetItem(JSR_DEFAULT,"TOTALSTHRESH", TOTALSTHRESH_SPIN_DEF, IDC_JSRMODPARAMS_TOTALSTHRESH_SPIN, TOTALSTHRESH_SPIN_MIN, TOTALSTHRESH_SPIN_MAX); ResetItem(JSR_DEFAULT,"TOTALS1THRESH", TOTALS1THRESH_SPIN_DEF, IDC_JSRMODPARAMS_TOTALS1THRESH_SPIN, TOTALS1THRESH_SPIN_MIN, TOTALS1THRESH_SPIN_MAX); ResetItem(JSR_DEFAULT,"TOTALSLOWTHRESH", TOTALSLTHRESH_SPIN_DEF, IDC_JSRMODPARAMS_TOTALSLTHRESH_SPIN, TOTALSLTHRESH_SPIN_MIN, TOTALSLTHRESH_SPIN_MAX); ResetItem(JSR_DEFAULT,"SIGMATHRESH", SIGMATHRESH_SPIN_DEF, IDC_JSRMODPARAMS_SIGMATHRESH_SPIN, SIGMATHRESH_SPIN_MIN, SIGMATHRESH_SPIN_MAX); ResetItem(JSR_DEFAULT,"GATEWIDTH", GATEWIDTH_SPIN_DEF, IDC_JSRMODPARAMS_GATEWIDTH_SPIN, GATEWIDTH_SPIN_MIN, GATEWIDTH_SPIN_MAX); ResetItem(JSR_DEFAULT,"HIGHV", HIGHV_SPIN_DEF, IDC_JSRMODPARAMS_HIGHV_SPIN, HIGHV_SPIN_MIN, HIGHV_SPIN_MAX); ResetItem(JSR_DEFAULT,"MAXCOMPRESS", MAXCOMPRESS_SPIN_DEF, IDC_JSRMODPARAMS_MAXCOMPRESS_SPIN, MAXCOMPRESS_SPIN_MIN, MAXCOMPRESS_SPIN_MAX); ResetItemI(JSR_DEFAULT,"COUNTTIMEUNIT", CT_UNITS_SPIN_DEF, IDC_JSRMODPARAMS_CT_UNITS_SPIN, CT_UNITS_SPIN_MIN, CT_UNITS_SPIN_MAX, IDC_JSRMODPARAMS_CT_UNITS); ResetItemI(JSR_DEFAULT,"COUNTTIMEEXP", CT_EXP_SPIN_DEF, IDC_JSRMODPARAMS_CT_EXP_SPIN, HIGHVOLTL_SPIN_MIN, HIGHVOLTL_SPIN_MAX, IDC_JSRMODPARAMS_CT_EXP); ResetItemL(JSR_DEFAULT,"PREDELAY", PREDELAY_DEF, IDC_JSRMODPARAMS_PREDELAY); }
void CMCAModParam::OnModparamsDefault(bool SetPort) { if(m_pPS)m_pPS->SetToClose(0); m_datasetup = true; ResetItem(MCA_DEFAULT, FILE_ID, FILEID_SPIN_DEF, IDC_MODPARAMS_FILEID_SPIN, IDC_MODPARAMS_FILEID); ResetItem(MCA_DEFAULT, "BATVOLTH", BATVOLTH_SPIN_DEF, IDC_MODPARAMS_BATVOLTH_SPIN, BATVOLTH_SPIN_MIN, BATVOLTH_SPIN_MAX, IDC_MODPARAMS_BATVOLTH); ResetItem(MCA_DEFAULT, "BATVOLTL", BATVOLTL_SPIN_DEF, IDC_MODPARAMS_BATVOLTL_SPIN, BATVOLTL_SPIN_MIN, BATVOLTL_SPIN_MAX, IDC_MODPARAMS_BATVOLTL); ResetItem(MCA_DEFAULT,"SUP_P15H",SUP_P15H_SPIN_DEF, IDC_MODPARAMS_SUP_P15H_SPIN,SUP_P15H_SPIN_MIN,SUP_P15H_SPIN_MAX, IDC_MODPARAMS_SUP_P15H); ResetItem(MCA_DEFAULT,"SUP_P15L",SUP_P15L_SPIN_DEF, IDC_MODPARAMS_SUP_P15L_SPIN,SUP_P15L_SPIN_MIN,SUP_P15L_SPIN_MAX, IDC_MODPARAMS_SUP_P15L); ResetItem(MCA_DEFAULT,"SUP_M15H",SUP_M15H_SPIN_DEF, IDC_MODPARAMS_SUP_M15H_SPIN,SUP_M15H_SPIN_MIN,SUP_M15H_SPIN_MAX, IDC_MODPARAMS_SUP_M15H); ResetItem(MCA_DEFAULT,"SUP_M15L",SUP_M15L_SPIN_DEF, IDC_MODPARAMS_SUP_M15L_SPIN,SUP_M15L_SPIN_MIN,SUP_M15L_SPIN_MAX, IDC_MODPARAMS_SUP_M15L); ResetItem(MCA_DEFAULT,"SUP_P05H",SUP_P05H_SPIN_DEF, IDC_MODPARAMS_SUP_P05H_SPIN,SUP_P05H_SPIN_MIN,SUP_P05H_SPIN_MAX, IDC_MODPARAMS_SUP_P05H); ResetItem(MCA_DEFAULT,"SUP_P05L",SUP_P05L_SPIN_DEF, IDC_MODPARAMS_SUP_P05L_SPIN,SUP_P05L_SPIN_MIN,SUP_P05L_SPIN_MAX, IDC_MODPARAMS_SUP_P05L); ResetItem(MCA_DEFAULT,"TIME_ERR",TIME_ERR_SPIN_DEF, IDC_MODPARAMS_TIME_ERR_SPIN,TIME_ERR_SPIN_MIN,TIME_ERR_SPIN_MAX); ResetItem(MCA_DEFAULT,"SLOW_RESET",SLOW_RESET_SPIN_DEF, IDC_MODPARAMS_SLOW_RESET_SPIN,SLOW_RESET_SPIN_MIN,SLOW_RESET_SPIN_MAX); ResetItem(MCA_DEFAULT,"MAXCYCLE",MAXCYCLE_SPIN_DEF, IDC_MODPARAMS_MAXCYCLE_SPIN,MAXCYCLE_SPIN_MIN,MAXCYCLE_SPIN_MAX); ResetItem(MCA_DEFAULT,"DO_DUMP",DODUMP_DEF,IDC_MODPARAMS_DODUMP); ResetItem(MCA_DEFAULT,"LOG_FILTER",LOGFILTER_DEF,IDC_MODPARAMS_LOGFILTER); ResetItem(MCA_DEFAULT,"LOG_MII",LOGMII_DEF,IDC_MODPARAMS_LOGMII); ResetItem(MCA_DEFAULT,"AUTOTIMESET",AUTOTIME_DEF,IDC_CHECK_ALLOWAUTODATE); ResetItem(MCA_DEFAULT,SAVE_LOC,SAVELOC_DEF,IDC_MODPARAMS_SAVELOC); if (SetPort || m_bCollectingParametersForNewISO) { ResetItem(MCA_DEFAULT,"NODE",NODE_SPIN_DEF, IDC_MODPARAMS_NODE_SPIN,NODE_SPIN_MIN,NODE_SPIN_MAX); char buff[16384]; char buff2[32]; if (GetPrivateProfileSection(COMMUNICATIONS,buff, sizeof(buff), m_pParent->m_szIniFile)>0) { char *at = buff; ((CComboBox*)GetDlgItem(IDC_MODPARAMS_PORT))->ResetContent(); m_bAllowFinish = false; while (strlen(at) > 0) { strcpy(buff2,at); strtok(buff2,"="); ((CComboBox*)GetDlgItem(IDC_MODPARAMS_PORT))->AddString(buff2); m_bAllowFinish = true; at = at + strlen(at)+1; } if (m_pPS) ((CMCAConfig2*)m_pPS->GetPage(1))->m_bAllowFinish = m_bAllowFinish; } ((CComboBox*)GetDlgItem(IDC_MODPARAMS_PORT))->SetCurSel(0); ResetItem(MCA_DEFAULT,"PORT",PORT_DEF,IDC_MODPARAMS_PORT); } ResetItem(MCA_DEFAULT,"MAXINQUIRE",MAXINQUIRE_SPIN_DEF, IDC_MODPARAMS_MAXINQUIRE_SPIN,MAXINQUIRE_SPIN_MIN,MAXINQUIRE_SPIN_MAX); ResetItem(MCA_DEFAULT,"MAXSTATUS",MAXSTATUS_SPIN_DEF, IDC_MODPARAMS_MAXSTATUS_SPIN,MAXSTATUS_SPIN_MIN,MAXSTATUS_SPIN_MAX); ResetItem(MCA_DEFAULT,"COMMFAIL",COMMFAIL_SPIN_DEF, IDC_MODPARAMS_COMMFAIL_SPIN,COMMFAIL_SPIN_MIN,COMMFAIL_SPIN_MAX); ResetItem(MCA_DEFAULT,"TIMEOUT",TIMEOUT_SPIN_DEF, IDC_MODPARAMS_TIMEOUT_SPIN,TIMEOUT_SPIN_MIN,TIMEOUT_SPIN_MAX); ResetItemI(MCA_DEFAULT,"MAXPAUSE",MAXPAUSE_SPIN_DEF, IDC_MODPARAMS_MAXPAUSE_SPIN,MAXPAUSE_SPIN_MIN,MAXPAUSE_SPIN_MAX,IDC_MODPARAMS_MAXPAUSE); ResetItemI(MCA_DEFAULT,"MAXBBM",MAXBBM_SPIN_DEF, IDC_MODPARAMS_MAXBBM_SPIN,MAXBBM_SPIN_MIN,MAXBBM_SPIN_MAX,IDC_MODPARAMS_MAXBBM); m_iSpectrumFileType = GetPrivateProfileInt( MCA_DEFAULT,"SPECTRAFILETYPE",SPECTRATYPE_DEF,m_pParent->m_szIniFile); ((CComboBox*)GetDlgItem(IDC_MODPARAMS_SPECTRAFILE))->SetCurSel(m_iSpectrumFileType); }
void CEventModParam::OnModparamsDefault(bool SetPort) { if (m_pPS) m_pPS->SetToClose(0); m_datasetup = true; ResetItem(EVENT_DEFAULT, FILE_ID, FILEID_SPIN_DEF, IDC_EVENTMODPARAMS_FILEID_SPIN, IDC_EVENTMODPARAMS_FILEID); ResetItem(EVENT_DEFAULT,"TIME_ERR",TIME_ERR_SPIN_DEF, IDC_EVENTMODPARAMS_TIME_ERR_SPIN,TIME_ERR_SPIN_MIN,TIME_ERR_SPIN_MAX); ResetItem(EVENT_DEFAULT,"SLOW_RESET",SLOW_RESET_SPIN_DEF, IDC_EVENTMODPARAMS_SLOW_RESET_SPIN,SLOW_RESET_SPIN_MIN,SLOW_RESET_SPIN_MAX); ResetItem(EVENT_DEFAULT,"MAXCYCLE",MAXCYCLE_SPIN_DEF, IDC_EVENTMODPARAMS_MAXCYCLE_SPIN,MAXCYCLE_SPIN_MIN,MAXCYCLE_SPIN_MAX); ResetItem(EVENT_DEFAULT,"DO_DUMP",DODUMP_DEF,IDC_EVENTMODPARAMS_DODUMP); ResetItem(EVENT_DEFAULT,SAVE_LOC,SAVELOC_DEF,IDC_EVENTMODPARAMS_SAVELOC); if (SetPort || m_bCollectingParametersForNewISO) { ResetItem(EVENT_DEFAULT,"NODE",NODE_SPIN_DEF, IDC_EVENTMODPARAMS_NODE_SPIN,NODE_SPIN_MIN,NODE_SPIN_MAX); char buff[4096]; char buff2[32]; if (GetPrivateProfileSection(COMMUNICATIONS,buff, sizeof(buff), m_pParent->m_szIniFile)>0) { char *at = buff; ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->ResetContent(); m_bAllowFinish = false; while (strlen(at) > 0) { strcpy(buff2,at); strtok(buff2,"="); ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->AddString(buff2); m_bAllowFinish = true; at = at + strlen(at)+1; } } ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->SetCurSel(0); ResetItem(EVENT_DEFAULT,"PORT",PORT_DEF,IDC_EVENTMODPARAMS_PORT); } ResetItem(EVENT_DEFAULT,"MAXINQUIRE",MAXINQUIRE_SPIN_DEF, IDC_EVENTMODPARAMS_MAXINQUIRE_SPIN,MAXINQUIRE_SPIN_MIN,MAXINQUIRE_SPIN_MAX); ResetItem(EVENT_DEFAULT,"MAXSTATUS",MAXSTATUS_SPIN_DEF, IDC_EVENTMODPARAMS_MAXSTATUS_SPIN,MAXSTATUS_SPIN_MIN,MAXSTATUS_SPIN_MAX); ResetItem(EVENT_DEFAULT,"COMMFAIL",COMMFAIL_SPIN_DEF, IDC_EVENTMODPARAMS_COMMFAIL_SPIN,COMMFAIL_SPIN_MIN,COMMFAIL_SPIN_MAX); ResetItem(EVENT_DEFAULT,"TIMEOUT",TIMEOUT_SPIN_DEF, IDC_EVENTMODPARAMS_TIMEOUT_SPIN,TIMEOUT_SPIN_MIN,TIMEOUT_SPIN_MAX); ResetItemI(EVENT_DEFAULT,"MAXPAUSE",MAXPAUSE_SPIN_DEF, IDC_EVENTMODPARAMS_MAXPAUSE_SPIN,MAXPAUSE_SPIN_MIN,MAXPAUSE_SPIN_MAX, IDC_EVENTMODPARAMS_MAXPAUSE); ResetItemI(EVENT_DEFAULT,"MAXBBM",MAXBBM_SPIN_DEF, IDC_EVENTMODPARAMS_MAXBBM_SPIN,MAXBBM_SPIN_MIN,MAXBBM_SPIN_MAX, IDC_EVENTMODPARAMS_MAXBBM); }
void CEventModParam::OnModparamsReset() { if (m_pPS) m_pPS->SetToClose(0); m_datasetup = true; char *name = m_pParent->m_pName; if (m_bCollectingParametersForNewISO) { GetDlgItem(IDC_EVENTMODPARAMS_DATETIME)->EnableWindow(FALSE); GetDlgItem(IDC_EVENTMODPARAMS_DATETIME)->ShowWindow(SW_HIDE); } else { GetDlgItem(IDC_EVENTMODPARAMS_PORT)->EnableWindow(FALSE); GetDlgItem(IDC_EVENTMODPARAMS_NODE)->EnableWindow(FALSE); GetDlgItem(IDC_EVENTMODPARAMS_DATETIME)->ShowWindow(SW_SHOW); } ResetItem(name,FILE_ID, FILEID_SPIN_DEF, IDC_EVENTMODPARAMS_FILEID_SPIN, IDC_EVENTMODPARAMS_FILEID); ResetItem(name,"TIME_ERR",TIME_ERR_SPIN_DEF, IDC_EVENTMODPARAMS_TIME_ERR_SPIN,TIME_ERR_SPIN_MIN,TIME_ERR_SPIN_MAX); ResetItem(name,"SLOW_RESET",SLOW_RESET_SPIN_DEF, IDC_EVENTMODPARAMS_SLOW_RESET_SPIN,SLOW_RESET_SPIN_MIN,SLOW_RESET_SPIN_MAX); ResetItem(name,"NODE",NODE_SPIN_DEF, IDC_EVENTMODPARAMS_NODE_SPIN,NODE_SPIN_MIN,NODE_SPIN_MAX); ResetItem(name,"MAXCYCLE",MAXCYCLE_SPIN_DEF, IDC_EVENTMODPARAMS_MAXCYCLE_SPIN,MAXCYCLE_SPIN_MIN,MAXCYCLE_SPIN_MAX); ResetItem(name,"DO_DUMP", DODUMP_DEF, IDC_EVENTMODPARAMS_DODUMP); // ResetItem(name,"LOG_FILTER", LOGFILTER_DEF, IDC_EVENTMODPARAMS_LOGFILTER); // ResetItem(name,"LOG_MII", LOGMII_DEF, IDC_EVENTMODPARAMS_LOGMII); ResetItem(name,"AUTOTIMESET", AUTOTIME_DEF, IDC_CHECK_ALLOWAUTODATE); ResetItem(name,SAVE_LOC, SAVELOC_DEF, IDC_EVENTMODPARAMS_SAVELOC); // ResetItem(name,"BINARY_BBM", BINARY_BBM_DEF,IDC_CHECK_BINARY); char buff[16384]; char buff2[64]; if (GetPrivateProfileSection(COMMUNICATIONS,buff, sizeof(buff), m_pParent->m_szIniFile)>0) { char *at = buff; int sel = ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->GetCurSel(); ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->ResetContent(); m_bAllowFinish = false; while (strlen(at) > 0) { strcpy(buff2,at); strtok(buff2,"="); ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->AddString(buff2); m_bAllowFinish = true; at = at + strlen(at)+1; } ((CComboBox*)GetDlgItem(IDC_EVENTMODPARAMS_PORT))->SetCurSel(sel); } ResetItem(name,"PORT", PORT_DEF, IDC_EVENTMODPARAMS_PORT); ResetItem(name,"MAXINQUIRE",MAXINQUIRE_SPIN_DEF, IDC_EVENTMODPARAMS_MAXINQUIRE_SPIN,MAXINQUIRE_SPIN_MIN,MAXINQUIRE_SPIN_MAX); ResetItem(name,"MAXSTATUS",MAXSTATUS_SPIN_DEF, IDC_EVENTMODPARAMS_MAXSTATUS_SPIN,MAXSTATUS_SPIN_MIN,MAXSTATUS_SPIN_MAX); ResetItem(name,"COMMFAIL",COMMFAIL_SPIN_DEF, IDC_EVENTMODPARAMS_COMMFAIL_SPIN,COMMFAIL_SPIN_MIN,COMMFAIL_SPIN_MAX); ResetItem(name,"TIMEOUT",TIMEOUT_SPIN_DEF, IDC_EVENTMODPARAMS_TIMEOUT_SPIN,TIMEOUT_SPIN_MIN,TIMEOUT_SPIN_MAX); ResetItemI(name,"MAXPAUSE",MAXPAUSE_SPIN_DEF, IDC_EVENTMODPARAMS_MAXPAUSE_SPIN,MAXPAUSE_SPIN_MIN,MAXPAUSE_SPIN_MAX, IDC_EVENTMODPARAMS_MAXPAUSE); ResetItemI(name,"MAXBBM",MAXBBM_SPIN_DEF, IDC_EVENTMODPARAMS_MAXBBM_SPIN,MAXBBM_SPIN_MIN,MAXBBM_SPIN_MAX, IDC_EVENTMODPARAMS_MAXBBM); m_bChange = false; if (m_pApplyButton) m_pApplyButton->EnableWindow(FALSE); }