// // 2002-2005 AlphaSierraPapa // GNU General Public License // // $Revision$ // using System; using System.Xml; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Gui; namespace ICSharpCode.Core { public class ActiveViewContentUntitledAuswerter : IAuswerter { public bool IsValid(object caller, Condition condition) { if (WorkbenchSingleton.Workbench == null || WorkbenchSingleton.Workbench.ActiveWorkbenchWindow == null || WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent == null) { return false; } bool activewindowuntitled = Boolean.Parse(condition.Properties["activewindowuntitled"]); return WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.IsUntitled && activewindowuntitled || !WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.IsUntitled && !activewindowuntitled ; } } }