本文整理汇总了C#中IDataManager.LayerExist方法的典型用法代码示例。如果您正苦于以下问题:C# IDataManager.LayerExist方法的具体用法?C# IDataManager.LayerExist怎么用?C# IDataManager.LayerExist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataManager
的用法示例。
在下文中一共展示了IDataManager.LayerExist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: calculate
//.........这里部分代码省略.........
onFinished(evt);
return;
}
#endregion
#region khac
IQueryFilter qrf = new QueryFilterClass();
bool result = false;
int sothuatimthay = 0;
int sothuatinhduoc = 0;
int sothuaKhongTinhDuoc = 0;
_dataManager = new DataManager(sdeConn.Workspace, sdeConn.Environment);
_version = SdeVersionsTool.CallMe();
_clipTool = new GExtractTool(sdeConn.Environment);
string duongBuffer100mNoSde = FilterSdeLayerName.GetActualName(DataNameTemplate.Duong_Buffer_);
duongBuffer100mNoSde += _currentConfig.DSauDuongVitri1Nn;
string thuaClip100mNoSde = FilterSdeLayerName.GetActualName(DataNameTemplate.Thua_Clip_);
thuaClip100mNoSde += _currentConfig.DSauDuongVitri1Nn;
string duongBuffer100mCoSde = string.Format("{0}{1}", DataNameTemplate.Duong_Buffer_, _currentConfig.DSauDuongVitri1Nn);
string thuaClip100mCoSde = string.Format("{0}{1}", DataNameTemplate.Thua_Clip_, _currentConfig.DSauDuongVitri1Nn);
#endregion
#endregion
//************************************
//*******************************************
//===========================================
//===========================================
#region bat dau tinh
_bufferTool = new GProximityTool(sdeConn.Environment);
if (!_dataManager.LayerExist(duongBuffer100mNoSde))
{
_bufferTool.BufferInsideSde(duongFeatureClass.AliasName, duongBuffer100mNoSde, _currentConfig.DSauDuongVitri1Nn);
}
IFeatureClass duongBuff100FeatureClass = fw.OpenFeatureClass(duongBuffer100mNoSde);
IFeatureLayer duongBuff100FeatureLayer = new FeatureLayerClass();
ISelectionSet duongBuff100Sls;
IFeatureSelection duongBuff100Fsls;
duongBuff100FeatureLayer.FeatureClass = duongBuff100FeatureClass;
//[thaydoi] - cac may tinh khac chi can thay dieu kien truy van he so vi tri
//******************************************************************
#region lay cac quy tac tim vi tri
#region log---
evt.Log = string.Format("\n----Lấy các quy tắc tìm vị trí thửa từ bảng {0}, ứng với hệ số {1} ...", DataNameTemplate.He_So_K, TnHeSoK.DatNongNghiepVt1Hon100m);
onCalculating(evt);
#endregion
qrf.WhereClause = string.Format("{0}='{1}'", "hesovitri", TnHeSoK.DatNongNghiepVt1Hon100m);
ICursor cur = tblHesoVitri.Search(qrf, false);
string quytac = "";
string cachtinh = "";
string cachtinhdongia = "";
try
{
IRow row = cur.NextRow();
if (row != null)
{
quytac = row.get_Value(_tblName.HESO_VITRI.GetIndex(_tblName.HESO_VITRI.QUY_TAC)).ToString();
cachtinh = row.get_Value(_tblName.HESO_VITRI.GetIndex(_tblName.HESO_VITRI.CACH_TINH)).ToString();
cachtinhdongia = row.get_Value(_tblName.HESO_VITRI.GetIndex(_tblName.HESO_VITRI.CACH_TINH_DON_GIA)).ToString();
示例2: calculate
//.........这里部分代码省略.........
onCalculating(evt);
onFinished(evt);
return;
}
#endregion
#region khac
IQueryFilter qrf = new QueryFilterClass();
bool result = false;
int sothuatimthay = 0;
int sothuatinhduoc = 0;
int sothuaKhongTinhDuoc = 0;
_dataManager = new DataManager(sdeConn.Workspace, sdeConn.Environment);
_version = SdeVersionsTool.CallMe();
_eraseTool = new GExtractTool(sdeConn.Environment);
string duongBuffer50mNoSde = FilterSdeLayerName.GetActualName(DataNameTemplate.Duong_Buffer_);
duongBuffer50mNoSde += _currentConfig.DKhoangCach50mMatTien;
string thuaClip50mNoSde=FilterSdeLayerName.GetActualName(DataNameTemplate.Thua_Erase_);
thuaClip50mNoSde += _currentConfig.DKhoangCach50mMatTien;
string duongBuffer50mCoSde = string.Format("{0}{1}", DataNameTemplate.Duong_Buffer_, _currentConfig.DKhoangCach50mMatTien);
string thuaClip50mCoSde = string.Format("{0}{1}", DataNameTemplate.Thua_Erase_, _currentConfig.DKhoangCach50mMatTien);
#endregion
#endregion
//************************************
//*******************************************
//===========================================
//===========================================
#region bat dau tinh
_bufferTool = new GProximityTool(sdeConn.Environment);
if (!_dataManager.LayerExist(duongBuffer50mNoSde))
{
_bufferTool.BufferInsideSde(duongFeatureClass.AliasName, duongBuffer50mNoSde, _currentConfig.DKhoangCach50mMatTien);
}
IFeatureClass duongBuff50FeatureClass = fw.OpenFeatureClass(duongBuffer50mNoSde);
IFeatureLayer duongBuff50FeatureLayer = new FeatureLayerClass();
ISelectionSet duongBuff50Sls;
IFeatureSelection duongBuff50Fsls;
duongBuff50FeatureLayer.FeatureClass = duongBuff50FeatureClass;
#region test
//string ex = string.Format("VongLap(ChonDuong('dorong=10'),VongLap(ChonThua('dientich<1.5'),test([doituonglap]),[doituonglap]))");
////ex=string.Format("VongLap(DuongDangChon(),VongLap()
//Evaluation evalu = new Evaluation(ex);
//evalu.DuongLayer = duongFeatureLayer;
//evalu.ThuaLayer = thuaFeatureLayer;
//evalu.EvaluateCalculating();
//return;
#endregion
//[thaydoi] - cac may tinh khac chi can thay dieu kien truy van he so vi tri
//******************************************************************
#region lay cac quy tac tim vi tri
#region log---
evt.Log = string.Format("\n----Lấy các quy tắc tìm vị trí thửa từ bảng {0}, ứng với hệ số {1} ...", DataNameTemplate.He_So_K, TnHeSoK.DatOSauMatTien50mDt);
onCalculating(evt);
#endregion
qrf.WhereClause = string.Format("{0}='{1}'", "hesovitri", TnHeSoK.DatOSauMatTien50mDt);
ICursor cur = tblHesoVitri.Search(qrf, false);