Exemple #1
0
        public IResource ReregisterRule(IResource baseRes, string name, string[] types,
                                        IResource[] conditions, IResource[] exceptions,
                                        bool isBold, bool isItalic, bool isUnderlined, bool isStrikeout,
                                        string foreColor, string backColor)
        {
            ResourceProxy proxy = new ResourceProxy(baseRes);

            proxy.BeginUpdate();
            FilterRegistry.InitializeView(proxy, name, types, conditions, exceptions);
            AddSpecificParams(baseRes, name, isBold, isItalic, isUnderlined, isStrikeout, foreColor, backColor);
            return(baseRes);
        }
Exemple #2
0
        public IResource RegisterRule(string name, string[] types, IResource[] conditions, IResource[] exceptions,
                                      bool isBold, bool isItalic, bool isUnderlined, bool isStrikeout,
                                      string foreColor, string backColor)
        {
            IResource     rule  = FindRule(name);
            ResourceProxy proxy = GetRuleProxy(rule);

            FilterRegistry.InitializeView(proxy, name, types, conditions, exceptions);
            AddSpecificParams(proxy.Resource, name, isBold, isItalic, isUnderlined, isStrikeout, foreColor, backColor);
            CheckRuleInvisiblity(proxy.Resource, conditions);
            return(proxy.Resource);
        }
Exemple #3
0
        public IResource  ReregisterTrayIconRule(IResource rule, string name, string[] types,
                                                 IResource[][] conditions, IResource[] exceptions,
                                                 Icon icon)
        {
            UnregisterIconWatcherImpl(rule.DisplayName, false);
            ResourceProxy proxy = new ResourceProxy(rule);

            proxy.BeginUpdate();
            FilterRegistry.InitializeView(proxy, name, types, conditions, exceptions);

            Core.ResourceAP.RunUniqueJob(new AssignmentDelegate(AddSpecificParams), rule, name, icon);
            InitializeWatcher(rule, name, icon);
            return(rule);
        }
Exemple #4
0
        public IResource  RegisterTrayIconRule(string name, string[] types,
                                               IResource[][] conditions, IResource[] exceptions,
                                               Icon icon)
        {
            IResource rule = FindRule(name);

            if (!WatchedLists.ContainsKey(name))
            {
                Trace.WriteLine("TrayIconManager -- Registering publicly rule [" + name + "].");

                ResourceProxy proxy = GetRuleProxy(rule);
                FilterRegistry.InitializeView(proxy, name, types, conditions, exceptions);   // proxy.EndUpdate inside
                Core.ResourceAP.RunJob(new AssignmentDelegate(AddSpecificParams), proxy.Resource, name, icon);
                InitializeWatcher(proxy.Resource, name, icon);
                return(proxy.Resource);
            }

            Trace.WriteLine("TrayIconManager -- rule [" + name + "] is already registered.");
            return(rule);
        }