예제 #1
0
        public Func <Window, bool> CreateWindowFilter()
        {
            return(w =>
            {
                // Custom filter and common windows to filter.
                if (!_windowManagerFilter(w) || _settings.CommonIgnoreWindows.Window.FirstOrDefault(i => i.Equals(w.WindowInfo)) != null)
                {
                    return false;
                }

                // Check whether the process needs to be managed at all.
                ApplicationBehaviorsProcess process = GetProcessSettings(w.WindowInfo);
                if (!process.ShouldHandleProcess)
                {
                    return false;
                }

                // Process specific settings.
                ApplicationBehavior.Window listedWindow = process.IgnoreWindows.Window.FirstOrDefault(i => i.Equals(w.WindowInfo));
                return process.IgnoreWindows.Mode == ApplicationBehaviorsProcessIgnoreWindowsMode.NoneExcept
                                        ? listedWindow == null
                                        : listedWindow != null;
            });
        }
예제 #2
0
 public bool Equals( Window other )
 {
     return
         String.Equals( classNameField, other.classNameField ) &&
         String.Equals( titleField, other.titleField ) &&
         visibleField == other.visibleField;
 }