public void AddSet(OutputSet set) { if (set != null && !this.sets.Contains(set)) { this.sets.Add(set); } }
public OutputImageTargetSize(OutputSet owner, double targetSize, bool unplated) : base(owner) { this.targetSize = targetSize; this.unplated = unplated; }
public OutputImageScale(OutputSet owner, double scale) : base(owner) { this.scale = scale; owner.PropertyChanged += OnOwnerPropertyChanged; }
public OutputImage(OutputSet owner) { this.owner = owner; this.owner.PropertyChanged += OnImagePropertyChanged; this.owner.Owner.PropertyChanged += OnImagePropertyChanged; }
private void OnGeneratingSet(OutputSet set) { // Remove existing images ImageResizePackage.Instance.MainThreadHelper.Invoke(() => { IVsHierarchy hierarchy = set.Owner.Item.pHier; uint itemId = hierarchy.FindItemId(set.UnscaledPath); EnvDTE.ProjectItem item = hierarchy.GetProjectItem(itemId); if (item != null) { EnvDTE.Property deployProp = item.GetProperty("DeploymentContent"); EnvDTE.Property typeProp = item.GetProperty("ItemType"); if (deployProp != null) { // C++ project item if (deployProp.Value is bool && (bool)deployProp.Value) { deployProp.Value = false; } } else if (typeProp != null) { // C# project item if (typeProp.Value is string && string.Equals((string)typeProp.Value, "Content", StringComparison.OrdinalIgnoreCase)) { typeProp.Value = "None"; } } } }); }