Exemple #1
0
        public void Constructor()
        {
            RELNode r = _resource as RELNode;

            if (r._prologSect != -1)
            {
                ModuleDataNode s = r._sections[r._prologSect];

                foreach (SectionEditor l in SectionEditor._openedSections)
                {
                    if (l._section == s)
                    {
                        l.Focus();
                        l.Position = r._prologIndex * 4;
                        l.hexBox1.Focus();
                        return;
                    }
                }

                SectionEditor e = new SectionEditor(s as ModuleSectionNode);
                e.Show();
                e.Position = r._prologIndex * 4;
                e.hexBox1.Focus();
            }
            else
            {
                MessageBox.Show("This module has no constructor function.");
            }
        }
Exemple #2
0
        public void Open()
        {
            RELMethodNode     r       = _resource as RELMethodNode;
            ModuleSectionNode section = r.Root.Children[(int)r.TargetSection] as ModuleSectionNode;

            foreach (SectionEditor l in SectionEditor._openedSections)
            {
                if (l._section == section)
                {
                    if (l.Position != r.RootOffset - section.RootOffset)
                    {
                        l.Position = r.RootOffset - section.RootOffset;
                    }

                    l.Focus();
                    return;
                }
            }

            SectionEditor x = new SectionEditor(section);

            x.Show();
            x.Text = String.Format("Module Section Editor - {0}->{1}", r.Object._name, r._name);

            x.Position = r.RootOffset - section.RootOffset;
            x.hexBox1.Focus();
        }
Exemple #3
0
        public void Unresolved()
        {
            RELNode r = _resource as RELNode;

            if (r._unresReloc != null)
            {
                ModuleDataNode s = r._unresReloc._section;

                foreach (SectionEditor l in SectionEditor._openedSections)
                {
                    if (l._section == s)
                    {
                        l.Focus();
                        l.Position = r._unresReloc._index * 4;
                        l.hexBox1.Focus();
                        return;
                    }
                }

                SectionEditor e = new SectionEditor(s as ModuleSectionNode);
                e.Show();
                e.Position = r._unresReloc._index * 4;
                e.hexBox1.Focus();
            }
            else
            {
                MessageBox.Show("This module has no unresolved function.");
            }
        }
Exemple #4
0
        public void Open()
        {
            InheritanceItemNode r       = _resource as InheritanceItemNode;
            ModuleSectionNode   section = r.Root.Children[5] as ModuleSectionNode;


            foreach (SectionEditor l in SectionEditor._openedSections)
            {
                if (l._section == section)
                {
                    l.Focus();
                    return;
                }
            }

            SectionEditor x = new SectionEditor(section);

            x.Show();
            x.Text     = $"Module Section Editor - {section._name}";
            x.Position = r.RootOffset;
            x.hexBox1.Focus();
        }
Exemple #5
0
        public void Unresolved()
        {
            RELNode r = _resource as RELNode;

            ModuleDataNode s = r.Sections[r._unresolvedSection];

            foreach (SectionEditor l in SectionEditor._openedSections)
            {
                if (l._section == s)
                {
                    l.Focus();
                    l.Position = r._unresolvedOffset;
                    l.hexBox1.Focus();
                    return;
                }
            }

            SectionEditor e = new SectionEditor(s as ModuleSectionNode);

            e.Show();
            e.Position = r._unresolvedOffset;
            e.hexBox1.Focus();
        }