Пример #1
0
        /// <summary>
        /// Removes all file formats from the specified list that have the given category
        /// </summary>
        /// <param name="lst">List with file formats</param>
        /// <param name="category">Category to remove</param>
        private void RemoveFileFormatsByCategory(List <string> lst, string category)
        {
            //PCAxis.Web.Controls.FileGenerator fileGenerator = new PCAxis.Web.Controls.FileGenerator(Master.SelectedCulture());

            for (int i = lst.Count - 1; i >= 0; i--)
            {
                if (CommandBarPluginManager.GetFileType(lst[i]).Category.Equals(category))
                {
                    lst.RemoveAt(i);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Check if file format shall be removed from list of available file formats (only in dropdown mode)
        /// </summary>
        /// <param name="fileGenerator">The file generator object</param>
        /// <param name="format">file format to check for removal</param>
        /// <returns></returns>
        public static bool RemoveFileFormat(string format)
        {
            if (!PXWeb.Settings.Current.Features.General.ChartsEnabled)
            {
                // Remove chart file formats
                if (CommandBarPluginManager.GetFileType(format).Category.Equals(PCAxis.Web.Controls.Plugins.Categories.CHART))
                {
                    return(true);
                }
            }

            return(false);
        }