using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ex03_4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            this.panel1.Left = this.panel1.Left + 10;
            if (this.panel1.Left > this.Width + 20)
            {
                this.panel1.Left = -this.panel1.Width;
            }
        }

        private void pictureBox1_MouseEnter(object sender, EventArgs e)
        {
            timer1.Enabled = false;
        }

        private void pictureBox1_MouseLeave(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox2_MouseEnter(object sender, EventArgs e)
        {
            timer1.Enabled = false;
        }

        private void pictureBox2_MouseLeave(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

        private void pictureBox3_MouseEnter(object sender, EventArgs e)
        {
            timer1.Enabled = false;
        }

        private void pictureBox4_MouseEnter(object sender, EventArgs e)
        {
            timer1.Enabled = false;
        }

        private void pictureBox4_MouseLeave(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

        private void pictureBox3_MouseLeave(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }
    }
}
