private void UpdateZJSize(string filename)
{
IFeatureClass pFeatureClass = OpenFeatureClass(filename);
if (pFeatureClass == null)
{
return;
}
int FontSizeidx = pFeatureClass.Fields.FindField("FontSize");
if (FontSizeidx < -1)
{
this.richTextBox1.Text += filename + "中可能不是注记字段\n";
return;
}
IQueryFilter pQueryFilter = new QueryFilterClass();
for (int i = 0; i < oldList.Count; i++)
{
pQueryFilter.WhereClause = "FontSize =" + oldList[i];
int num = pFeatureClass.FeatureCount(pQueryFilter);
if (num < 1)
{
this.richTextBox1.Text += filename + "中" + oldList[i] + "没有," + num + "个\n";
return;
}
ITable pTable = pFeatureClass as ITable;
IRowBuffer rowBuffer = pTable.CreateRowBuffer();
rowBuffer.set_Value(FontSizeidx, newList[i]);
pTable.UpdateSearchedRows(pQueryFilter, rowBuffer);//gisoracle
this.richTextBox1.Text += filename + "中" + oldList[i] + "有," + num + "个,被修改为" + newList[i] + "\n";
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(pQueryFilter);
}