예제 #1
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            state = AddEditState.Edit;

            ucHeroList.Enabled = false;
            btnAdd.Enabled     = false;
            btnDelete.Enabled  = false;
            btnModify.Enabled  = false;

            SelectedHeroChanged?.Invoke(selectedHero, selectedIndex, state);
        }
예제 #2
0
 private void UcHeroList_SelectHeroChanged(MBHero selectedHero, int selectedIndex)
 {
     this.selectedHero  = selectedHero;
     this.selectedIndex = selectedIndex;
     SelectedHeroChanged?.Invoke(selectedHero, selectedIndex, state);
     if (selectedHero != null)
     {
         btnDelete.Enabled = true;
         btnModify.Enabled = true;
     }
 }
예제 #3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            state = AddEditState.Add;

            ucHeroList.Enabled = false;
            btnAdd.Enabled     = false;
            btnDelete.Enabled  = false;
            btnModify.Enabled  = false;

            MBHero hero = new MBHero();

            SelectedHeroChanged?.Invoke(hero, -1, state);
        }