public void AddVariant(DeviceRequirement requirement, string path, ImageAlignment alignment, ImageResizing resizing) { ImageSetVariant newItem = new ImageSetVariant(requirement, path) { alignment = alignment, resizing = resizing }; base.AddVariant(newItem); }
public bool HasVariant(DeviceRequirement requirement) { foreach (var item in m_Variants) { if (item.requirement.values == requirement.values) { return(true); } } return(false); }
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)); }
// 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); }
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)); }
public DataSetVariant(DeviceRequirement requirement, string path, string id) : base(requirement, path) { this.id = id; }
public void AddVariant(DeviceRequirement requirement, string path) { this.AddVariant((AssetCatalogItemWithVariants.VariantData) new AssetImageSet.ImageSetVariant(requirement, path)); }
public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path) { }
public VariantData(DeviceRequirement requirement, string path) { this.requirement = requirement; this.path = path; }
public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path) { this.alignment = null; this.resizing = null; }
public void AddVariant(DeviceRequirement requirement, string path) { base.AddVariant(new ImageSetVariant(requirement, path)); }
public void AddVariant(DeviceRequirement requirement, string path) { AddVariant(new ImageSetVariant(requirement, path)); }