Inheritance: ModelBase
コード例 #1
0
 public void AddSet(OutputSet set)
 {
     if (set != null && !this.sets.Contains(set))
     {
         this.sets.Add(set);
     }
 }
コード例 #2
0
 public OutputImageTargetSize(OutputSet owner, double targetSize, bool unplated)
     : base(owner)
 {
     this.targetSize = targetSize;
     this.unplated = unplated;
 }
コード例 #3
0
 public OutputImageScale(OutputSet owner, double scale)
     : base(owner)
 {
     this.scale = scale;
     owner.PropertyChanged += OnOwnerPropertyChanged;
 }
コード例 #4
0
 public OutputImage(OutputSet owner)
 {
     this.owner = owner;
     this.owner.PropertyChanged += OnImagePropertyChanged;
     this.owner.Owner.PropertyChanged += OnImagePropertyChanged;
 }
コード例 #5
0
        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";
                        }
                    }
                }
            });
        }