Exemplo n.º 1
0
        public static void SetCP(IVisio.Shape shape, string name, string value, string prompt)
        {
            var cells = new VA.Shapes.UserDefinedCellCells();

            cells.Value  = value;
            cells.Prompt = prompt;
            cells.EncodeValues();
            VA.Shapes.UserDefinedCellHelper.Set(shape, name, cells);
        }
Exemplo n.º 2
0
        public UserDefinedCell(string name, VisioAutomation.Shapes.UserDefinedCellCells cells)
        {
            VisioAutomation.Shapes.UserDefinedCellHelper.CheckValidName(name);

            if (cells == null)
            {
                throw new System.ArgumentNullException(nameof(cells));
            }

            this.Name  = name;
            this.Cells = cells;
        }
Exemplo n.º 3
0
        public UserDefinedCell(string name, string value)
        {
            VisioAutomation.Shapes.UserDefinedCellHelper.CheckValidName(name);

            if (value == null)
            {
                throw new System.ArgumentNullException(nameof(value));
            }

            this.Name        = name;
            this.Cells       = new VisioAutomation.Shapes.UserDefinedCellCells();
            this.Cells.Value = value;
        }
        protected override void ProcessRecord()
        {
            var targetshapes = new VisioScripting.TargetShapes(this.Shape);
            var udcell       = new VisioAutomation.Shapes.UserDefinedCellCells();

            if (this.Value != null)
            {
                udcell.Value = this.Value;
            }
            if (this.Prompt != null)
            {
                udcell.Prompt = this.Prompt;
            }

            this.Client.UserDefinedCell.SetUserDefinedCell(targetshapes, this.Name, udcell);
        }
Exemplo n.º 5
0
        public void SetUserDefinedCell(TargetShapes targetshapes, string name, VA.Shapes.UserDefinedCellCells udcellcells)
        {
            targetshapes = targetshapes.ResolveToShapes(this._client);

            if (targetshapes.Shapes.Count < 1)
            {
                return;
            }

            using (var undoscope = this._client.Undo.NewUndoScope(nameof(SetUserDefinedCell)))
            {
                foreach (var shape in targetshapes.Shapes)
                {
                    VA.Shapes.UserDefinedCellHelper.Set(shape, name, udcellcells);
                }
            }
        }
Exemplo n.º 6
0
 public UserDefinedCell(string name)
 {
     VisioAutomation.Shapes.UserDefinedCellHelper.CheckValidName(name);
     this.Name  = name;
     this.Cells = new VisioAutomation.Shapes.UserDefinedCellCells();
 }