/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { try { GetApplicationServices(); IFeatureLayer fl = m_appServices.GetLayerSelectedInTOC(); if (fl != null) { AlterClassExtension(fl.FeatureClass); } else { m_appServices.SetStatusMessage("Couldn't attach the 'custom inspector' extension. No feature layer was selected in the Table of Contents.", true); } } catch (Exception ex) { MessageBox.Show("Error: Could open the feature class. Original error: " + ex.Message); } }