コード例 #1
0
 private void OnMoveListViewItem(PokeblockCaseEventArgs e)
 {
     if (MoveListViewItem != null)
     {
         MoveListViewItem(this, e);
     }
 }
コード例 #2
0
 private void OnAddListViewItem(PokeblockCaseEventArgs e)
 {
     if (AddListViewItem != null)
     {
         AddListViewItem(this, e);
     }
 }
コード例 #3
0
        public void TossPokeblockAt(int index)
        {
            inventory.GameSave.IsChanged = true;
            pokeblocks.RemoveAt(index);

            PokeblockCaseEventArgs args = new PokeblockCaseEventArgs();

            args.Index = index;
            OnRemoveListViewItem(args);
        }
コード例 #4
0
 public void RepopulateListView()
 {
     listViewItems.Clear();
     for (int i = 0; i < pokeblocks.Count; i++)
     {
         PokeblockCaseEventArgs args = new PokeblockCaseEventArgs();
         args.Index     = i;
         args.Pokeblock = pokeblocks[i];
         OnAddListViewItem(args);
     }
 }
コード例 #5
0
        public void AddPokeblock(Pokeblock pokeblock)
        {
            if (caseSize == 0 || pokeblocks.Count < caseSize)
            {
                inventory.GameSave.IsChanged = true;
                pokeblocks.Add(new Pokeblock(this, pokeblock.Color, pokeblock.Spicyness, pokeblock.Dryness, pokeblock.Sweetness, pokeblock.Bitterness, pokeblock.Sourness, pokeblock.Feel, pokeblock.Unknown));

                PokeblockCaseEventArgs args = new PokeblockCaseEventArgs();
                args.Index     = pokeblocks.Count - 1;
                args.Pokeblock = pokeblocks[pokeblocks.Count - 1];
                OnAddListViewItem(args);
            }
        }
コード例 #6
0
        public void AddPokeblock(PokeblockColors color, byte spicy, byte dry, byte sweet, byte bitter, byte sour, byte feel, byte unknown)
        {
            if (caseSize == 0 || pokeblocks.Count < caseSize)
            {
                inventory.GameSave.IsChanged = true;
                pokeblocks.Add(new Pokeblock(this, color, spicy, dry, sweet, bitter, sour, feel, unknown));

                PokeblockCaseEventArgs args = new PokeblockCaseEventArgs();
                args.Index     = pokeblocks.Count - 1;
                args.Pokeblock = pokeblocks[pokeblocks.Count - 1];
                OnAddListViewItem(args);
            }
        }
コード例 #7
0
        public void MovePokeblock(int oldIndex, int newIndex)
        {
            inventory.GameSave.IsChanged = true;
            Pokeblock pokeblock = pokeblocks[oldIndex];

            pokeblocks.RemoveAt(oldIndex);
            pokeblocks.Insert(newIndex, pokeblock);

            PokeblockCaseEventArgs args = new PokeblockCaseEventArgs();

            args.OldIndex  = oldIndex;
            args.NewIndex  = newIndex;
            args.Pokeblock = pokeblock;
            OnMoveListViewItem(args);
        }