private void autoSell(OwnedGum gum) { MarketGum mGum = _game.CurrentCity.FindGum(gum); _game.Player.SellGum(mGum, gum.Quantity); outputGameState(); }
private void _grdInventory_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { foreach (DataGridViewRow row in _grdInventory.Rows) { if (row.Index != e.RowIndex) { continue; } OwnedGum gum = row.DataBoundItem as OwnedGum; showSellForm(gum); } }
private void showSellForm(OwnedGum gum) { MarketGum marketGum = _game.CurrentCity.FindGum(gum); if (marketGum == null) { return; } if (gum != null) { BuySellForm buySellForm = new BuySellForm(marketGum, _game.Player, Actions.Sell); buySellForm.ShowDialog(this); outputGameState(); } }