protected void UpdateIterator() { iterator.Update(ta); if (ta.Empty) { lblPointer.Text = "0/0"; pnlCommands.Enabled = false; btnDelete.Enabled = false; } else { lblPointer.Text = (iterator.Index + 1).ToString() + "/" + ta.Count.ToString(); pnlCommands.Enabled = true; btnDelete.Enabled = true; } VolunteerIterator iterator2 = new VolunteerIterator(ta, iterator.Index); if (!ta.Empty) { pbCurrent.Image = iterator2.Current().Photo; pbCurrent.Visible = true; } else { pbCurrent.Visible = false; } if (iterator2.isNext()) { pbNext.Image = iterator2.Next().Photo; pbNext.Visible = true; } else { pbNext.Visible = false; } if (iterator2.isNext()) { lblNext2.Visible = true; } else { lblNext2.Visible = false; } iterator2 = new VolunteerIterator(ta, iterator.Index); if (iterator2.isPrev()) { pbPrev.Image = iterator2.Prev().Photo; pbPrev.Visible = true; } else { pbPrev.Visible = false; } if (iterator2.isPrev()) { lblPrev2.Visible = true; } else { lblPrev2.Visible = false; } }
private void btnIntroduce_Click(object sender, EventArgs e) { Output(iterator.Current().Introduce()); }