本文整理汇总了C++中BCheckBox::IsChecked方法的典型用法代码示例。如果您正苦于以下问题:C++ BCheckBox::IsChecked方法的具体用法?C++ BCheckBox::IsChecked怎么用?C++ BCheckBox::IsChecked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BCheckBox
的用法示例。
在下文中一共展示了BCheckBox::IsChecked方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveConfigurationToAttributeList
bool BContainer::SaveConfigurationToAttributeList(char* algorithmName,GML::Utils::AttributeList* attrList)
{
BItem* element;
char* objectName;
GML::Utils::GString gStrTemp;
CString temp,tempStr;
CString complexValue;
CString tempValue;
CString connectorStr;
bool foundComplex;
void* objectValue;
unsigned char objectType;
bool someBoolValue;
GML::Utils::Attribute* attr;
unsigned int someUIntValue;
int someIntValue;
double someDoubleValue;
BEdit* editValue;
BCombo* comboValue;
BCheckBox* boolItem;
BFile* fileItem;
int i;
for(i=0;i<vElements.GetSize();i++)
{
element = (BItem*)vElements.GetPointer(i);
if(element == NULL)
return false;
objectName = element->label;
foundComplex = false;
if(strcmp(objectName,"DataBases") == 0)
{
if(!GetComplexElement(&i,&temp))
return false;
if(!attrList->AddAttribute("DataBase",(char*)temp.GetString(),GML::Utils::AttributeList::STRING,1,NULL))
{
return false;
}
continue;
}
if(strcmp(objectName,"Notifiers") == 0)
{
if(!GetComplexElement(&i,&temp))
return false;
if(!attrList->AddAttribute("Notifier",(char*)temp.GetString(),GML::Utils::AttributeList::STRING,1,NULL))
{
return false;
}
continue;
}
if(strcmp(objectName,"Connectors")==0)
{
if(!GetConnectorsSaveString(&i,&temp))
return false;
if(!attrList->AddAttribute("Connector",(char*)temp.GetString(),GML::Utils::AttributeList::STRING,1,NULL))
{
return false;
}
continue;
}
switch(element->elementType)
{
case TYPE_HEADER:
continue;
case GML::Utils::AttributeList::STRING:
editValue = (BEdit*)element;
editValue->GetText(temp);
objectValue = (char*)temp.GetString();
objectType = GML::Utils::AttributeList::STRING;
break;
case TYPE_COMBO:
comboValue = (BCombo*)element;
comboValue->GetSelectedItem(temp);
objectValue = (char*)temp.GetString();
objectType = GML::Utils::AttributeList::STRING;
break;
case TYPE_FILE:
fileItem = (BFile*) element;
fileItem->GetText(temp);
objectValue = (char*)temp.GetString();
objectType = GML::Utils::AttributeList::STRING;
break;
case GML::Utils::AttributeList::BOOLEAN:
boolItem = (BCheckBox*)element;
someBoolValue = boolItem->IsChecked();
objectValue = &someBoolValue;
//.........这里部分代码省略.........
示例2: GetElementStr
bool BContainer::GetElementStr(BItem* element,CString* str)
{
BCheckBox* boolItem;
BEdit* editItem;
BCombo* comboItem;
BFile* fileItem;
BButton* buttonItem;
CString temp;
GML::Utils::GString gStrTemp;
UINT someUIntValue;
int someIntValue;
double someDoubleValue;
switch(element->elementType)
{
case GML::Utils::AttributeList::BOOLEAN:
boolItem = (BCheckBox*)element;
if(boolItem->IsChecked())
str->Format("%s=True;",boolItem->label);
else
str->Format("%s=False;",boolItem->label);
return true;
case GML::Utils::AttributeList::UINT32:
editItem = (BEdit*)element;
editItem->GetText(temp);
gStrTemp.Set(temp.GetBuffer());
if(!gStrTemp.ConvertToUInt32(&someUIntValue))
return false;
str->Format("%s=%u;",editItem->label,someUIntValue);
return true;
case GML::Utils::AttributeList::INT32:
editItem = (BEdit*)element;
editItem->GetText(temp);
gStrTemp.Set(temp.GetBuffer());
if(!gStrTemp.ConvertToInt32(&someIntValue))
return false;
str->Format("%s=%d;",editItem->label,someIntValue);
return true;
case GML::Utils::AttributeList::DOUBLE:
editItem = (BEdit*)element;
editItem->GetText(temp);
gStrTemp.Set(temp.GetBuffer());
if(!gStrTemp.ConvertToDouble(&someDoubleValue))
return false;
str->Format("%s=%lf;",editItem->label,someDoubleValue);
return true;
case GML::Utils::AttributeList::STRING:
editItem = (BEdit*)element;
editItem->GetText(temp);
if(temp.Compare("")==0)
{
return false;
}
str->Format("%s=%s;",editItem->label,temp);
return true;
case TYPE_COMBO:
comboItem = (BCombo*)element;
comboItem->GetSelectedItem(temp);
str->Format("%s=%s;",comboItem->label,temp);
return true;
case TYPE_FILE:
fileItem = (BFile*)element;
fileItem->GetText(temp);
str->Format("%s=%s;",fileItem->label,temp);
return true;
case TYPE_ELEMENT_HEADER:
buttonItem = (BButton*)element;
buttonItem->GetString(&temp);
str->Format("%s",temp);
return true;
}
return false;
}