Exemplo n.º 1
0
            void AddItem(GamePackRep gamePack)
            {
                var newItem = new PackageListItem(gamePack, Game);

                newItem.ItemSelected   += ItemSelected;
                newItem.ItemDeselected += ItemDeselected;
                listView.AddItem(newItem);
            }
Exemplo n.º 2
0
            void RemoveButtonReleased(ReleasedEventArgs obj)
            {
                PackageListItem selectedItem = GetSelectedItem();

                try {
                    Game.PackageManager.RemoveGamePack(selectedItem.Pack);
                    RemoveItem(selectedItem);
                }
                catch (FatalPackagingException e) {
                    Game.ErrorExit(e.Message);
                }
                catch (ArgumentException e) {
                    MenuUIManager.ErrorPopUp.DisplayError("Error", e.Message, proxy);
                }
                catch (PackageLoadingException e) {
                    MenuUIManager.ErrorPopUp.DisplayError("Error", e.Message, proxy);
                }
            }
Exemplo n.º 3
0
 void RemoveItem(PackageListItem item)
 {
     listView.RemoveItem(item);
     item.Dispose();
 }