コード例 #1
0
        public SkillConfigFE8NVer2SkillForm()
        {
            InitializeComponent();

            uint[] pointer = FindSkillFE8NVer2IconPointers();
            if (pointer == null)
            {
                R.ShowStopError("スキル拡張 FE8Nver2 のポインタを取得できませんでした");
                return;
            }
            if (pointer.Length < 5)
            {
                R.ShowStopError("スキル拡張 FE8Nver2 のポインタが所定の数だけありません。\r\n{0}個必要ですが、{1}個しかありません。", 5, pointer.Length);
                return;
            }
            this.BasePointer = pointer;
            if (pointer.Length > 5)
            {
                this.AnimeBaseAddress = Program.ROM.p32(pointer[5]);
            }

            InitAnime();

            N1_InputFormRef = N1_Init(this);
            N1_InputFormRef.AddressListExpandsEvent += AddressListExpandsEvent_N1;
            N1_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N1_AddressList.OwnerDraw(ListBoxEx.DrawUnitAndText, DrawMode.OwnerDrawFixed);

            N2_InputFormRef = N2_Init(this);
            N2_InputFormRef.AddressListExpandsEvent += AddressListExpandsEvent_N2;
            N2_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N2_AddressList.OwnerDraw(ListBoxEx.DrawClassAndText, DrawMode.OwnerDrawFixed);

            N3_InputFormRef = N3_Init(this);
            N3_InputFormRef.AddressListExpandsEvent += AddressListExpandsEvent_N3;
            N3_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N3_AddressList.OwnerDraw(ListBoxEx.DrawItemAndText, DrawMode.OwnerDrawFixed);

            this.InputFormRef = Init(this, pointer[4]);
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.AddressList.OwnerDraw(DrawSkillAndText, DrawMode.OwnerDrawFixed);


            MainTab.SelectedIndex = 1;
            U.SetIcon(ImportButton, Properties.Resources.icon_upload);
            U.SetIcon(ExportButton, Properties.Resources.icon_arrow);
            U.SetIcon(AnimationInportButton, Properties.Resources.icon_upload);
            U.SetIcon(AnimationExportButton, Properties.Resources.icon_arrow);

            U.AllowDropFilename(this, ImageFormRef.IMAGE_FILE_FILTER, (string filename) =>
            {
                using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename))
                {
                    ImportButton_Click(null, null);
                }
            });
        }
コード例 #2
0
        public SkillConfigFE8NVer3SkillForm()
        {
            InitializeComponent();

            uint[] pointer = FindSkillFE8NVer3IconPointers();
            if (pointer == null)
            {
                R.ShowStopError("スキル拡張 FE8Nver2 のポインタを取得できませんでした");
                return;
            }
            if (pointer.Length < 5)
            {
                R.ShowStopError("スキル拡張 FE8Nver2 のポインタが所定の数だけありません。\r\n{0}個必要ですが、{1}個しかありません。", 5, pointer.Length);
                return;
            }
            Debug.Assert(g_SkillBaseAddress != 0);

            InitAnime();

            N1_InputFormRef = N1_Init(this);
            N1_InputFormRef.PostAddressListExpandsEvent += AddressListExpandsEvent_N1;
            N1_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N1_AddressList.OwnerDraw(ListBoxEx.DrawUnitAndText, DrawMode.OwnerDrawFixed);

            N2_InputFormRef = N2_Init(this);
            N2_InputFormRef.PostAddressListExpandsEvent += AddressListExpandsEvent_N2;
            N2_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N2_AddressList.OwnerDraw(ListBoxEx.DrawClassAndText, DrawMode.OwnerDrawFixed);

            N3_InputFormRef = N3_Init(this);
            N3_InputFormRef.PostAddressListExpandsEvent += AddressListExpandsEvent_N3;
            N3_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N3_AddressList.OwnerDraw(ListBoxEx.DrawItemAndText, DrawMode.OwnerDrawFixed);

            N4_InputFormRef = N4_Init(this);
            N4_InputFormRef.PostAddressListExpandsEvent += AddressListExpandsEvent_N4;
            N4_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N4_AddressList.OwnerDraw(ListBoxEx.DrawItemAndText, DrawMode.OwnerDrawFixed);

            N5_InputFormRef = N5_Init(this);
            N5_InputFormRef.PostAddressListExpandsEvent += AddressListExpandsEvent_N5;
            N5_InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N4_AddressList.OwnerDraw(ListBoxEx.DrawSkillAndText, DrawMode.OwnerDrawFixed);

            this.InputFormRef = Init(this);
            this.InputFormRef.MakeGeneralAddressListContextMenu(false);
            this.AddressList.OwnerDraw(DrawSkillAndText, DrawMode.OwnerDrawFixed);

            MainTab.SelectedIndex = 1;
            U.SetIcon(ImportButton, Properties.Resources.icon_upload);
            U.SetIcon(ExportButton, Properties.Resources.icon_arrow);
            U.SetIcon(AnimationInportButton, Properties.Resources.icon_upload);
            U.SetIcon(AnimationExportButton, Properties.Resources.icon_arrow);
            InputFormRef.markupJumpLabel(X_JUMP_TO_COMBAT_ART);

            U.AllowDropFilename(this, ImageFormRef.IMAGE_FILE_FILTER, (string filename) =>
            {
                using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename))
                {
                    ImportButton_Click(null, null);
                }
            });
        }