本文整理汇总了C++中DeviceConfig::IsVega方法的典型用法代码示例。如果您正苦于以下问题:C++ DeviceConfig::IsVega方法的具体用法?C++ DeviceConfig::IsVega怎么用?C++ DeviceConfig::IsVega使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeviceConfig
的用法示例。
在下文中一共展示了DeviceConfig::IsVega方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
//.........这里部分代码省略.........
_T("1200"), _T("2400"), _T("4800"), _T("9600"),
_T("19200"), _T("38400"), _T("57600"), _T("115200"),
NULL
};
#endif
if (port_field != NULL) {
DataFieldEnum *dfe = (DataFieldEnum *)port_field->GetDataField();
for (unsigned i = 0; port_types[i].label != NULL; i++) {
dfe->addEnumText(gettext(port_types[i].label));
if (port_types[i].type == config.port_type)
dfe->Set(i);
}
#ifdef ANDROID
JNIEnv *env = Java::GetEnv();
jobjectArray bonded = BluetoothHelper::list(env);
if (bonded != NULL) {
jsize n = env->GetArrayLength(bonded) / 2;
for (jsize i = 0; i < n; ++i) {
jstring address = (jstring)env->GetObjectArrayElement(bonded, i * 2);
if (address == NULL)
continue;
const char *address2 = env->GetStringUTFChars(address, NULL);
if (address2 == NULL)
continue;
jstring name = (jstring)env->GetObjectArrayElement(bonded, i * 2 + 1);
const char *name2 = name != NULL
? env->GetStringUTFChars(name, NULL)
: NULL;
dfe->addEnumText(address2, name2);
env->ReleaseStringUTFChars(address, address2);
if (name2 != NULL)
env->ReleaseStringUTFChars(name, name2);
}
env->DeleteLocalRef(bonded);
if (config.port_type == DeviceConfig::RFCOMM &&
!config.bluetooth_mac.empty()) {
if (!dfe->Exists(config.bluetooth_mac))
dfe->addEnumText(config.bluetooth_mac);
dfe->SetAsString(config.bluetooth_mac);
}
}
#else
dfe->addEnumTexts(COMMPort);
switch (config.port_type) {
case DeviceConfig::SERIAL:
dfe->Set(config.port_index + num_port_types);
break;
case DeviceConfig::DISABLED:
case DeviceConfig::RFCOMM:
case DeviceConfig::AUTO:
case DeviceConfig::INTERNAL:
case DeviceConfig::TCP_LISTENER:
break;
}
#endif
port_field->RefreshDisplay();
}
if (speed_field != NULL) {
#ifdef ANDROID
speed_field->hide();
#else
DataFieldEnum *dfe = (DataFieldEnum *)speed_field->GetDataField();
dfe->addEnumTexts(tSpeed);
dfe->Set(config.speed_index);
speed_field->RefreshDisplay();
#endif
}
if (driver_field) {
DataFieldEnum *dfe = (DataFieldEnum *)driver_field->GetDataField();
const TCHAR *DeviceName;
for (unsigned i = 0; (DeviceName = devRegisterGetName(i)) != NULL; i++)
dfe->addEnumText(DeviceName);
dfe->Sort(1);
dfe->SetAsString(config.driver_name);
driver_field->RefreshDisplay();
}
if (setup_button != NULL)
setup_button->set_visible(config.IsVega());
UpdateDeviceControlVisibility(*port_field, *speed_field, *driver_field);
}