Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void StepImage(string direction, PictureBox c)
- {
- int include1 = 0;
- if (numb.Length == 1)
- {
- include1 = Convert.ToInt32(numb[0].ToString());
- }
- else
- {
- include1 = Convert.ToInt32(numb[0].ToString() + numb[1].ToString());
- }
- if (direction == "right")
- {
- if (include1 < theory.Count - 1)
- {
- c.Image = theory[include1+1];
- numb = include1.ToString();
- leftbtn.Enabled = true;
- if (include1 + 1 == theory.Count - 1)
- {
- rightbtn.Enabled = false;
- }
- }
- }
- else
- {
- if (include1 > 0)
- {
- c.Image = theory[include1 - 1];
- numb = include1.ToString();
- rightbtn.Enabled = true;
- if (include1 - 1 == 0)
- {
- leftbtn.Enabled = false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement