CommonTools/ColorPickerCtrl/ColorBar.cs
(开头部分) 7KB这里只显示每个文件的开头 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;
namespace CommonTools
{
class ColorSlider : LabelRotate
{
public event EventHandler SelectedValueChanged;
Orientation m_orientation = Orientation.Vertical;
public Orientation Orientation
{
get { return m_orientation; }
set { m_orientation = value; }
}
public enum eNumberOfColors
{
Use2Colors,
Use3Colors,
}
eNumberOfColors m_numberOfColors = eNumberOfColors.Use3Colors;
public eNumberOfColors NumberOfColors
{
get { return m_numberOfColors; }
set { m_numberOfColors = value; }
}
public enum eValueOrientation
{
MinToMax,
MaxToMin,
}
eValueOrientation m_valueOrientation = eValueOrientation.MinToMax;
public eValueOrientation ValueOrientation
{
get { return m_valueOrientation; }
set { m_valueOrientation = value; }
}
float m_percent = 0;
public float Percent
{
get { return m_percent; }
set
{
// ok so it is not really percent, but a value between 0 - 1.
if (value < 0) value = 0;
if (value > 1) value = 1;
if (value != m_percent)
{
m_percent = value;
if (SelectedValueChanged != null)
SelectedValueChanged(this, null);
Invalidate();
}
后面还有 225 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。