📄 stylesheetassignedcondition.cs
字号:
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision: 915 $</version>
// </file>
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
using System;
namespace ICSharpCode.XmlEditor
{
/// <summary>
/// Determines whether the active XML document has been assigned
/// an XSLT stylesheet.
/// </summary>
public class StylesheetAssignedCondition : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
if (window != null) {
XmlView view = window.ActiveViewContent as XmlView;
if (view != null) {
return view.StylesheetFileName != null;
}
}
return false;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -