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 Ex01_4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("01.JPG");   //动态加载图像
        }

        private void label2_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("02.JPG");
        }

        private void 窗帘背景ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("03.JPG");   //利用菜单命令动态加载图像
        }

        private void label3_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("03.JPG"); 
        }

        private void label4_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("04.JPG"); 
        }

        private void label5_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("05.JPG"); 
        }

        private void 红花背景ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("01.JPG");
        }

        private void 绿叶背景ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("02.JPG");
        }

        private void 人物背景ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("04.JPG");
        }

        private void 建筑背景ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("05.JPG");
        }

        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();   //关闭窗体
        }
    }
}
