|
如图所示,请大神指教!问题出在哪里?
void nx_lzb_Translate_tools::selectEnue()
{
//获取对话框中的枚举选项
PropertyList * enum0Pros = enum0->GetProperties();
int theenum0 = enum0Pros->GetEnum("Value");
delete enum0Pros;
enum0Pros = NULL;
//设置显示名称
if ( theenum0 == 0)
{
string0->SetLabel("中文名称");
string01->SetLabel("英文名称");
}
else
{
string0->SetLabel("英文名称");
string01->SetLabel("中文名称");
}
UF_initialize();
//读取数据裤目录
char *translation;
UF_translate_variable("UGII_BASE_DIR",&translation);
string BaseDIR1 = translation;
string BaseDIR2 = "\\nx_lzb_tools\\Date\\Translate.dat";
string basePath = BaseDIR1+BaseDIR2;
//打开数据库
int files = uc4504(basePath.c_str(), 1 , 87);
//读取数据
char *outdate;
int data1 = uc4514a ( files , &outdate );
std:vector<NXString> chinese , english;
while (data1 >= 0 )
{
string s1 = outdate;
chinese.push_back(s1.substr(0,s1.find(",")));
english.push_back(s1.substr(s1.find(",")+1,s1.find("")));
data1 = uc4514a ( files , &outdate );
}
string0->SetListItems(chinese);
string01->SetListItems(english);
//关闭文件
uc4540( files , 0);
UF_free(outdate);
UF_terminate();
}
|
|