public void AddVariant(DeviceRequirement requirement, string path, ImageAlignment alignment, ImageResizing resizing)
 {
     ImageSetVariant newItem = new ImageSetVariant(requirement, path) {
         alignment = alignment,
         resizing = resizing
     };
     base.AddVariant(newItem);
 }
示例#2
0
 public bool HasVariant(DeviceRequirement requirement)
 {
     foreach (var item in m_Variants)
     {
         if (item.requirement.values == requirement.values)
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
0
 public void AddVariant(DeviceRequirement requirement, string path, string typeIdentifier)
 {
     foreach (DataSetVariant variant in base.m_Variants)
     {
         if (((variant.id != null) && (typeIdentifier != null)) && (variant.id == typeIdentifier))
         {
             throw new Exception("Two items within the same dataset must not have the same id");
         }
     }
     base.AddVariant(new DataSetVariant(requirement, path, typeIdentifier));
 }
示例#4
0
 // an exception is thrown is two equivalent requirements are added.
 // The same asset dataset must not have paths with equivalent filenames.
 // The identifier allows to identify which data variant is actually loaded (use
 // the typeIdentifer property of the NSDataAsset that was created from the data set)
 public void AddVariant(DeviceRequirement requirement, string path, string typeIdentifier)
 {
     foreach (DataSetVariant item in m_Variants)
     {
         if (item.id != null && typeIdentifier != null && item.id == typeIdentifier)
         {
             throw new Exception("Two items within the same dataset must not have the same id");
         }
     }
     AddVariant(new DataSetVariant(requirement, path, typeIdentifier));
 }
 public bool HasVariant(DeviceRequirement requirement)
 {
     foreach (AssetCatalogItemWithVariants.VariantData variantData in this.m_Variants)
     {
         if (variantData.requirement.values == requirement.values)
         {
             return(true);
         }
     }
     return(false);
 }
 public bool HasVariant(DeviceRequirement requirement)
 {
     foreach (VariantData data in this.m_Variants)
     {
         if (data.requirement.values == requirement.values)
         {
             return(true);
         }
     }
     return(false);
 }
示例#7
0
 public void AddVariant(DeviceRequirement requirement, string path, string typeIdentifier)
 {
     foreach (DataSetVariant variant in base.m_Variants)
     {
         if (((variant.id != null) && (typeIdentifier != null)) && (variant.id == typeIdentifier))
         {
             throw new Exception("Two items within the same dataset must not have the same id");
         }
     }
     base.AddVariant(new DataSetVariant(requirement, path, typeIdentifier));
 }
示例#8
0
 public void AddVariant(DeviceRequirement requirement, string path, string typeIdentifier)
 {
     foreach (AssetDataSet.DataSetVariant dataSetVariant in this.m_Variants)
     {
         if (dataSetVariant.id != null && typeIdentifier != null && dataSetVariant.id == typeIdentifier)
         {
             throw new Exception("Two items within the same dataset must not have the same id");
         }
     }
     this.AddVariant((AssetCatalogItemWithVariants.VariantData) new AssetDataSet.DataSetVariant(requirement, path, typeIdentifier));
 }
示例#9
0
 public DataSetVariant(DeviceRequirement requirement, string path, string id) : base(requirement, path)
 {
     this.id = id;
 }
示例#10
0
 public void AddVariant(DeviceRequirement requirement, string path)
 {
     this.AddVariant((AssetCatalogItemWithVariants.VariantData) new AssetImageSet.ImageSetVariant(requirement, path));
 }
示例#11
0
 public ImageSetVariant(DeviceRequirement requirement, string path)
     : base(requirement, path)
 {
 }
示例#12
0
 public DataSetVariant(DeviceRequirement requirement, string path, string id)
     : base(requirement, path)
 {
     this.id = id;
 }
 public VariantData(DeviceRequirement requirement, string path)
 {
     this.requirement = requirement;
     this.path        = path;
 }
示例#14
0
 public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path)
 {
     this.alignment = null;
     this.resizing  = null;
 }
示例#15
0
 public void AddVariant(DeviceRequirement requirement, string path)
 {
     base.AddVariant(new ImageSetVariant(requirement, path));
 }
示例#16
0
 public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path)
 {
     this.alignment = null;
     this.resizing = null;
 }
示例#17
0
 public void AddVariant(DeviceRequirement requirement, string path)
 {
     AddVariant(new ImageSetVariant(requirement, path));
 }