// Load/Save BOOL COptionsPrefabs::Load() { m_eContentsView = (EViewMode)GetDWordValue("ContentsViewMode", VIEWPREFAB_CONTENTS); m_bShowOutline = GetBoolValue("ShowOutline", TRUE); m_bShowOrientation = GetBoolValue("ShowOrientation", TRUE); return TRUE; }
void CGridAlerts::OnCellChange(wxGridEvent &e) { if( !(m_nInCellChangeEvent || IsTableReadOnly()) ) { CIncrementer x(m_nInCellChangeEvent); nwxGridBatch xxxx(this); int nRow = e.GetRow(); int nCol = e.GetCol(); COARmessage *pMsg = m_pMsgEdit->GetMessage((size_t) nRow); int nCols = GetNumberCols(); const wxString &sName(pMsg->GetMessageName()); if(nCol == (nCols - 1)) { UpdateTextFromRow(nRow,pMsg); } else if(nCol == (nCols - 2)) { UpdateDisabledFromRow(nRow,pMsg); if((!sName.IsEmpty()) && GetBoolValue(nRow,nCol)) { // a row has been enabled // check for mutually exclusive rows // that are enabled and disable them set<wxString> ss; const COARmsgExportMap *pMsgExp = m_pMsgEdit->GetMsgExport(); if(pMsgExp->GetGroupsByMsgName(sName,&ss)) { // we found group names size_t nCount = m_pMsgEdit->GetMessageCount(); size_t iRow; for(iRow = 0; iRow < nCount; iRow++) { if(iRow == (size_t)nRow) {} else if(!GetBoolValue(iRow,nCol)) {} // already unchecked, fuhgeddaboudit. else { COARmessage *pMsgA = m_pMsgEdit->GetMessage(iRow); const wxString &sNameA(pMsgA->GetMessageName()); if(sNameA.IsEmpty()) {} else if( (sNameA == sName) || (pMsgExp->HasGroupByMsgName(sNameA,ss)) ) { // need to uncheck message SetBoolValue(iRow,nCol,false); UpdateDisabledFromRow(iRow,pMsgA); } } } } } } } e.Skip(true); }
// Load/Save BOOL COptionsModels::Load() { m_bRunLowPriority = GetBoolValue ("RunLowPriority", TRUE) ? true : false; m_bLimitMemoryUse = GetBoolValue ("LimitMemoryUse", FALSE) ? true : false; m_nMaxMemoryUse = GetDWordValue ("MaxMemoryUse", 10); m_bRenderBoxAtDist = GetBoolValue ("RenderBoxAtDist", FALSE) ? true : false; m_nRenderBoxDist = GetDWordValue ("RenderBoxDist", 1000); m_nPerspectiveMode = GetDWordValue ("PerspectiveViewMode", VIEWMODEL_TEXTURED); m_nOrthoMode = GetDWordValue ("OrthoViewMode", VIEWMODEL_WIREFRAME); m_bAlwaysShowModels = GetBoolValue ("AlwaysShowModels", TRUE) ? true : false; return TRUE; }
NS_IMETHODIMP nsAbLDAPDirectory::GetReadOnly(PRBool *aReadOnly) { NS_ENSURE_ARG_POINTER(aReadOnly); *aReadOnly = PR_TRUE; #ifdef MOZ_EXPERIMENTAL_WRITEABLE_LDAP PRBool readOnly; nsresult rv = GetBoolValue("readonly", PR_FALSE, &readOnly); NS_ENSURE_SUCCESS(rv, rv); if (readOnly) return NS_OK; // when online, we'll allow writing as well PRBool offline; nsCOMPtr <nsIIOService> ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv,rv); rv = ioService->GetOffline(&offline); NS_ENSURE_SUCCESS(rv,rv); if (!offline) *aReadOnly = PR_FALSE; #endif return NS_OK; }
bool CGridLocus::XferName(int nCol, COARallele *pAllele) { bool bRtn = true; if(!GetBoolValue(ROW_DISABLE,nCol)) { bool bAmel = m_pLocusEdited->IsAmel(); s = GetCellValue(ROW_ALLELE,nCol); nwxString::Trim(&s); if(bAmel) { s.MakeUpper(); const char *ps = s.c_str(); if( (!*ps) || (strchr("XY12",*ps) == NULL) ) { // not x/y bRtn = false; mainApp::ShowError(_T("Invalid allele name"),this); SetCellValue(ROW_ALLELE,nCol,pAllele->FormatName(true,false)); SetGridCursor(ROW_ALLELE,nCol); SelectBlock(ROW_ALLELE,nCol,ROW_ALLELE,nCol); } } if(bRtn) { pAllele->SetName(s,bAmel); } } return bRtn; }
/* 获取section段第一个键为key的bool值,成功返回获取的值,否则返回默认值 */ void IniFile::GetBoolValueOrDefault(const string §ion, const string &key, bool *value, bool defaultValue) { if (GetBoolValue(section, key, value) != 0) { *value = defaultValue; } return; }
void CGridLocus::XferOL(int nCol, COARallele *pAllele) { if(!GetBoolValue(ROW_DISABLE,nCol)) { s = GetCellValue(ROW_OFF_LADDER,nCol); bool b = IsTrue(s.c_str()); pAllele->SetOffLadderString(b ? IOARpeak::OL_TRUE : IOARpeak::OL_FALSE); } }
void CGridLocus::XferHomozygous(int nCol, COARallele *pAllele) { if(!GetBoolValue(ROW_DISABLE,nCol)) { s = GetCellValue(ROW_HOMOZYGOUS,nCol); bool b = IsTrue(s.c_str()); pAllele->SetCountBool(b); } }
void CGridLocus::XferBPS(int nCol, COARallele *pAllele) { if(!GetBoolValue(ROW_DISABLE,nCol)) { s = GetCellValue(ROW_BPS,nCol); nwxString::Trim(&s); pAllele->SetBPS(atof(s.c_str())); } }
void CGridAlerts::UpdateDisabledFromRow( int nRow, COARmessage *pMsg) { int nCols = GetNumberCols() - 2; bool bHidden = !GetBoolValue(nRow,nCols++); pMsg->SetHidden(bHidden); DisableEdit(nRow,nCols,bHidden); Refresh(); }
void wxGxDBConnectionFactory::Serialize(wxXmlNode* const pConfig, bool bStore) { wxGxObjectFactory::Serialize(pConfig, bStore); if(bStore) { if(pConfig->HasAttribute(wxT("load_system_tables_schemes"))) pConfig->DeleteAttribute(wxT("load_system_tables_schemes")); SetBoolValue(pConfig, wxT("load_system_tables_schemes"), m_bLoadSystemTablesAndSchemes); } else { m_bLoadSystemTablesAndSchemes = GetBoolValue(pConfig, wxT("load_system_tables_schemes"), m_bLoadSystemTablesAndSchemes); } }
BOOL CXTPMarkupKeyboardNavigation::IsTabStop(CXTPMarkupObject* e) { if (e->IsKindOf(MARKUP_TYPE(CXTPMarkupFrameworkElement))) { CXTPMarkupFrameworkElement* pElement = (CXTPMarkupFrameworkElement*)e; return pElement->IsFocusable() && GetBoolValue(pElement, m_pIsTabStopProperty) && pElement->IsEnabled() && pElement->IsVisible(); } else if (e->IsKindOf(MARKUP_TYPE(CXTPMarkupFrameworkContentElement))) { return FALSE; } return FALSE; }
void CGridLocus::UpdateDisabledAlleles(int nCol) { bool b; nwxGridBatch xxxx(this); b = GetBoolValue(ROW_DISABLE,nCol); if(IsTableReadOnly()) { SetGrayBackgroundCol(nCol,b); } else { DisableEdit(ROW_ALLELE,nCol,b); DisableEdit(ROW_BPS,nCol,b); DisableEdit(ROW_OFF_LADDER,nCol,b); DisableEdit(ROW_HOMOZYGOUS,nCol,b); } Refresh(); }
char *ldl_attribute::GetValueText() { static char buf[1024]; switch(m_type) { case ATTRIBUTE_TYPE_BOOL: sprintf(buf, "%s", GetBoolValue() ? "true" : "false"); break; case ATTRIBUTE_TYPE_INT: sprintf(buf, "%d", GetIntValue()); break; case ATTRIBUTE_TYPE_DOUBLE: sprintf(buf, "%lf", GetFloatValue()); break; case ATTRIBUTE_TYPE_STRING: sprintf(buf, "%s", GetStringValue()); break; } return buf; }
void CMediaStream::SetUpSRTPKeys (void) { if (GetBoolValue(STREAM_VIDEO_USE_SRTP)) { srandom(GetTimestamp()); if (GetBoolValue(STREAM_VIDEO_SRTP_FIXED_KEYS)) { CHECK_AND_FREE(m_video_key); m_video_key = strdup(GetStringValue(STREAM_VIDEO_SRTP_KEY)); CHECK_AND_FREE(m_video_salt); m_video_salt = strdup(GetStringValue(STREAM_VIDEO_SRTP_SALT)); } else { if (m_video_key == NULL) m_video_key = generate_random(16); if(m_video_salt == NULL) m_video_salt = generate_random(14); } } if (GetBoolValue(STREAM_AUDIO_USE_SRTP)) { if (GetBoolValue(STREAM_AUDIO_SRTP_FIXED_KEYS)) { CHECK_AND_FREE(m_audio_key); m_audio_key = strdup(GetStringValue(STREAM_AUDIO_SRTP_KEY)); CHECK_AND_FREE(m_audio_salt); m_audio_salt = strdup(GetStringValue(STREAM_AUDIO_SRTP_SALT)); } else { if (m_audio_key == NULL) m_audio_key = generate_random(16); if(m_audio_salt == NULL) m_audio_salt = generate_random(14); } } if (GetBoolValue(STREAM_TEXT_USE_SRTP)) { if (GetBoolValue(STREAM_TEXT_SRTP_FIXED_KEYS)) { CHECK_AND_FREE(m_text_key); m_text_key = strdup(GetStringValue(STREAM_TEXT_SRTP_KEY)); CHECK_AND_FREE(m_text_salt); m_text_salt = strdup(GetStringValue(STREAM_TEXT_SRTP_SALT)); } else { if (m_text_key == NULL) m_text_key = generate_random(16); if(m_text_salt == NULL) m_text_salt = generate_random(14); } } }
// ------------------------------------------------------------------- // PopulateArrayWithValue // ------------------------------------------------------------------- void SFSUserVariable::PopulateArrayWithValue(boost::shared_ptr<ISFSArray> arr) { switch(type) { case VARIABLETYPE_UNKNOWN : break; case VARIABLETYPE_NULL : arr->AddNull(); break; case VARIABLETYPE_BOOL: arr->AddBool(GetBoolValue()); break; case VARIABLETYPE_INT: arr->AddInt(GetIntValue()); break; case VARIABLETYPE_DOUBLE: arr->AddDouble(GetDoubleValue()); break; case VARIABLETYPE_STRING: arr->AddUtfString(GetStringValue()); break; case VARIABLETYPE_OBJECT: arr->AddSFSObject(GetSFSObjectValue()); break; case VARIABLETYPE_ARRAY: arr->AddSFSArray(GetSFSArrayValue()); break; } }
bool RDRecording::fri() const { return GetBoolValue("FRI"); }
bool RDTty::active() { return GetBoolValue("ACTIVE"); }
bool RDRecording::oneShot() const { return GetBoolValue("ONE_SHOT"); }
bool wxRadioButton::GetValue() const { return GetBoolValue(); }
bool wxCheckBox::GetValue() const { return GetBoolValue(); }
void wxGxContentView::Serialize(wxXmlNode* pRootNode, bool bStore) { if(pRootNode == NULL) return; if(bStore) { if(pRootNode->HasAttribute(wxT("style"))) pRootNode->DeleteAttribute(wxT("style")); SetDecimalValue(pRootNode, wxT("style"), m_current_style); if(pRootNode->HasAttribute(wxT("sort"))) pRootNode->DeleteAttribute(wxT("sort")); SetBoolValue(pRootNode, wxT("sort"), m_bSortAsc); if(pRootNode->HasAttribute(wxT("sort_col"))) pRootNode->DeleteAttribute(wxT("sort_col")); SetDecimalValue(pRootNode, wxT("sort_col"), m_currentSortCol); if(m_current_style == enumGISCVReport) { //store values m_anWidth.Clear(); for (int i = 0; i < GetColumnCount(); ++i) { m_anWidth.Add( GetColumnWidth(i) ); } #ifdef wxHAS_LISTCTRL_COLUMN_ORDER m_anOrder = GetColumnsOrder(); #endif } wxString sCols; for(size_t i = 0; i < m_anWidth.GetCount(); ++i) { sCols += wxString::Format(wxT("%d"), m_anWidth[i]); sCols += wxT("|"); } if(pRootNode->HasAttribute(wxT("cols_width"))) pRootNode->DeleteAttribute(wxT("cols_width")); pRootNode->AddAttribute(wxT("cols_width"), sCols); #ifdef wxHAS_LISTCTRL_COLUMN_ORDER wxString sOrd; for(size_t i = 0; i < m_anOrder.GetCount(); ++i) { sOrd += wxString::Format(wxT("%d"), m_anOrder[i]); sOrd += wxT("|"); } if(pRootNode->HasAttribute(wxT("cols_order"))) pRootNode->DeleteAttribute(wxT("cols_order")); pRootNode->AddAttribute(wxT("cols_order"), sOrd); #endif } else { m_bSortAsc = GetBoolValue(pRootNode, wxT("sort"), true); m_currentSortCol = GetDecimalValue(pRootNode, wxT("sort_col"), 0); wxGISEnumContentsViewStyle style = (wxGISEnumContentsViewStyle)GetDecimalValue(pRootNode, wxT("style"), 0); //load col width wxString sCol = pRootNode->GetAttribute(wxT("cols_width")); wxStringTokenizer tkz(sCol, wxString(wxT("|")), wxTOKEN_RET_EMPTY ); while ( tkz.HasMoreTokens() ) { wxString token = tkz.GetNextToken(); //token.Replace(wxT("|"), wxT("")); int nWidth = wxAtoi(token); //wxLIST_AUTOSIZE m_anWidth.Add(nWidth); } #ifdef wxHAS_LISTCTRL_COLUMN_ORDER //load col order wxString sOrd = pRootNode->GetAttribute(wxT("cols_order")); wxStringTokenizer tkz_ord(sOrd, wxString(wxT("|")), wxTOKEN_RET_EMPTY ); while ( tkz_ord.HasMoreTokens() ) { wxString token = tkz_ord.GetNextToken(); //token.Replace(wxT("|"), wxT("")); m_anOrder.Add( wxAtoi(token) ); } #endif SetStyle(style); SORTDATA sortdata = {m_bSortAsc, m_currentSortCol}; SortItems(GxObjectCVCompareFunction, (long)&sortdata); } }
bool RDRecording::enableMetadata() const { return GetBoolValue("ENABLE_METADATA"); }
void CMediaStream::Initialize (bool check_config_name) { // reads the configuration file CConfigEntry::Initialize(check_config_name); if (m_valid == false) { return; } // set variables based on information we read if (GetBoolValue(STREAM_VIDEO_ENABLED)) { if (m_video_profile_list == NULL) { error_message("No video profiles to read"); m_valid = false; return; } SetVideoProfile(GetStringValue(STREAM_VIDEO_PROFILE)); if (m_pVideoProfile == NULL) { SetVideoProfile("default"); if (m_pVideoProfile == NULL) { error_message("Video profile \"%s\" could not be found in stream %s", GetStringValue(STREAM_VIDEO_PROFILE), GetStringValue(STREAM_NAME)); m_valid = false; return; } SetStringValue(STREAM_VIDEO_PROFILE, "default"); } } if (GetBoolValue(STREAM_AUDIO_ENABLED)) { if (m_audio_profile_list == NULL) { error_message("No audio profiles to read"); m_valid = false; return; } SetAudioProfile(GetStringValue(STREAM_AUDIO_PROFILE)); if (m_pAudioProfile == NULL) { SetAudioProfile("default"); if (m_pAudioProfile == NULL) { error_message("Audio profile \"%s\" could not be found in stream %s", GetStringValue(STREAM_AUDIO_PROFILE), GetStringValue(STREAM_NAME)); m_valid = false; return; } SetStringValue(STREAM_AUDIO_PROFILE, "default"); } } if (GetBoolValue(STREAM_TEXT_ENABLED)) { if (m_text_profile_list == NULL) { error_message("No text profiles to read"); m_valid = false; return; } SetTextProfile(GetStringValue(STREAM_TEXT_PROFILE)); if (m_pTextProfile == NULL) { SetTextProfile("default"); if (m_pTextProfile == NULL) { error_message("Text profile \"%s\" could not be found in stream %s", GetStringValue(STREAM_TEXT_PROFILE), GetStringValue(STREAM_NAME)); m_valid = false; return; } SetStringValue(STREAM_TEXT_PROFILE, "default"); } } // same profile for text here... char buffer[PATH_MAX]; // Set up the file names, if they do not already exist const char *last_sep = strrchr(m_filename, '/'); if (last_sep == NULL) last_sep = m_filename; else last_sep++; if (GetStringValue(STREAM_SDP_FILE_NAME) == NULL) { snprintf(buffer, PATH_MAX, "%s.sdp", last_sep); SetStringValue(STREAM_SDP_FILE_NAME, buffer); debug_message("Setting stream %s sdp file to \"%s\"", GetName(), buffer); } if (GetStringValue(STREAM_RECORD_MP4_FILE_NAME) == NULL) { // set file name snprintf(buffer, PATH_MAX, "%s.mp4", last_sep); SetStringValue(STREAM_RECORD_MP4_FILE_NAME, buffer); debug_message("Setting stream %s file to \"%s\"", GetName(), buffer); } if (GetStringValue(STREAM_CAPTION) == NULL) { if (GetStringValue(STREAM_NAME) == NULL) SetStringValue(STREAM_CAPTION, "default"); else SetStringValue(STREAM_CAPTION, GetStringValue(STREAM_NAME)); debug_message("Setting stream %s caption to \"%s\"", GetName(), GetStringValue(STREAM_NAME)); } }
/*! @return CFG_FILE_NOT_SPECIFIED if a filename has never been specified @return CFG_FILE_MISSING if the file does not exist @return CFG_FILE_FORMAT_ERROR if there is a problem with the file data @return CFG_OK if successful Loads the configuration of the ConfigMgr from file. */ ConfigMgrStatusType ConfigMgr::Load(string filename) { xmlDocPtr document; xmlNodePtr currentNode; string location; double version; string name; if ( filename == "" ) return CFG_FILE_NOT_SPECIFIED; document = xmlParseFile(filename.c_str()); if ( !document ) return CFG_FILE_MISSING; currentNode = xmlDocGetRootElement(document); if ( !currentNode ) { printf("no root node in config\n"); xmlFreeDoc(document); return CFG_FILE_FORMAT_ERROR; } mRepositoryDirectories.clear(); version = GetDoubleValue(currentNode, VERSION_STR, 1.0); mInstallLogFilename = GetStringValue(currentNode, LOG_STR); if ( mInstallLogFilename == "" ) return CFG_FILE_FORMAT_ERROR; mStorageDirectory = GetStringValue(currentNode, STORAGE_STR); if ( mStorageDirectory == "" ) return CFG_FILE_FORMAT_ERROR; mWorkDirectory = GetStringValue(currentNode, WORK_STR); if ( mWorkDirectory == "" ) return CFG_FILE_FORMAT_ERROR; mInstallFileDirectory = GetStringValue(currentNode, INSTALL_FILE_STR); if ( mInstallFileDirectory == "" ) return CFG_FILE_FORMAT_ERROR; mNumProcessors = GetIntValue(currentNode, PROCESSOR_STR, 0); if ( mNumProcessors < 1 ) DetectNumProcessors(); currentNode = currentNode->children; while ( currentNode ) { if ( !strcmp((char *)currentNode->name,REPOSITORY_STR) ) { location = GetStringValue(currentNode, DIR_STR); if ( location != "" ) mRepositoryDirectories.push_back(location); } else if ( !strcmp((char *)currentNode->name,FEATURE_STR) ) { name = GetStringValue(currentNode, FEATURE_NAME_STR); if ( name != "" ) mFeatureSettings[name] = GetBoolValue(currentNode,ENABLED_STR,false); } currentNode = currentNode->next; } mCfgFilename = filename; xmlFreeDoc(document); return CFG_OK; }
bool wxToggleButton::GetValue() const { return GetBoolValue(); }
ATOM_DisplayInfo::ATOM_DisplayInfo (void) { IDxDiagProvider* pDxDiagProvider = 0; IDxDiagContainer* pDxDiagRoot = 0; BOOL bComInitialized = FALSE; IDxDiagContainer* pContainer = NULL; IDxDiagContainer* pObject = NULL; IDxDiagContainer* pDxDiagSystemInfo = NULL; DWORD nInstanceCount = 0; DWORD nItem = 0; HRESULT hr = CoInitialize (NULL); bComInitialized = SUCCEEDED (hr); hr = CoCreateInstance (CLSID_DxDiagProvider, NULL, CLSCTX_INPROC_SERVER, IID_IDxDiagProvider, (LPVOID*)&pDxDiagProvider); if (FAILED(hr)) goto LCleanup; if (!pDxDiagProvider) { hr = E_POINTER; goto LCleanup; } DXDIAG_INIT_PARAMS dxDiagInitParam; memset(&dxDiagInitParam, 0, sizeof(DXDIAG_INIT_PARAMS)); dxDiagInitParam.dwSize = sizeof(DXDIAG_INIT_PARAMS); dxDiagInitParam.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION; dxDiagInitParam.bAllowWHQLChecks = false; dxDiagInitParam.pReserved = NULL; hr = pDxDiagProvider->Initialize( &dxDiagInitParam ); if( FAILED(hr) ) goto LCleanup; hr = pDxDiagProvider->GetRootContainer( &pDxDiagRoot ); if( FAILED(hr) ) goto LCleanup; if( FAILED( hr = pDxDiagRoot->GetChildContainer( L"DxDiag_DisplayDevices", &pContainer ) ) ) goto LCleanup; if( FAILED( hr = pContainer->GetNumberOfChildContainers( &nInstanceCount ) ) ) goto LCleanup; WCHAR wszContainer[256]; for (nItem = 0; nItem < nInstanceCount; nItem++) { DisplayDeviceInfo *di = ATOM_NEW(DisplayDeviceInfo); devices.push_back (di); hr = pContainer->EnumChildContainerNames( nItem, wszContainer, 256 ); if(FAILED(hr)) goto LCleanup; hr = pContainer->GetChildContainer( wszContainer, &pObject ); if( FAILED( hr ) || pObject == NULL ) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDescription", di->m_strDescription, ARRAY_SIZE(di->m_strDescription)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szManufacturer", di->m_strManufacturer, ARRAY_SIZE(di->m_strManufacturer)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szChipType", di->m_strChipType, ARRAY_SIZE(di->m_strChipType)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDisplayMemoryLocalized", di->m_strDisplayMemory, ARRAY_SIZE(di->m_strDisplayMemory)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDisplayModeLocalized", di->m_strATOM_DisplayMode, ARRAY_SIZE(di->m_strATOM_DisplayMode)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDriverName", di->m_strDriverName, ARRAY_SIZE(di->m_strDriverName)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDriverVersion", di->m_strDriverVersion, ARRAY_SIZE(di->m_strDriverVersion)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDriverDateLocalized", di->m_strDriverDate, ARRAY_SIZE(di->m_strDriverDate)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szVendorId", di->m_strVendorId, ARRAY_SIZE(di->m_strVendorId)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szDeviceId", di->m_strDeviceId, ARRAY_SIZE(di->m_strDeviceId)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szSubSysId", di->m_strSubSysId, ARRAY_SIZE(di->m_strSubSysId)))) goto LCleanup; if( FAILED( hr = GetStringValue( pObject, L"szRevisionId", di->m_strRevisionId, ARRAY_SIZE(di->m_strRevisionId)))) goto LCleanup; if( FAILED( hr = GetBoolValue( pObject, L"bDDAccelerationEnabled", &di->m_bDDAccelerationEnabled))) goto LCleanup; if( FAILED( hr = GetBoolValue( pObject, L"b3DAccelerationExists", &di->m_b3DAccelerationExists))) goto LCleanup; if( FAILED( hr = GetBoolValue( pObject, L"b3DAccelerationEnabled", &di->m_b3DAccelerationEnabled))) goto LCleanup; if( FAILED( hr = GetBoolValue( pObject, L"bAGPEnabled", &di->m_bAGPEnabled))) goto LCleanup; if( FAILED( hr = GetBoolValue( pObject, L"bAGPExists", &di->m_bAGPExists))) goto LCleanup; SAFE_RELEASE(pObject); } //get dx version if( FAILED( hr = pDxDiagRoot->GetChildContainer( L"DxDiag_SystemInfo", &pDxDiagSystemInfo ) ) ) goto LCleanup; if( FAILED( hr = GetIntValue( pDxDiagSystemInfo, L"dwDirectXVersionMajor", &dxverion.nDXVersionMajor))) goto LCleanup; if( FAILED( hr = GetIntValue( pDxDiagSystemInfo, L"dwDirectXVersionMinor", &dxverion.nDXVersionMinor))) goto LCleanup; if( FAILED( hr = GetStringValue( pDxDiagSystemInfo, L"szDirectXVersionLetter", dxverion.sDXVersionLetter, ARRAY_SIZE(dxverion.sDXVersionLetter)))) goto LCleanup; LCleanup: SAFE_RELEASE(pObject); SAFE_RELEASE(pContainer); SAFE_RELEASE(pDxDiagSystemInfo); SAFE_RELEASE(pDxDiagRoot); SAFE_RELEASE(pDxDiagProvider); if (FAILED(hr) && !devices.empty()) { ATOM_DELETE(devices.back ()); devices.pop_back (); } if (bComInitialized) CoUninitialize (); }
bool CGridSampleLimits::TransferDataFromWindow() { bool bRtn = (m_pData != NULL) && (m_pMessageBook != NULL); if(bRtn) { wxString s; double d; int n; bool bCreateIfNeeded; s = GetCellValue(ROW_PULLUP,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMaxNumberOfPullupsPerSample(n); s = GetCellValue(ROW_STUTTER,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMaxNumberOfStutterPeaksPerSample(n); s = GetCellValue(ROW_ADENYLATION,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMaxNumberOfAdenylationsPerSample(n); s = GetCellValue(ROW_OFF_LADDER,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMaxNumberOfOLAllelesPerSample(n); s = GetCellValue(ROW_RESIDUAL,0); d = CPanelLabSettings::Str2Double(s); m_pData->SetMaxResidualForAlleleCall(d); s = GetCellValue(ROW_EXCESSIVE_RESIDUAL,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMaxExcessiveResidual(n); s = GetCellValue(ROW_RFU_INCOMPLETE_SAMPLE,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMaxRFUForIncompleteSample(n); s = GetCellValue(ROW_MIN_BPS_ARTIFACTS,0); n = CPanelLabSettings::Str2Int(s); m_pData->SetMinBPSForArtifacts(n); // message book parameters int nRow = ROW_MESSAGE_BOOK_OFFSET; vector<const CXMLmessageBookSM *>::iterator itrMsg; for(itrMsg = m_vpMsgBookSM.begin(); itrMsg != m_vpMsgBookSM.end(); ++itrMsg) { if(!(*itrMsg)->EmptyDescriptor()) { if((*itrMsg)->IsPreset()) { n = GetBoolValue(nRow,0) ? 1 : 0; } else { s = GetCellValue(nRow,0); n = CPanelLabSettings::Str2Int(s,-1); } bCreateIfNeeded = (n != (*itrMsg)->GetThreshold()); m_pData->SetValue((*itrMsg)->GetName(),n,bCreateIfNeeded); ++nRow; } // need validation } } return bRtn; }
// Load/Save BOOL COptionsMisc::Load() { m_bParentFolder = GetBoolValue ("ParentFolder", TRUE) ? true : false; // Load Icons Info m_bShowIcons = GetBoolValue ("ShowIcons", TRUE) ? true : false; // Load Thumbnails Info m_bShowThumbnails = GetBoolValue ("ShowThumbnails", TRUE) ? true : false; SetAutoExtractIcons(GetBoolValue("AutoExtractIcons", TRUE) ? true : false); SetAutoExtractClassHelp(GetBoolValue("AutoExtractClassHelp", TRUE) ? true : false); m_bShowUndoWarnings = GetBoolValue ("ShowUndoWarnings", TRUE) ? true : false; m_bShowFullPath = GetBoolValue("ShowFullPathInTitle", FALSE) ? true : false; m_bAutoLoadProj = GetBoolValue("AutoLoadProj", TRUE) ? true : false; m_bDefaultCompressed = GetBoolValue("DefaultCompressed", TRUE) ? true : false; m_bLoadLYTFile = GetBoolValue("LoadLYTFile", TRUE) ? true : false; m_bUndoFreezeHide = GetBoolValue("UndoFreezeHide", FALSE) ? true : false; // Load undo data m_dwUndos = GetDWordValue("NumUndos", 40); SetVectorEditIncrement(atof(GetStringValue("VectorEditIncrement", "0.1"))); SetVectorEditAutoApply(GetBoolValue("VectorEditAutoApply", TRUE) ? true : false); SetRotationEditAutoApply(GetBoolValue("RotationEditAutoApply", TRUE) ? true : false); return TRUE; }
bool RDRecording::sat() const { return GetBoolValue("SAT"); }