本文整理汇总了C#中DigitalPlatform.rms.Client.ResPath.GetDbName方法的典型用法代码示例。如果您正苦于以下问题:C# ResPath.GetDbName方法的具体用法?C# ResPath.GetDbName怎么用?C# ResPath.GetDbName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DigitalPlatform.rms.Client.ResPath
的用法示例。
在下文中一共展示了ResPath.GetDbName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoopSearch
//.........这里部分代码省略.........
}
else
{
strUrl = strName.Substring(0, nRet);
strDbName = strName.Substring(nRet + 1);
}
XmlNodeList accesspoints = database.SelectNodes("accessPoint");
// <accessPoint>循环
for (int j = 0; j < accesspoints.Count; j++)
{
XmlNode accesspoint = accesspoints[j];
string strFrom = DomUtil.GetAttr(accesspoint, "name");
// 获得from所对应的key
List<string> keys = GetKeysByFrom(aLine,
strFrom);
if (keys.Count == 0)
continue;
keyscount_table[strDbName + "|" + strFrom] = keys.Count;
string strWeight = DomUtil.GetAttr(accesspoint, "weight");
string strSearchStyle = DomUtil.GetAttr(accesspoint, "searchStyle");
/*
int nWeight = 0;
try
{
nWeight = Convert.ToInt32(strWeight);
}
catch
{
// 警告定义问题?
}*/
for (int k = 0; k < keys.Count; k++)
{
string strKey = (string)keys[k];
if (strKey == "")
continue;
// 检索一个from
nRet = SearchOneFrom(
strUrl,
strDbName,
strFrom,
strKey,
strSearchStyle,
strWeight,
// nThreshold,
5000,
out strError);
if (nRet == -1)
{
// ??? 警告检索错误?
}
}
}
// 处理完一个数据库了
}
// 将listview中每行显示出来
Color color = Color.FromArgb(255, 255, 200);
for (int i = 0; i < this.listView_browse.Items.Count; i++)
{
ListViewItem item = this.listView_browse.Items[i];
ItemInfo info = (ItemInfo)item.Tag;
Debug.Assert(info != null, "");
// 获得库名
ResPath respath = new ResPath(ResPath.GetRegularRecordPath(item.Text));
string strDbName = respath.GetDbName();
int nWeight = AddWeight(
keyscount_table,
strDbName,
info.Hits);
// 获得当前库的threshold
int nThreshold = (int)threshold_table[strDbName];
string strNumber = nWeight.ToString();
if (nWeight >= nThreshold)
{
strNumber = "*" + strNumber;
item.BackColor = color;
}
ListViewUtil.ChangeItemText(item, 1, strNumber);
ListViewUtil.ChangeItemText(item, 2, BuildComment(info.Hits));
}
return 0;
}
示例2: prop_ParsePath
void prop_ParsePath(object sender, ParsePathEventArgs e)
{
string strPath = ResPath.GetRegularRecordPath(e.Path);
ResPath respath = new ResPath(strPath);
e.DbName = respath.Url + "|" + respath.GetDbName();
}