private void offerButton_Click(object sender, EventArgs e) { to.PicksFromHigher = new List <int>(); to.PicksFromLower = new List <int>(); foreach (int i in myPicks.SelectedIndices) { to.PicksFromLower.Add(myPicksList[i]); } foreach (int i in CPUpicks.SelectedIndices) { to.PicksFromHigher.Add(theirPicksList[i]); } to.PicksFromHigher.Remove(to.pickNumber); double tempValue = 0; foreach (int pick in to.PicksFromLower) { if (pick < 1000) { tempValue += dm.pickValues[pick]; } else { tempValue += dm.futureValues(pick - 1000, LowerCON); } } foreach (int pick in to.PicksFromHigher) { if (pick < 1000) { tempValue -= dm.pickValues[pick]; } else { tempValue -= dm.futureValues(pick - 1000, HigherCON); } } to.offersFromLower.Add(tempValue); to.SetMinTake(); to.status = (int)TradeOfferStatus.HigherResponsePending; approveButton.Enabled = false; offerButton.Enabled = false; resetButton.Enabled = false; }