Ejemplo n.º 1
0
        private void  InitializeTimeUnitsCombo(IResource cond)
        {
            string text = EditTimeSpanConditionForm.Condition2Text(cond);

            string[] fields = text.Split(' ');
            numericOlderValue.Value = int.Parse(fields[1]);
            comboTimeUnits.Text     = fields[2];
        }
Ejemplo n.º 2
0
        private static bool  CheckExpirationExceptions(IResourceList exceptions)
        {
            if (exceptions.IndexOf(Core.FilterRegistry.Std.ResourceIsFlagged) != -1)
            {
                exceptions = exceptions.Minus(Core.FilterRegistry.Std.ResourceIsFlagged.ToResourceList());
                exceptions = exceptions.Minus(Core.FilterRegistry.Std.ResourceIsAnnotated.ToResourceList());
            }
            exceptions = exceptions.Minus(Core.FilterRegistry.Std.ResourceIsCategorized.ToResourceList());
            exceptions = exceptions.Minus(Core.FilterRegistry.Std.ResourceIsUnread.ToResourceList());

            if (exceptions.Count == 1)
            {
                IResource cond     = exceptions[0];
                IResource template = cond.GetLinkProp("TemplateLink");
                if (template != null && template.Id == Core.FilterRegistry.Std.ReceivedInTheTimeSpanX.Id)
                {
                    string   text   = EditTimeSpanConditionForm.Condition2Text(cond);
                    string[] fields = text.Split(' ');
                    return(fields[0].ToLower() == "last");
                }
            }

            return(false);
        }