コード例 #1
0
        /// <summary>
        /// sample illustrates querying the contents of the revision table.
        /// and how to add a row
        /// To run this sample have a sheet active that contains a revision table
        /// </summary>
        /// <remarks></remarks>
        public void RevisionTableQuery()
        {
            // Set a reference to the drawing document.
            // This assumes a drawing document is active.
            DrawingDocument oDrawDoc = (DrawingDocument)_InvApplication.ActiveDocument;

            // Set a reference to the first revision table on the active sheet.
            // This assumes that a revision table is on the active sheet.
            RevisionTable oRevTable = default(RevisionTable);

            oRevTable = oDrawDoc.ActiveSheet.RevisionTables[1];

            // Iterate through the contents of the revision table.
            int i = 0;

            for (i = 1; i <= oRevTable.RevisionTableRows.Count; i++)
            {
                // Get the current row.
                RevisionTableRow oRow = oRevTable.RevisionTableRows[i];

                // Iterate through each column in the row.
                long j = 0;
                for (j = 1; j <= oRevTable.RevisionTableColumns.Count; j++)
                {
                    // Get the current cell.
                    RevisionTableCell oCell = default(RevisionTableCell);
                    oCell = oRow[j];

                    // Display the value of the current cell.
                    Debug.Print("Row: " + i + ", Column: " + oRevTable.RevisionTableColumns[j].Title + " = " + oCell.Text);
                }
            }

            //add a new row
            RevisionTableRow oNewRow = default(RevisionTableRow);

            oNewRow = oRevTable.RevisionTableRows.Add();
        }
コード例 #2
0
        public static void InitializeTable()
        {
            SiteTable = getTable("sites1");
            if (SiteTable != null)
            {
                SiteTable.CreateIfNotExists();
            }
            //
            TemporalTable = getTable("temporal1");
            if (TemporalTable != null)
            {
                TemporalTable.CreateIfNotExists();
            }

            RevisionTable = getTable("revision1");
            if (RevisionTable != null)
            {
                RevisionTable.CreateIfNotExists();
            }

            ImagesContainer = getContainer("images1");

            SelectionListTable = getTable("selectionlist1");
            if (SelectionListTable != null)
            {
                SelectionListTable.CreateIfNotExists();
                SelectionInfoStore.CreateSkeleton();
            }

            HistoryTable = getTable("history1");
            if (HistoryTable != null)
            {
                HistoryTable.CreateIfNotExists();
            }

            BoardListTable = getTable("boardlist1");
            if (BoardListTable != null)
            {
                BoardListTable.CreateIfNotExists();
                BoardInfoStore.CreateSkeleton();
            }

            DiscussionListTable = getTable("discussionlist1");
            if (DiscussionListTable != null)
            {
                DiscussionListTable.CreateIfNotExists();
            }

            KeyStoreTable = getTable("keystore1");
            if (KeyStoreTable != null)
            {
                KeyStoreTable.CreateIfNotExists();
            }

            ActivityTable = getTable("activity1");
            if (ActivityTable != null)
            {
                ActivityTable.CreateIfNotExists();
            }

            DiscussionLoadTable = getTable("discussionload1");
            if (DiscussionLoadTable != null)
            {
                DiscussionLoadTable.CreateIfNotExists();
            }

            VoteBookTable = getTable("votebook1");
            if (VoteBookTable != null)
            {
                VoteBookTable.CreateIfNotExists();
            }
        }