internal CustomPropertyValues(int id, string propname, VACUSTPROP.CustomPropertyCells propcells) { this.ShapeID = id; this.Name = propname; this.Value = propcells.Value.Formula.Value; this.Format = propcells.Format.Formula.Value; this.Invisible = propcells.Invisible.Formula.Value; this.Label = propcells.Label.Formula.Value; this.LangId = propcells.LangId.Formula.Value; this.Prompt = propcells.Prompt.Formula.Value; this.SortKey = propcells.SortKey.Formula.Value; this.Type = propcells.Type.Formula.Value; this.Ask = propcells.Ask.Formula.Value; this.Calendar = propcells.Calendar.Formula.Value; }
public void Set(IList<IVisio.Shape> target_shapes, string name, CP.CustomPropertyCells customprop) { this.AssertApplicationAvailable(); this.AssertDocumentAvailable(); if (customprop == null) { throw new System.ArgumentNullException("customprop"); } var shapes = GetTargetShapes(target_shapes); if (shapes.Count < 1) { return; } var application = this.Client.VisioApplication; using (var undoscope = new VA.Application.UndoScope(this.Client.VisioApplication, "Set Custom Property")) { foreach (var shape in shapes) { CP.CustomPropertyHelper.Set(shape, name, customprop); } } }
public void Set(IList<IVisio.Shape> target_shapes, string name, VACUSTPROP.CustomPropertyCells customprop) { this.Client.Application.AssertApplicationAvailable(); this.Client.Document.AssertDocumentAvailable(); if (customprop == null) { throw new System.ArgumentNullException(nameof(customprop)); } var shapes = this.GetTargetShapes(target_shapes); if (shapes.Count < 1) { return; } var application = this.Client.Application.Get(); using (var undoscope = this.Client.Application.NewUndoScope("Set Custom Property")) { foreach (var shape in shapes) { VACUSTPROP.CustomPropertyHelper.Set(shape, name, customprop); } } }