本文整理汇总了C#中IFeatureLayer.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# IFeatureLayer.Equals方法的具体用法?C# IFeatureLayer.Equals怎么用?C# IFeatureLayer.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFeatureLayer
的用法示例。
在下文中一共展示了IFeatureLayer.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: cboSourceLayer_SelectedIndexChanged
// updates the source layer based on user changing the seleced layer
private void cboSourceLayer_SelectedIndexChanged(object sender, System.EventArgs e)
{
Debug.WriteLine("cboSourceLayer_SelectedIndexChanged()");
try
{
if(m_pISDUTExt.State == esriExtensionState.esriESDisabled)
return;
if(m_pISDUTExt.TransactionManager.Current() == null)
return;
IFeatureLayer previousLayer = m_pFeatureLayerSource;
m_pFeatureLayerSource = (IFeatureLayer)m_arraylistFeatureLayers[m_frmSourceLayer.cboSourceLayer.SelectedIndex];
//try
//{
// m_pNotifyComplete.SetComplete();
//}
//catch{}
if (m_pFeatureLayerSource != null)
{
IEditLayers editLayers = (IEditLayers)m_pEditor;
if (editLayers.IsEditable(m_pFeatureLayerSource))
{
if (!m_pFeatureLayerSource.Equals(editLayers.CurrentLayer))
{
editLayers.SetCurrentLayer(m_pFeatureLayerSource, 0);
}
}
else
{
MessageBox.Show("This layer cannot be edited.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
m_pFeatureLayerSource = previousLayer;
int featureIndex = -1;
if (previousLayer != null)
{
featureIndex = m_arraylistFeatureLayers.IndexOf(previousLayer);
}
m_frmSourceLayer.cboSourceLayer.SelectedIndex = featureIndex;
}
Debug.WriteLine("Source Layer Switched to " + m_pFeatureLayerSource.Name);
//MessageBox.Show(m_pFeatureLayerSource.Name);
}
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message + "\n" + ex.StackTrace);
util.Logger.Write(" Descrip : Responding to to the combo box selection index changing on the container form.\n " +
" Updates the source layer local IFeatureLayer variable." +
"\n Message : " + ex.Message +
"\n StackTrc : " + ex.StackTrace,util.Logger.LogLevel.Debug);
}
}