示例#1
0
        public Function(State decState, String name, uint addr)
        {
            Name = name;
            Address = addr;
            Size = 0xFFFFFFFF;

            decompiler = decState;
        }
示例#2
0
 public static State FromFile(String xdp)
 {
     State state = new State();
     state.LoadFromFile(xdp);
     return state;
 }
 public XenonInstructions(State state)
 {
     decompiler = state;
 }
        private void OpenProject(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog();
            ofd.Filter = "x360Dec projects (*.xdp)|*.xdp";
            bool? res = ofd.ShowDialog();

            if (res == null || res == false)
                return;

            _FuncCollection.Clear();
            projFn = ofd.FileName;
            state = State.FromFile(projFn);

            foreach (Function f in state.Functions)
            {
                ListViewFunction lvf = new ListViewFunction(f.Name, f.Address, f);
                _FuncCollection.Add(lvf);
                f.ListViewEntry = lvf;
            }

            SaveMenu.IsEnabled = true;
            PdbMenu.IsEnabled = true;

            ListCollectionView view = (ListCollectionView)CollectionViewSource.GetDefaultView(FunctionsView.ItemsSource);
            view.CustomSort = nameSorter;
        }
        private void OpenExe(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog();
            ofd.Filter = "Executable files (*.exe)|*.exe";

            bool? res = ofd.ShowDialog();
            if (res.HasValue && res == true)
            {
                state = new State(ofd.FileName);
                PdbMenu.IsEnabled = true;
                SaveMenu.IsEnabled = true;
            }
        }