public void removeItens(int index) { objParameters = new ObjParameters(); ObjItem objItem = objParameters.GetItens()[index]; this.Peso -= objItem.Peso; this.Valor -= objItem.Valor; this.listItens[index] = 0; }
public void addItens(int index, int value) { objParameters = new ObjParameters(); ObjItem objItem = objParameters.GetItens()[index]; if (value == 1) { this.Peso += objItem.Peso; this.Valor += objItem.Valor; } this.listItens.Add(value); }