コード例 #1
0
        private void AddressLabel_Click(object sender, EventArgs e)
        {
            PointerToolCopyToForm f = (PointerToolCopyToForm)InputFormRef.JumpFormLow <PointerToolCopyToForm>();

            f.Init((uint)U.atoh(AddressTextBox.Text));
            f.ShowDialog();
        }
コード例 #2
0
        private void OtherROMAddress_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Control v = (Control)(sender);

            PointerToolCopyToForm f = (PointerToolCopyToForm)InputFormRef.JumpFormLow <PointerToolCopyToForm>();

            f.Init((uint)U.atoh(v.Text));
            f.ShowDialog();
        }
コード例 #3
0
        public static void ShowDumpSelectDialog(InputFormRef ifr, string selectAddress)
        {
            uint addr = U.atoh(selectAddress);

            if (U.is_RAMPointer(addr))
            {//RAMの場合Dumpできないので、代わりにポインタツールの選択画面を開こう
                PointerToolCopyToForm ptcopyForm = (PointerToolCopyToForm)InputFormRef.JumpFormLow <PointerToolCopyToForm>();
                ptcopyForm.Init((uint)addr);
                ptcopyForm.ShowDialog();

                return;
            }
            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            DumpStructSelectDialogForm f = (DumpStructSelectDialogForm)InputFormRef.JumpFormLow <DumpStructSelectDialogForm>();

            f.Init(addr);
            f.ShowDialog();


            DumpStructSelectDialogForm.Func ff = f.GetCallFunc();
            if (ff == DumpStructSelectDialogForm.Func.Func_Binary)
            {
                HexEditorForm hexeditor = (HexEditorForm)InputFormRef.JumpForm <HexEditorForm>(U.NOT_FOUND);
                hexeditor.JumpTo(addr);
                return;
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_Clipbord_Pointer)
            {
                U.SetClipboardText(U.ToHexString(U.toPointer(addr)));
                return;
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_Clipbord_Copy)
            {
                U.SetClipboardText(U.ToHexString(addr));
                return;
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_Clipbord_LittleEndian)
            {
                uint a = U.toPointer(addr);
                uint r = (((a & 0xFF) << 24)
                          + ((a & 0xFF00) << 8)
                          + ((a & 0xFF0000) >> 8)
                          + ((a & 0xFF000000) >> 24));

                U.SetClipboardText(U.ToHexString(r));
                return;
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_Clipbord_NoDollBreakPoint)
            {
                U.SetClipboardText("[" + U.ToHexString(U.toPointer(addr)) + "]?");
                return;
            }

            string text;
            string filename;
            Dictionary <string, string> addFiles = new Dictionary <string, string>();

            if (ff == DumpStructSelectDialogForm.Func.Func_STRUCT)
            {
                filename = ifr.SelfForm.Name + ifr.Prefix + ".h";
                text     = f.MakeStructString(ifr);
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_CSV)
            {
                filename = ifr.SelfForm.Name + ifr.Prefix + "_" + U.ToHexString8(ifr.BaseAddress) + ".csv";
                text     = f.MakeTSVString(ifr, true);
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_TSV)
            {
                filename = ifr.SelfForm.Name + ifr.Prefix + "_" + U.ToHexString8(ifr.BaseAddress) + ".tsv";
                text     = f.MakeTSVString(ifr, false);
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_EA)
            {
                filename = ifr.SelfForm.Name + ifr.Prefix + "_" + U.ToHexString8(ifr.BaseAddress) + ".event";
                text     = f.MakeEAString(ifr);
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_NMM)
            {
                string basename = ifr.SelfForm.Name + "_" + ifr.Prefix;
                filename = ifr.SelfForm.Name + ifr.Prefix + "_" + U.ToHexString8(ifr.BaseAddress) + ".nmm";
                text     = f.MakNMMString(ifr, basename, addFiles);
            }
            else if (ff == DumpStructSelectDialogForm.Func.Func_Import)
            {
                f.ImportTSV(ifr);
                return;
            }
            else
            {
                return;
            }

            DumpStructSelectToTextDialogForm showForm = (DumpStructSelectToTextDialogForm)InputFormRef.JumpFormLow <DumpStructSelectToTextDialogForm>();

            showForm.Init(filename, text, addFiles);
            showForm.ShowDialog();
        }