示例#1
0
 //アイテム2を使用できない場合は消す. かならず Initの前に呼ぶ
 void InitItem2()
 {
     if (g_ICON_LIST_SIZE <= 16)
     {
         //アイテム2を設定できないので消す.
         MainTab.TabPages.Remove(tabPage4);
         return;
     }
     N4_InputFormRef = N4_Init(this);
     N4_InputFormRef.AddressListExpandsEvent += AddressListExpandsEvent_N4;
     N4_InputFormRef.MakeGeneralAddressListContextMenu(true);
     this.N4_AddressList.OwnerDraw(ListBoxEx.DrawItemAndText, DrawMode.OwnerDrawFixed);
 }
        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.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);

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

            N5_InputFormRef = N5_Init(this);
            N5_InputFormRef.AddressListExpandsEvent += AddressListExpandsEvent_N4;
            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);
                }
            });
        }