Esempio n. 1
0
        // view contents
        private void OnViewContents(object sender, EventArgs e)
        {
            // load the stream
            if (!LoadStream())
            {
                return;
            }

            PdfOp[] OpArray;
            try
            {
                // parse contents
                OpArray = Reader.ParseContents(StreamByteArray);
            }
            catch
            {
                ViewContentsButton.Enabled = false;
                return;
            }

            byte[]      TempByteArray = Reports.ContentsToText(OpArray);
            DisplayText Dialog        = new DisplayText(DisplayMode.Contents, Reader, ReaderObject, TempByteArray);

            Dialog.ShowDialog();
            return;
        }
        private void OnSummary(object sender, EventArgs e)
        {
            DisplayText Dialog = new DisplayText(DisplayMode.PdfSummary, Reader, null, null);

            Dialog.ShowDialog();
            return;
        }
        private void OnView(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection Rows = DataGrid.SelectedRows;

            if (Rows == null || Rows.Count == 0)
            {
                return;
            }
            DisplayText Dialog = new DisplayText(DisplayMode.ObjectSummary, Reader, (PdfIndirectObject)Rows[0].Tag, null);

            Dialog.ShowDialog();
            return;
        }
        ////////////////////////////////////////////////////////////////////
        // user double click a line: display object
        ////////////////////////////////////////////////////////////////////

        private void OnMouseDoubleClick
        (
            object sender,
            DataGridViewCellMouseEventArgs e
        )
        {
            if (e.Button == MouseButtons.Left && e.RowIndex >= 0)
            {
                DisplayText Dialog = new DisplayText(DisplayMode.ObjectSummary, Reader, (PdfIndirectObject)DataGrid.Rows[e.RowIndex].Tag, null);
                Dialog.ShowDialog();
            }
            return;
        }