CommonTools/ColorPickerCtrl/Resources/Images.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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

namespace CommonTools
{
	class ImagesUtil
	{
		static public ImageList GetToolbarImageList(Type type, string resourceName, Size imageSize, Color transparentColor)
		{
			System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(type, resourceName);
			ImageList imageList = new ImageList();
			imageList.ImageSize = imageSize;
			imageList.TransparentColor = transparentColor;
			imageList.Images.AddStrip(bitmap);
			imageList.ColorDepth = ColorDepth.Depth24Bit;
			return imageList;
		}
	}

	class SelectorImages
	{
		public enum eIndexes
		{
			Right,
			Left,
			Up,
			Down, 
			Donut,
		}

		static private ImageList m_imageList = null;
		static public ImageList ImageList()
		{
			Type t = typeof(SelectorImages);
			if (m_imageList == null)
				m_imageList = ImagesUtil.GetToolbarImageList(t, "ColorPickerCtrl.Resources.colorbarIndicators.bmp", new Size(12, 12), Color.Magenta);
			return m_imageList;
		}
		static public Image Image(eIndexes index)
		{
			return ImageList().Images[(int)index];
		}
	}
	class PopupContainerImages
	{
		public enum eIndexes
		{
			Close,
			Check,
		}

		static private ImageList m_imageList = null;
		static public ImageList ImageList()
		{
			Type t = typeof(SelectorImages);
			if (m_imageList == null)
				m_imageList = ImagesUtil.GetToolbarImageList(t, "ColorPickerCtrl.Resources.popupcontainerbuttons.bmp", new Size(16, 16), Color.Magenta);
后面还有 8 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。