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; }
// view stream private void OnViewStream(object sender, EventArgs e) { // load the stream if (!LoadStream()) { return; } // display text dialog DisplayText Dialog; if (ReaderObject.PdfObjectType == "/JpegImage") { // stream is a jpeg image Dialog = new DisplayText(DisplayMode.Image, Reader, ReaderObject, StreamByteArray); ViewContentsButton.Enabled = false; } else { Dialog = new DisplayText(DisplayMode.Stream, Reader, ReaderObject, StreamByteArray); } Dialog.ShowDialog(); return; }