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

namespace Program3
{
    public partial class Form2 : Form
    {

        public Form2()
        {
            InitializeComponent();
        }
        
        private void ForwardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.BringToFront();
        }

      
        private void Menu3ToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
        {
             pictureBox3.Visible = Menu3ToolStripMenuItem.Checked;
        }

        private void Menu2ToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
        {
            pictureBox2.Visible = Menu2ToolStripMenuItem.Checked;
        }

        private void Menu1ToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
        {
            pictureBox1.Visible = Menu1ToolStripMenuItem.Checked;
        }
        private void GoAllToBack()
        {
            chidemanMenu1.Checked = false;
            chidemanMenu2.Checked = false;
            chidemanMenu3.Checked = false;

        }
        private void chidemanMenu1_Click(object sender, EventArgs e)
        {
            
         //   GoAllToBack();
            pictureBox1.BringToFront();
            chidemanMenu1.Checked = true;
            chidemanMenu2.Checked = false;
            chidemanMenu3.Checked = false;
           
        }
        
        private void chidemanMenu2_Click(object sender, EventArgs e)
        {
            // ya farakhani method zir 
            //GoAllToBack();
            pictureBox2.BringToFront();
            chidemanMenu2.Checked = true;
            chidemanMenu1.Checked = false;
            chidemanMenu3.Checked = false;
     
        }

        private void chidemanMenu3_Click(object sender, EventArgs e)
        {
            // ya farakhani method zir 
            //GoAllToBack();
            pictureBox3.BringToFront();
            chidemanMenu3.Checked = true;
            chidemanMenu1.Checked = false;
            chidemanMenu2.Checked = false;
        
        }

        private void BackToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.SendToBack();
            chidemanMenu3.Checked = false;
            chidemanMenu1.Checked = false;
            chidemanMenu2.Checked = false;

        }

        private void Back3ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            pictureBox3.SendToBack();

            chidemanMenu3.Checked = false;
            chidemanMenu1.Checked = false;
            chidemanMenu2.Checked = false;
        }

       
        private void Back2oolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox2.SendToBack();
            chidemanMenu3.Checked = false;
            chidemanMenu1.Checked = false;
            chidemanMenu2.Checked = false;
        }

        
    }
}
