Exemplo n.º 1
0
        private static bool HasGroup(DetailConfigurationCollection configurations)
        {
            bool returnValue = false;

            int detailConfigurationCount = configurations.Count;

            for (int i = 0; i < detailConfigurationCount; i++)
            {
                DetailConfiguration detailConfiguration = configurations[i];

                if (detailConfiguration.DetailConfigurations != null)
                {
                    returnValue = GroupingHelper.HasGroup(detailConfiguration.DetailConfigurations);
                }

                if (returnValue)
                {
                    break;
                }

                returnValue = (detailConfiguration.GroupLevelDescriptions.Count > 0);

                if (returnValue)
                {
                    break;
                }
            }

            return(returnValue);
        }
        protected override void StopListening(object source)
        {
            DetailConfiguration detailConfig = source as DetailConfiguration;

            if (detailConfig != null)
            {
                detailConfig.VisibilityChanged -= new EventHandler(this.OnVisibilityChanged);
                return;
            }

            DetailConfigurationCollection detailConfigCollection = source as DetailConfigurationCollection;

            if (detailConfigCollection != null)
            {
                detailConfigCollection.DetailVisibilityChanged -= new EventHandler(this.OnVisibilityChanged);
            }
        }