Example #1
0
        public void contextMenuEvent(object sender, EventArgs e)
        {
            ToolStripMenuItemWithCharacterInfo tsmiwci = (ToolStripMenuItemWithCharacterInfo)sender;
            int characterId = tsmiwci.getCharacterId();

            controller.changeCharacter(characterId);

            return;
        }
Example #2
0
        public override ToolStripMenuItem getToolStripMenuItem()
        {
            ToolStripMenuItem bufTsi = new ToolStripMenuItem();

            bufTsi.Text        = "キャラクター変更";
            bufTsi.ToolTipText = this.description;

            foreach (CharacterSet item in characterSetList)
            {
                ToolStripMenuItemWithCharacterInfo dropDownTsi = new ToolStripMenuItemWithCharacterInfo();

                dropDownTsi.Text        = item.getName();
                dropDownTsi.ToolTipText = "キャラクターを" + item.getName() + "に変更します";
                dropDownTsi.Click      += this.contextMenuEvent;
                dropDownTsi.setCharacterId(item.getId());

                bufTsi.DropDownItems.Add(dropDownTsi);
            }

            return(bufTsi);
        }