private void ChangeBtm_MouseDown(object sender, MouseButtonEventArgs e) { if (SelectedBuff != null) { ChangingCourt = SelectedBuff; TaskWindowBuy TW = new TaskWindowBuy(0, ChangingCourt.GetAmount(), this, 1); TW.Show(); } }
private void DeleteCourtElement() { if (SelectedBuff != null) { int id; int buff; int i; int j = 0; PositionBlankBuy[] NewCourt = new PositionBlankBuy[Court.Length - 1]; id = SelectedBuff.GetId(); buff = Storage[id].GetAmount() - SelectedBuff.GetAmount(); Storage[id].ChangeAmount(buff); CourtViewer.Children.Remove(SelectedBuff); for (i = 0; i < Court.Length; i++) { if (Court[i] != SelectedBuff) { NewCourt[j] = Court[i]; j++; } } Court = NewCourt; } }