• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ImageList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ImageList的典型用法代码示例。如果您正苦于以下问题:C# ImageList类的具体用法?C# ImageList怎么用?C# ImageList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ImageList类属于命名空间,在下文中一共展示了ImageList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Images

 public void Images(IManosContext ctx, int index)
 {
     var images = new ImageList();
       var image = images[index];
       ctx.Response.End("Image: {0}, size {1} x {2}", image.Name, image.Width,
        image.Height);
 }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:7,代码来源:Routes.cs


示例2: Clone

 public ImageList Clone() {
   ImageList n = new ImageList();
   n.images = this.images;
   n.transparentColor = this.transparentColor;
   n.imageSize = this.imageSize;
   return n;
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:7,代码来源:ImageList.cs


示例3: Execute

 public override bool Execute()
 {
     ActiveDisplay.Delete();
       var images = new ImageList();
       ActiveImage = images[images.Count - 1];
       return true;
 }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:7,代码来源:CloseEvent.cs


示例4: GetImageList

	private ImageList GetImageList()
	{
		ImageList imageList = new ImageList();
		imageList.Images.Add(new Bitmap(typeof(DcopBrowser), "Class.bmp"));
		imageList.Images.Add(new Bitmap(typeof(DcopBrowser), "Method.bmp"));
		return imageList;
	}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:DcopBrowser.cs


示例5: BooProjectNode

        static BooProjectNode()
        {
            imageList =
                Utilities.GetImageList(
                typeof(BooProjectNode).Assembly.GetManifestResourceStream(
                "Boo.BooLangProject.Resources.BooProjectNode.bmp"));

            ImageList booFileNodeImageList;
            string booFileResourceString = "Boo.BooLangProject.Resources.BooFileNode.bmp";
            try
            {

                booFileNodeImageList =
                    Utilities.GetImageList(
                    typeof(BooProjectNode).Assembly.GetManifestResourceStream(
                    booFileResourceString));
            }
            catch (Exception e)
            {
                throw;
            }

            if (booFileNodeImageList.Images.Count != 1)
                throw new FileNotFoundException("Cannot find Boo FileNode Icon at: " + booFileResourceString);
            else
                imageList.Images.Add(booFileNodeImageList.Images[0]);
        }
开发者ID:jagregory,项目名称:boolangstudio,代码行数:27,代码来源:BooProjectNode.cs


示例6: Character

 public Character()
 {
     _passives = new List<Passive>();
     _skills = new List<Ability>();
     physiologies = new List<Physiology>();
     images = new ImageList();
 }
开发者ID:koxerion,项目名称:HentaiHeroes,代码行数:7,代码来源:Character.cs


示例7: MForm4

    public MForm4()
    {
        Size = new Size(250, 200);
        Text = "Simple toolbar";

        toolBar = new ToolBar();
        toolBar.Parent = this;
        toolBarIcons = new ImageList();
        save = new ToolBarButton();
        exit = new ToolBarButton();

        save.ImageIndex = 0;
        save.Tag = "Save";
        exit.ImageIndex = 1;
        exit.Tag = "Exit";

        toolBar.ImageList = toolBarIcons;
        toolBar.ShowToolTips = true;
        toolBar.Buttons.AddRange(new ToolBarButton[] {save, exit});
        toolBar.ButtonClick += new ToolBarButtonClickEventHandler(OnClicked);

        toolBarIcons.Images.Add(Image.FromFile("new.png"));
        toolBarIcons.Images.Add(Image.FromFile("exit.png"));

        CenterToScreen();
    }
开发者ID:sciruela,项目名称:MonoWinformsTutorial,代码行数:26,代码来源:toolbar.cs


示例8: CCSProjectNode

 static CCSProjectNode()
 {
     imageList =
         Utilities.GetImageList(
             typeof(CCSProjectNode).Assembly.GetManifestResourceStream(
                 "CCS.Projects.Resources.CCSProjectNode.bmp"));
 }
开发者ID:einaregilsson,项目名称:Process-Language-Runtime,代码行数:7,代码来源:CCSProjectNode.cs


示例9: Clone

 public ImageList Clone() {
   ImageList n = new ImageList();
   n.images = (ArrayList)this.images.Clone();
   n.Images = new Images(n.images);
   n.transparentColor = this.transparentColor;
   n.imageSize = this.imageSize;
   return n;
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:8,代码来源:ImageList.cs


示例10: ImageHandler

 /// <summary>
 /// Builds an ImageHandler object from a Stream providing the bitmap that
 /// stores the images for the image list.
 /// </summary>
 public ImageHandler(Stream resourceStream)
 {
     if (null == resourceStream)
     {
         throw new ArgumentNullException("resourceStream");
     }
     imageList = Utilities.GetImageList(resourceStream);
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:12,代码来源:ImageHandler.cs


示例11: GenerateImage

    protected void GenerateImage()
    {
        ImageList list = new ImageList();
        list.Images.Add(new Icon("..\\..\\hd.ico"));
        list.Images.Add(new Icon("..\\..\\folder.ico"));

        ImageList = list;
    }
开发者ID:BackupTheBerlios,项目名称:iiphoto-svn,代码行数:8,代码来源:CodeFile1.cs


示例12: MainForm

	public MainForm ()
	{
		string dir = AppDomain.CurrentDomain.BaseDirectory;

		// 
		// _components
		// 
		_components = new Container ();
		// 
		// _imageList
		// 
		_imageList = new ImageList (_components);
		_imageList.ImageSize = new Size (16, 8);
		_imageList.Images.Add (new Icon (Path.Combine (dir, "Folder.ico")));
		_imageList.Images.Add (new Icon (Path.Combine (dir, "Computer.ico")));
		_imageList.Images.Add (new Icon (Path.Combine (dir, "Services.ico")));
		_imageList.TransparentColor = Color.Transparent;
		// 
		// _tabControl
		// 
		_tabControl = new TabControl ();
		_tabControl.Dock = DockStyle.Top;
		_tabControl.Height = 50;
		_tabControl.HotTrack = true;
		_tabControl.ImageList = _imageList;
		_tabControl.SelectedIndex = 1;
		Controls.Add (_tabControl);
		// 
		// _folderTab
		// 
		_folderTab = new TabPage ();
		_folderTab.Height = 100;
		_folderTab.ImageIndex = 0;
		_folderTab.Text = "Folder";
		_tabControl.Controls.Add (_folderTab);
		// 
		// _computerTab
		// 
		_computerTab = new TabPage ();
		_computerTab.ImageIndex = 1;
		_computerTab.Text = "Computer";
		_tabControl.Controls.Add (_computerTab);
		// 
		// _servicesTab
		// 
		_servicesTab = new TabPage ();
		_servicesTab.ImageIndex = 2;
		_servicesTab.Text = "Services";
		_tabControl.Controls.Add (_servicesTab);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 50);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #81837";
		Load += new EventHandler (MainForm_Load);
	}
开发者ID:mono,项目名称:gert,代码行数:58,代码来源:MainForm.cs


示例13: Main

	static void Main ()
	{
		ResourceManager resMgr = new ResourceManager (typeof (MainForm));
		
		ImageList imgList = new ImageList ();
		imgList.ColorDepth = ColorDepth.Depth16Bit;
		imgList.ImageSize = new Size (16, 16);
		imgList.ImageStream = ((ImageListStreamer) (resMgr.GetObject ("Locs.ImageStream")));
		imgList.TransparentColor = Color.Transparent;
	}
开发者ID:mono,项目名称:gert,代码行数:10,代码来源:MainForm.cs


示例14: ControlRequestHeaderSetting

        public ControlRequestHeaderSetting()
        {
            InitializeComponent();
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            ImageList ImgList = new ImageList();
            ImgList.ImageSize = new Size(1, 25);
            lv_header.SmallImageList = ImgList;

            rightMenu_Header.Opening += rightMenu_Header_Opening;
            lv_header.AfterEditSubItem += lv_header_AfterEditSubItem;
        }
开发者ID:GHubgenius,项目名称:Altman,代码行数:12,代码来源:ControlRequestHeaderSetting.cs


示例15: ConvertToXPM

 /// <summary>
 /// cicles an image list object to convert contained images into xpm
 /// at the same time we add converted images into an arraylist that lets us to retrieve images later	
 /// </summary>
 /// <param name="imageList">The image list to transform.</param>
 /// <param name="transparentColor">The overriding transparent Color</param>
 /// <returns></returns>
 static public List<string> ConvertToXPM(ImageList imageList, string transparentColor)
 {
     List<string> xpmImages = new List<string>();
     foreach (Image image in imageList.Images)
     {
         if (image is Bitmap)
         {
             xpmImages.Add(ConvertToXPM(image as Bitmap, transparentColor));
         }
     }
     return xpmImages;
 }
开发者ID:nguyenhuuhuy,项目名称:mygeneration,代码行数:19,代码来源:XpmAdapter.cs


示例16: Main

	static int Main ()
	{
		Bitmap b = new Bitmap (1, 1);
		b.SetPixel (0, 0, Color.FromArgb (0, 128, 0));

		ImageList il = new ImageList ();
		il.Images.Add (b);

		if (Color.FromArgb (0, 128, 0) != (il.Images [0] as Bitmap).GetPixel (0, 0))
			return 1;
		return 0;
	}
开发者ID:mono,项目名称:gert,代码行数:12,代码来源:test.cs


示例17: StatusStripExam

    public StatusStripExam()
    {
        this.Text = "StatusStrip 예제";

        ImageList imglst = new ImageList();
        imglst.TransparentColor = Color.Black;
        imglst.Images.Add("Color", new Bitmap(GetType(), "StatusStripExam.ColorHS.BMP"));
        imglst.Images.Add("Comment", new Bitmap(GetType(), "StatusStripExam.CommentHS.bmp"));

        StatusStrip status = new StatusStrip();
        status.Parent = this;
        status.ImageList = imglst;

        color_btn = new ToolStripButton();
        color_btn.Image = imglst.Images[0];
        color_btn.Click += EventProc;
        status.Items.Add(color_btn);

        comment_btn = new ToolStripButton();
        comment_btn.ImageKey = "Comment";
        comment_btn.Click += EventProc;
        status.Items.Add(comment_btn);

        // 메뉴 구분선 넣기
        ToolStripSeparator item_sep = new ToolStripSeparator();
        status.Items.Add(item_sep);

        txt_box = new ToolStripComboBox();
        txt_box.ToolTipText = "글꼴 선택";
        txt_box.Text = "글꼴 선택";
        txt_box.Items.Add("궁서체");
        txt_box.Items.Add("돋움체");
        txt_box.Items.Add("바탕체");
        status.Items.Add(txt_box);

        label = new ToolStripLabel();
        label.Size = new Size(100, 10);
        status.Items.Add(label);

        // 프로그래스바 설정
        prog_bar = new ToolStripProgressBar();

        prog_bar.Size = new Size(100, 10);
        prog_bar.Maximum = 100;
        prog_bar.Minimum = 0;
        status.Items.Add(prog_bar);

        Timer timer = new Timer();
        timer.Tick += new EventHandler(TimerProc);
        timer.Interval = 1000;
        timer.Start();
    }
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:52,代码来源:Program.cs


示例18: GetIcon

    public static Icon GetIcon(string strPath, bool selected, ImageList imageList)
    {
        SHFILEINFO info = new SHFILEINFO(true);
            int cbFileInfo = Marshal.SizeOf(info);
            SHGFI flags;
            if (!selected)
                flags = SHGFI.SHGFI_ICON | SHGFI.SHGFI_SMALLICON;
            else
                flags = SHGFI.SHGFI_ICON | SHGFI.SHGFI_SMALLICON | SHGFI.SHGFI_OPENICON;

            SHGetFileInfo(strPath, 256, out info, (uint)cbFileInfo, flags);
            return Icon.FromHandle(info.hIcon);
    }
开发者ID:sunamo,项目名称:OperaExtensionCreator,代码行数:13,代码来源:FolderTreeView.cs


示例19: ToolStripExam

    public ToolStripExam()
    {
        this.Text = "ToolStrip 예제";

        // 이미지리스트 초기화
        ImageList imglst = new ImageList();
        imglst.TransparentColor = Color.Black;
        imglst.Images.Add("Copy", new Bitmap(GetType(), "ToolStripExam.CopyHS.bmp"));
        imglst.Images.Add("CopyFolder", new Bitmap(GetType(), "ToolStripExam.CopyFolderHS.bmp"));
        imglst.Images.Add("Cut", new Bitmap(GetType(), "ToolStripExam.CutHS.bmp"));

        // 툴바 생성
        ToolStrip tool = new ToolStrip();
        tool.Parent = this;     // 부모
        tool.ImageList = imglst;// 이미지 리스트 설정

        // 1. 툴바에 버튼 생성
        copy_btn = new ToolStripButton();
        copy_btn.ToolTipText = "복사";
        copy_btn.Image = imglst.Images[0];  // 이미지 설정1
        copy_btn.Click += EventProc;
        tool.Items.Add(copy_btn);

        // 2. 툴바에 버튼 생성
        copyfolder_btn = new ToolStripButton();
        copyfolder_btn.ToolTipText = "디렉토리 복사";
        copyfolder_btn.ImageKey = "CopyFolder"; //이미지설정2
        copyfolder_btn.Click += EventProc;
        tool.Items.Add(copyfolder_btn);

        // 3. 메뉴 구분선 넣기
        ToolStripSeparator item_sep = new ToolStripSeparator();
        tool.Items.Add(item_sep);

        // 4. 툴바에 버튼 생성
        cut_btn = new ToolStripButton();
        cut_btn.ToolTipText = "오려두기";
        cut_btn.ImageIndex = 2;         // 이미지설정3
        cut_btn.Click += EventProc;
        tool.Items.Add(cut_btn);

        // 5. 툴바에 콤보박스 추가
        txt_box = new ToolStripComboBox();
        txt_box.ToolTipText = "글꼴 선택";
        txt_box.Text = "글꼴 선택";
        txt_box.Items.Add("궁서체");
        txt_box.Items.Add("돋움체");
        txt_box.Items.Add("바탕체");
        txt_box.Click += FontDrawProc;
        tool.Items.Add(txt_box);
    }
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:51,代码来源:Program.cs


示例20: Execute

        public override bool Execute()
        {
            ImageList images = new ImageList();
              int index = images.GetIndex(ActiveImage);

              int newIndex = index + _offset;

              // Fix me: should we wrap around?

              if (newIndex > 0 && newIndex < images.Count)
            {
              ActiveImage = images[newIndex];
            }

              return true;
        }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:16,代码来源:SelectDocumentEvent.cs



注:本文中的ImageList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ImageMap类代码示例发布时间:2022-05-24
下一篇:
C# ImageLayout类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap