⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractsharpquerycommand.cs

📁 SharpDevelop2.0.0 c#开发免费工具
💻 CS
字号:
// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="Luc Morin" email=""/>
//     <version>$Revision: 993 $</version>
// </file>

using System;
using SharpQuery.Gui.TreeView;
using ICSharpCode.SharpDevelop;
using ICSharpCode.Core;

namespace SharpQuery.Commands
{
	/// <summary>
	/// Base class of all commands of SharpQuery Addin
	/// </summary>
	public abstract class AbstractSharpQueryCommand : AbstractMenuCommand
	{
		protected ISharpQueryNode sharpQueryNode = null;

		/// <summary>
		/// get the selected <see cref="SharpQuery.Gui.TreeView.ISharpQueryNode"> SharpQuery node </see>
		/// and Enabled or disabled the command
		/// <remarks> If the selected node is <code>null</code> or this is not a <see cref="SharpQuery.Gui.TreeView.ISharpQueryNode"> SharpQuery node </see>, return <code>false</code> (disable the menu)</remarks>
		/// </summary>
		public override bool IsEnabled
		{
			get
			{
				SharpQueryTree sharpQueryTree;
				sharpQueryTree = this.Owner as SharpQueryTree;

				if ((sharpQueryTree != null) && (sharpQueryTree.SelectedNode != null))
				{
					this.sharpQueryNode = sharpQueryTree.SelectedNode as ISharpQueryNode;
				}
				else
				{
					this.sharpQueryNode = null;
				}

				return (this.sharpQueryNode != null);
			}
			set { }

		}

		/// <summary>
		/// Create a new SharpQueryCommand
		/// </summary>
		public AbstractSharpQueryCommand()
			: base()
		{
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -