Source/AdvTree/Design/AdvTreeDesigner.cs

(开头部分) 29KB

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

using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using DevComponents.DotNetBar;
using System.Drawing.Design;
using System.Reflection;

namespace DevComponents.AdvTree.Design
{
	/// <summary>
	/// Represents windows forms designer for the control.
	/// </summary>
	public class AdvTreeDesigner:ParentControlDesigner
	{
		#region Private Variables
//		private Point m_MouseDownPosition=Point.Empty;
//		private bool m_IgnoreMouseUp=false;
//		private bool m_Capture=false;
		private bool m_DragDropStarted=false;
		const string TEMP_NAME="tempDragDropItem";
		const int WM_RBUTTONDOWN=0x0204;
		const int WM_LBUTTONDOWN=0x0201;
//		const int WM_LBUTTONUP=0x0202;
//		const int WM_RBUTTONUP=0x0205;
//		const int WM_MOUSEMOVE=0x0200;
		const int WM_LBUTTONDBLCLK=0x0203;
		
		private Timer m_TimerAdded=null;
		private Timer m_TimerDragDrop=null;
		private bool m_DragLeave=false;
		private bool m_ControlRemoved=false;
		private DateTime m_JustAdded=DateTime.MinValue;
		private bool m_NewControlAdded=false;
		private Point m_MouseDownPoint=Point.Empty;
		#endregion
		
		#region Designer Implementation
		/// <summary>Initializes designer with given component.</summary>
		/// <param name="component">Component to initialize designer with.</param>
		public override void Initialize(IComponent component) 
		{
			base.Initialize(component);
			if(!component.Site.DesignMode)
				return;

			ISelectionService ss =(ISelectionService)GetService(typeof(ISelectionService));
			if(ss!=null)
				ss.SelectionChanged+=new EventHandler(OnSelectionChanged);

			// If our component is removed we need to clean-up
			IComponentChangeService cc=(IComponentChangeService)GetService(typeof(IComponentChangeService));
			if(cc!=null)
			{
				cc.ComponentRemoving+=new ComponentEventHandler(this.OnComponentRemoving);
			}
			
后面还有 933 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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