コード例 #1
0
        /// <summary>
        /// Handles the OffsetOver event of the HexViewer control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="InternalsViewer.UI.OffsetEventArgs"/> instance containing the event data.</param>
        private void HexViewer_OffsetOver(object sender, OffsetEventArgs e)
        {
            switch (Page.Header.PageType)
            {
            case PageType.Bcm:
            case PageType.Dcm:
            case PageType.Gam:
            case PageType.Iam:
            case PageType.Sgam:

                if (e.Offset >= AllocationPage.AllocationArrayOffset)
                {
                    var startExtent = (e.Offset - AllocationPage.AllocationArrayOffset) * 8;
                    var endExtent   = startExtent + 7;

                    markerDescriptionToolStripStatusLabel.Text = string.Format("Extents {0} - {1} | Pages {2} - {3}",
                                                                               startExtent,
                                                                               endExtent,
                                                                               startExtent * 8,
                                                                               (endExtent * 8) + 7);
                }
                else
                {
                    markerDescriptionToolStripStatusLabel.Text = e.MarkerDescription;
                }

                break;

            default:

                markerDescriptionToolStripStatusLabel.Text = e.MarkerDescription;
                break;
            }

            markerDescriptionToolStripStatusLabel.ForeColor = e.ForeColour;
            markerDescriptionToolStripStatusLabel.BackColor = e.BackColour;

            offsetToolStripStatusLabel.Text = string.Format("Offset: {0:0000}", e.Offset);
        }
コード例 #2
0
 /// <summary>
 /// Handles the OffsetSet event of the HexViewer control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="InternalsViewer.UI.OffsetEventArgs"/> instance containing the event data.</param>
 private void HexViewer_OffsetSet(object sender, OffsetEventArgs e)
 {
     LoadRecord(e.Offset);
 }
コード例 #3
0
        /// <summary>
        /// Handles the RecordFind event of the HexViewer control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="InternalsViewer.UI.OffsetEventArgs"/> instance containing the event data.</param>
        private void HexViewer_RecordFind(object sender, OffsetEventArgs e)
        {
            int offset = e.Offset;

            FindRecord(offset);
        }