缺少Using指令或程序集引用在这段代码中改怎样修改啊?!
代码如下所示,谢谢帮忙~~~~~~~~~~~using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Resources;
using System.Text;
using System.Windows.Forms;
using
using System.Threading;
namespace 档案管理2_副_
{
class ShowPic1
{
public sealed class ShowPic
{
public event ChangeImageHandler ChangeImage;
private String[] _ArrPicPath;
private Int32 _Index;
private PictureBox _PictureBox;
private void OnChangeImage(String message)
{
ChangeImageHandler temp = (ref ChangeImage, null, null);
if (temp != null)
{
temp(message);
}
}
public ShowPic(PictureBox pictureBox)
{
_PictureBox = pictureBox;
_Index = 0;
}
public void Load(String path, SeachOption seachOption)
{
if (!Directory.Exists(path))
{
OnChangeImage(path +"路径不存在");
throw new DictionaryNotFoundException(path +"路径不存在");
}
_ArrPicPath = (path, "*.jpg", seachOption);
LoadImage();
}
public void Last()
{
lock (_ArrPicPath)
{
if (_Index > 0)
{
_Index--;
}
else
{
OnChangeImage("已是第一张");
return;
}
}
LoadImage();
}
public void Next()
{
lock (_ArrPicPath)
{
if (_Index < _ArrPicPath.Length - 1)
{
_Index++;
}
else
{
OnChangeImage("已是最后一张");
return;
}
}
LoadImage();
}
private void LoadImage()
{
if (_ArrPicPath == null || _ArrPicPath.Length <= 0)
{
OnChangeImage("没有图片");
return;
}
String path=_ArrPicPath [_Index ];
if (File.Exists(path))
{
_PictureBox.Load(path );
OnChangeImage(path );
}
}
}
}
}
错误提示为:1 找不到类型或命名空间名称“ChangeImageHandler”(是否缺少 using 指令或程序集引用?)
2 找不到类型或命名空间名称“SeachOption”(是否缺少 using 指令或程序集引用?)