Source/DotNetBarManagerDesigner.cs

(开头部分) 19KB

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

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Reflection;
using System.Collections;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Summary description for DotNetBarDesigner.
	/// </summary>
	public class DotNetBarManagerDesigner:System.ComponentModel.Design.ComponentDesigner,IDesignerServices
	{
		private bool m_PopupProvider=false;
		private bool m_Selected=false;
		
		public override DesignerVerbCollection Verbs 
		{
			get 
			{
				DesignerVerb[] verbs = new DesignerVerb[] {new DesignerVerb("Edit DotNetBar", new EventHandler(OnEditDotNetBar))															  ,
					new DesignerVerb("Enable Document Docking", new EventHandler(OnEnableDocumentDocking))};
				return new DesignerVerbCollection(verbs);
			}
		}

		public override void DoDefaultAction()
		{
			DotNetBarManager dbm=this.Component as DotNetBarManager;
			if(dbm!=null)
			{
				dbm.Customize(this);
			}
		}

		protected override void Dispose(bool disposing) 
		{
			// Unhook events
			if(disposing)
			{
				IComponentChangeService cc=(IComponentChangeService)GetService(typeof(IComponentChangeService));
				if(cc!=null)
					cc.ComponentRemoving-=new ComponentEventHandler(this.OnComponentRemoving);
				ISelectionService ss = (ISelectionService)GetService(typeof(ISelectionService));
				if (ss!=null)
					ss.SelectionChanged-=new EventHandler(OnSelectionChanged);
			}

			base.Dispose(disposing);
		}

		private void ComponentRenamed(object sender, ComponentRenameEventArgs e)
		{
			IDesignerHost dh=(IDesignerHost)GetService(typeof(IDesignerHost));
			if(dh==null)
				return;

			if(e.Component==dh.RootComponent || e.Component==this.Component)
			{
				DotNetBarManager m=this.Component as DotNetBarManager;
后面还有 568 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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