| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 660 人关注过本帖
标题:缺少Using指令或程序集引用在这段代码中改怎样修改啊?!
只看楼主 加入收藏
一直不安静
Rank: 2
等 级:论坛游民
帖 子:19
专家分:10
注 册:2012-11-23
结帖率:100%
收藏
已结贴  问题点数:9 回复次数:1 
缺少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 指令或程序集引用?)
   
搜索更多相关主题的帖子: 档案管理 private public sealed 
2012-12-20 16:59
mpi
Rank: 8Rank: 8
等 级:蝙蝠侠
威 望:5
帖 子:99
专家分:872
注 册:2012-11-14
收藏
得分:9 
用了插件的,在项目中引用一下插件的.dll文件

厌烦自私贪婪和不劳而获的人。
厌烦代码各种求,而不思进取的人。
本人也是菜鸟,求上进,踏实不浮躁的朋友共同进步。
2012-12-20 17:28
快速回复:缺少Using指令或程序集引用在这段代码中改怎样修改啊?!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.038152 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved