コード例 #1
0
        public PxFootnote CreateContentFootnote(PxObject context)
        {
            PxContentFootnote f = new PxContentFootnote();

            f.FootnoteNo = FootnoteNo;
            FootnoteNo++;
            f.FootnoteText        = "Shenim i ri";
            f.FootnoteTextEnglish = "New Footnote";
            f.MandOption          = "O";
            f.ShowFootnote        = "B";
            f.IsNew = true;
            ((PxContent)lbContents.SelectedItem).Footnotes.Add(f);
            ((PxContent)lbContents.SelectedItem).MarkAsDirty();
            _table.MarkAsDirty();
            return(f);
        }
コード例 #2
0
        private void btnAddContentFootnote_Click(object sender, EventArgs e)
        {
            PxContent pxContent = (PxContent)lbContents.SelectedItem;

            if (pxContent != null)
            {
                FootnoteDialog frmFootnote = new FootnoteDialog();
                frmFootnote.Context        = pxContent;
                pxContent.FootnoteContents = "B";
                if (pxContent.Footnotes.Count == 0)
                {
                    PxContentFootnote contentFootnote = (PxContentFootnote)CreateContentFootnote(pxContent);
                }
                frmFootnote.SetDataSource((PxFootnote[])(pxContent).Footnotes.ToArray());

                frmFootnote.AddFotnoteHandler     = CreateContentFootnote;
                frmFootnote.RemoveFootnoteHandler = RemoveContentFootnote;
                frmFootnote.ShowDialog();
            }
            else
            {
                MessageBox.Show("Select a content first!");
            }
        }