public void OnEvent(object element, object dataset)
        {
            if (_doc == null || !(element is IFeatureLayer) && !(((IFeatureLayer)element).Class is IFeatureClass))
            {
                return;
            }

            TableRelationsDialog dlg = new TableRelationsDialog(_doc, (IFeatureLayer)element);

            dlg.ShowDialog();
        }
        public Task <bool> OnEvent(object element, object dataset)
        {
            if (_doc == null || !(element is IFeatureLayer) && !(((IFeatureLayer)element).Class is IFeatureClass))
            {
                return(Task.FromResult(false));
            }

            TableRelationsDialog dlg = new TableRelationsDialog(_doc, (IFeatureLayer)element);

            dlg.ShowDialog();

            return(Task.FromResult(true));
        }