当前位置: 首页>>代码示例>>C#>>正文


C# ReferencedFileSave.GetCanUseContentPipeline方法代码示例

本文整理汇总了C#中FlatRedBall.Glue.SaveClasses.ReferencedFileSave.GetCanUseContentPipeline方法的典型用法代码示例。如果您正苦于以下问题:C# ReferencedFileSave.GetCanUseContentPipeline方法的具体用法?C# ReferencedFileSave.GetCanUseContentPipeline怎么用?C# ReferencedFileSave.GetCanUseContentPipeline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FlatRedBall.Glue.SaveClasses.ReferencedFileSave的用法示例。


在下文中一共展示了ReferencedFileSave.GetCanUseContentPipeline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateIncludedAndExcluded

        private void UpdateIncludedAndExcluded(ReferencedFileSave instance)
        {
            ResetToDefault();

            AssetTypeInfo ati = instance.GetAssetTypeInfo();


            ExcludeMember("InvalidFileNameCharacters");
            ExcludeMember("ToStringDelegate");
            ExcludeMember("Properties");

            ContainerType containerType = instance.GetContainerType();

            if (containerType == ContainerType.Entity)
            {
                // We do this because this is set automatically if the Entity is unique
                ExcludeMember("IsSharedStatic");

                // We do this because whether the objects from a file are manually updated or not
                // should be up to the entity, not the source file.
                ExcludeMember("IsManuallyUpdated");
            }

            if (containerType == ContainerType.Entity || ati == null || ati.QualifiedRuntimeTypeName.QualifiedType != "Microsoft.Xna.Framework.Media.Song")
            {
                ExcludeMember("DestroyOnUnload");
            }

            #region Extension-based additions/removals
            string extension = FileManager.GetExtension(instance.Name);

            if (extension != "csv" && !instance.TreatAsCsv)
            {
                ExcludeMember("CreatesDictionary");
                ExcludeMember("IsDatabaseForLocalizing");
                ExcludeMember("UniformRowType");
            }
            else
            {
                IncludeMember("UniformRowType", typeof(ReferencedFileSave), new AvailablePrimitiveTypeArraysStringConverter());
            }

            if ((extension != "txt" && extension != "csv") ||
                (extension == "txt" && instance.TreatAsCsv == false)
                )
            {
                ExcludeMember("CsvDelimiter");
            }

            if (extension != "txt")
            {
                ExcludeMember("TreatAsCsv");
            }

            if (extension == "png")
            {
                Attribute[] fileDetailsCategoryAttribute = new Attribute[]{
                    new CategoryAttribute("File Details")};
                IncludeMember("ImageWidth", typeof(int), null, GetImageWidth, null, fileDetailsCategoryAttribute);
                IncludeMember("ImageHeight", typeof(int), null, GetImageHeight, null, fileDetailsCategoryAttribute);
            }

            if (extension == "emix")
            {
                Attribute[] fileDetailsCategoryAttribute = new Attribute[]{
                    new CategoryAttribute("File Details")};

                IncludeMember("EquilibriumParticleCount", typeof(float), null, GetEquilibriumParticleCount, null, fileDetailsCategoryAttribute);
                IncludeMember("BurstParticleCount", typeof(float), null, GetBurstParticleCount, null, fileDetailsCategoryAttribute);
                
            }

            #endregion

            AddProjectSpecificFileMember();


            if (!instance.LoadedAtRuntime)
            {
                ExcludeMember("IsSharedStatic");
                ExcludeMember("IsManuallyUpdated");
                ExcludeMember("LoadedOnlyWhenReferenced");
                ExcludeMember("HasPublicProperty");
                ExcludeMember("InstanceName");
                ExcludeMember("IncludeDirectoryRelativeToContainer");
            }

            if (ati == null || string.IsNullOrEmpty(ati.MakeManuallyUpdatedMethod))
            {
                ExcludeMember("IsManuallyUpdated");
            }

            if (!instance.GetCanUseContentPipeline())
            {
                ExcludeMember("UseContentPipeline");
            }
            if (!instance.UseContentPipeline || ati.QualifiedRuntimeTypeName.QualifiedType != "Microsoft.Xna.Framework.Graphics.Texture2D")
            {
                ExcludeMember("TextureFormat");
            }
//.........这里部分代码省略.........
开发者ID:GorillaOne,项目名称:FlatRedBall,代码行数:101,代码来源:ReferencedFileSavePropertyGridDisplayer.cs


注:本文中的FlatRedBall.Glue.SaveClasses.ReferencedFileSave.GetCanUseContentPipeline方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。