コード例 #1
0
        private void OnRequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            //MessageBox.Show(string.Format(
            //    "Navigating to {0} in {1}", e.Uri, e.Target));
            //Pointer address = Pointer.Parse(e.Uri.Fragment.Substring(1)); // skip #
            //disassemblyList.GoToAddress(address);

            AssemblyUri uri = e.Uri as AssemblyUri;

            if (uri == null)
            {
                return;
            }

#if false
            if (uri.Referent is Segment)
            {
                this.disassemblyList.SetView(program, uri.Referent as Segment, uri.Offset);
            }
            else
            {
                MessageBox.Show("Not supported");
            }
#else
            this.disassemblyList.SetView(program, uri.Address);
#endif
        }
コード例 #2
0
 private void DisassembleSegment(LogicalSegment segment, int offset)
 {
     // Raise request navigate event.
     if (this.RequestNavigate != null)
     {
         AssemblyUri uri = new AssemblyUri(library, segment, offset);
         var         e   = new RequestNavigateEventArgs(uri, null);
         this.RequestNavigate(this, e);
     }
 }
コード例 #3
0
        private void lvErrors_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var item = lvErrors.SelectedItem as ErrorListViewModel.ErrorListItem;
            if (item == null)
                return;

            if (RequestNavigate != null)
            {
                Error error = item.Error;
                AssemblyUri uri = new AssemblyUri(program, error.Location);
                RequestNavigateEventArgs args = new RequestNavigateEventArgs(uri, null);
                RequestNavigate(this, args);
            }
        }
コード例 #4
0
        private void lvErrors_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var item = lvErrors.SelectedItem as ErrorListViewModel.ErrorListItem;

            if (item == null)
            {
                return;
            }

            if (RequestNavigate != null)
            {
                Error       error             = item.Error;
                AssemblyUri uri               = new AssemblyUri(program, error.Location);
                RequestNavigateEventArgs args = new RequestNavigateEventArgs(uri, null);
                RequestNavigate(this, args);
            }
        }
コード例 #5
0
 private void DisassembleSegment(LogicalSegment segment, int offset)
 {
     // Raise request navigate event.
     if (this.RequestNavigate != null)
     {
         AssemblyUri uri = new AssemblyUri(library, segment, offset);
         var e = new RequestNavigateEventArgs(uri, null);
         this.RequestNavigate(this, e);
     }
 }