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

namespace WindowsApplication25
{
    public partial class Faces : Form
    {
        public set setform;
        public Faces()
        {
            InitializeComponent();
        }

        // 窗体加载时显示头像图片
        private void Faces_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < ilFaces.Images.Count; i++)
            {
                lvFaces.Items.Add(i.ToString());
                lvFaces.Items[i].ImageIndex = i;
            }            
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            setform = new set();
            if (lvFaces.SelectedItems.Count == 0)
            {
                MessageBox.Show("请选择一个头像！", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                int faceId = lvFaces.SelectedItems[0].ImageIndex;  // 获得当前选中的头像的索引
               
                
               
                this.Close();
            }            
        }

      
     
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}