Source/ElementStyle.cs

(开头部分) 99KB

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

using System;
using System.Drawing;
using System.ComponentModel;

#if AdvTree
using DevComponents.Tree.Design;
namespace DevComponents.Tree
#elif DOTNETBAR
using DevComponents.DotNetBar.Design;
namespace DevComponents.DotNetBar
#endif
{
	/// <summary>
	/// Represents visual style of an User Interface Element.
	/// </summary>
	[System.ComponentModel.ToolboxItem(false),System.ComponentModel.DesignTimeVisible(false),TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
	public class ElementStyle:System.ComponentModel.IComponent
	{
		#region Events
		/// <summary>
		/// Occurs when appearance property of the style has changed.
		/// </summary>
		public event EventHandler StyleChanged;
		/// <summary>
		/// Occurs when component is Disposed.
		/// </summary>
		[System.ComponentModel.Description("Occurs when component is Disposed.")]
		public event EventHandler Disposed;
		#endregion

		#region Private Variables
		const int DEFAULT_CORNER_DIAMETER=8;

		private Color m_BackColor=Color.Empty;
		private eColorSchemePart m_BackColorSchemePart=eColorSchemePart.None;
		private Color m_BackColor2=Color.Empty;
		private eColorSchemePart m_BackColor2SchemePart=eColorSchemePart.None;
		private int m_BackColorGradientAngle=0;
		private Image m_BackgroundImage=null;
		private eStyleBackgroundImage m_BackgroundImagePosition=eStyleBackgroundImage.Stretch;
		private byte m_BackgroundImageAlpha=255;
        private eGradientType m_BackColorGradientType = eGradientType.Linear;

		// Font
		private Font m_Font=null;

		// Text Formating
		private bool m_WordWrap=false;
		private eStyleTextAlignment m_TextAlignment=eStyleTextAlignment.Near;
		private eStyleTextAlignment m_TextLineAlignment=eStyleTextAlignment.Center;
		private eStyleTextTrimming m_TextTrimming=eStyleTextTrimming.EllipsisCharacter;
		//private string m_TextFormat="";

		private Color m_TextColor=Color.Empty;
		private eColorSchemePart m_TextColorSchemePart=eColorSchemePart.None;
		private Color m_TextShadowColor=Color.Empty;
		private eColorSchemePart m_TextShadowColorSchemePart=eColorSchemePart.None;
		private Point m_TextShadowOffset=Point.Empty;

		// Style margins
后面还有 2547 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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