Source/ColorPickerItem/ColorContrastControl.cs

(开头部分) 6KB

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

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Windows.Forms;

namespace DevComponents.DotNetBar.ColorPickerItem
{
    [ToolboxItem(false)]
	internal class ColorContrastControl : System.Windows.Forms.UserControl
	{
		#region Events
		public event EventHandler SelectedColorChanged;
		#endregion
		
		#region Private Variables
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
		private Color m_SelectedColor = Color.White;
		private Bitmap m_BlendBitmap=null;
		private double m_SelectedLuminance = -1;
		#endregion
		
		#region Constructor, Dispose
		public ColorContrastControl()
		{
			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.UserPaint, true);
			this.SetStyle(ControlStyles.Opaque, true);
			this.SetStyle(DisplayHelp.DoubleBufferFlag, true);
			this.SetStyle(ControlStyles.ResizeRedraw, true);
			this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
			
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();
		}

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		#endregion
		
		#region Internal Implementation
		protected override void OnPaint(PaintEventArgs e)
后面还有 210 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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