CommonTools/ColorPickerCtrl/EyedropColorPicker.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
namespace CommonTools
{
class EyedropColorPicker : Control
{
public event EventHandler SelectedColorChanged;
Bitmap m_snapshot;
Bitmap m_icon;
Color m_selectedColor;
float m_zoom = 4;
public int Zoom
{
get { return (int)m_zoom; }
set
{
m_zoom = value;
RecalcSnapshotSize();
}
}
public Color SelectedColor
{
get { return m_selectedColor; }
set
{
if (m_selectedColor == value)
return;
}
}
public EyedropColorPicker()
{
this.DoubleBuffered = true;
m_icon = new Bitmap(typeof(EyedropColorPicker), "ColorPickerCtrl.Resources.eyedropper.bmp");
m_icon.MakeTransparent(Color.Magenta);
}
RectangleF ImageRect
{
get
{
return Util.Rect(ClientRectangle);
}
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
RecalcSnapshotSize();
}
void RecalcSnapshotSize()
{
if (m_snapshot != null)
m_snapshot.Dispose();
后面还有 91 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。