Ejemplo n.º 1
0
        /// <summary>
        ///     Implementation of Auto Updater Enabled method for derived classes.
        /// </summary>
        /// <param name="objectClass">The object class.</param>
        /// <param name="editEvent">The edit event.</param>
        /// <returns>
        ///     <c>true</c> if the AutoUpdater should be enabled; otherwise <c>false</c>
        /// </returns>
        /// <remarks>
        ///     This method will be called from IMMSpecialAUStrategy::get_Enabled
        ///     and is wrapped within the exception handling for that method.
        /// </remarks>
        protected override bool InternalEnabled(IObjectClass objectClass, mmEditEvent editEvent)
        {
            if (editEvent != mmEditEvent.mmEventFeatureCreate)
            {
                return(false);
            }

            return(objectClass.IsAssignedFieldModelName(_FieldModelName));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Determines if the <paramref name="source" /> contains any of the field model names specified in the
        ///     <paramref name="modelNames" /> array.
        /// </summary>
        /// <param name="source">The table to check for model names</param>
        /// <param name="modelNames">The field model names.</param>
        /// <returns>
        ///     Returns a <see cref="bool" /> representing <c>true</c> if table contains any of the field model name; otherwise,
        ///     <c>false</c>.
        /// </returns>
        public static bool IsAssignedFieldModelName(this ITable source, params string[] modelNames)
        {
            if (source == null)
            {
                return(false);
            }
            IObjectClass table = source as IObjectClass;

            if (table == null)
            {
                return(false);
            }

            return(table.IsAssignedFieldModelName(modelNames));
        }