コード例 #1
0
        public Dictionary <IVisio.Shape, Dictionary <string, UserDefinedCellCells> > Get(VisioScripting.Models.TargetShapes targets)
        {
            this._client.Application.AssertApplicationAvailable();
            this._client.Document.AssertDocumentAvailable();

            var prop_dic = new Dictionary <IVisio.Shape, Dictionary <string, UserDefinedCellCells> >();

            targets = targets.ResolveShapes(this._client);

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

            var application     = this._client.Application.Get();
            var page            = application.ActivePage;
            var list_user_props = UserDefinedCellHelper.GetDictionary((IVisio.Page)page, targets.Shapes, CellValueType.Formula);

            for (int i = 0; i < targets.Shapes.Count; i++)
            {
                var shape = targets.Shapes[i];
                var props = list_user_props[i];
                prop_dic[shape] = props;
            }

            return(prop_dic);
        }