Exemple #1
0
 public void Watch()
 {
     _categoriesList = Core.ResourceStore.GetAllResourcesLive("Category");
     _categoriesList.ResourceChanged += new ResourcePropIndexEventHandler(CategoryChanged);
     _categoriesList.AddPropertyWatch(Core.Props.Parent);
     _categoriesList.AddPropertyWatch(Core.Props.Name);
 }
Exemple #2
0
 private void Init()
 {
     _textStyle         = new TextStyle(FontStyle.Regular, Color.Green, SystemColors.Window);
     _allLiveContainers = Core.ResourceStore.FindResourcesWithPropLive(null, Core.Props.ShowTotalCount);
     _allLiveContainers.AddPropertyWatch(_itemLink);
     if (_folderLink >= 0 && _folderLink != _itemLink)
     {
         _allLiveContainers.AddPropertyWatch(_itemLink);
     }
     _allLiveContainers.ResourceChanged += OnContainerChanged;
 }
Exemple #3
0
        public void    ShowAnnotation(IResource res, bool isPersistentMode, bool focus)
        {
            _resource        = res;
            IsPersistentMode = isPersistentMode;
            SourceText       = res.GetPropText(Core.Props.Annotation);

            // [Clear and] Set a watcher on the annotation text which
            // can be changed outside the Omea.
            if (_ResourceChangeWatcher != null)
            {
                _ResourceChangeWatcher.ResourceChanged -= _ResourceChangeWatcher_ResourceChanged;
                _ResourceChangeWatcher.Dispose();
            }
            _ResourceChangeWatcher = _resource.ToResourceListLive();
            _ResourceChangeWatcher.AddPropertyWatch(Core.Props.Annotation);
            _ResourceChangeWatcher.ResourceChanged += _ResourceChangeWatcher_ResourceChanged;

            WriteText(SourceText);

            if (_defaultPosition)
            {
                Bounds           = GetDefaultPosition();
                _defaultPosition = false;
            }

            Show();
            if (!focus)
            {
                Core.ResourceBrowser.FocusResourceList();
            }
            else
            {
                Focus();
            }
        }
Exemple #4
0
        public ExpirationRuleManager()
        {
            IResource dummyCond = Core.ResourceStore.FindUniqueResource(FilterManagerProps.ConditionResName, "Name", "DummyExpCondition");

            if (dummyCond == null)
            {
                dummyCond = Core.FilterRegistry.CreateStandardCondition("DummyExpCondition", "DummyExpCondition", null, "Id", ConditionOp.Gt, "0");
                dummyCond.SetProp("Invisible", true);
            }
            DummyConditionList = new IResource[1] {
                dummyCond
            };

            ExpRuleLinkId          = Core.ResourceStore.PropTypes["ExpirationRuleLink"].Id;
            ExpRuleOnDeletedLinkId = Core.ResourceStore.PropTypes["ExpirationRuleOnDeletedLink"].Id;
            ExpRules = Core.ResourceStore.FindResourcesWithPropLive(FilterManagerProps.RuleResName, "IsExpirationFilter");
            ExpRules.AddPropertyWatch(ExpRuleLinkId);
            ExpRules.ResourceChanged += RuleLinkageChanged;

            //  Duplicate registering from FilterManage due to the
            //  indeterminicity of the order of calls from the Pico contaner
            //  to its managed classes.
            Core.ResourceStore.PropTypes.Register("DeleteRelatedContact", PropDataType.Bool);

            Core.ResourceAP.QueueJobAt(DateTime.Now.AddMinutes(10.0), new MethodInvoker(CleanDeletedItems));
        }
Exemple #5
0
 public void Watch()
 {
     _ABList = Core.ResourceStore.FindResourcesWithPropLive("AddressBook", PROP.EntryID);
     _ABList.AddPropertyWatch(Core.Props.Name);
     _ABList.ResourceChanged  += new ResourcePropIndexEventHandler(_ABList_ResourceChanged);
     _ABList.ResourceDeleting += new ResourceIndexEventHandler(_ABList_ResourceDeleting);
 }
Exemple #6
0
 public AddressBookWatcher(IResource importedAB)
 {
     _importedAB                 = importedAB;
     _contacts                   = _importedAB.GetLinksOfTypeLive("Contact", "InAddressBook");
     _contacts.ResourceAdded    += new ResourceIndexEventHandler(OnImportedContactAdded);
     _contacts.ResourceChanged  += new ResourcePropIndexEventHandler(OnImportedContactChanged);
     _contacts.ResourceDeleting += new ResourceIndexEventHandler(OnImportedContactDeleting);
     _contacts.AddPropertyWatch(new int[]
     {
         PROP.EntryID, ResourceProps.DisplayName,
         Core.ContactManager.Props.EmailAddress,
         Core.ContactManager.Props.LinkEmailAcct,
         ContactManager._propBirthday,
         ContactManager._propCompany,
         ContactManager._propDescription,
         ContactManager._propFirstName,
         ContactManager._propHomePage,
         ContactManager._propImported,
         ContactManager._propJobTitle,
         ContactManager._propLastName,
         ContactManager._propMiddleName,
         ContactManager._propPhone,
         ContactManager._propSuffix,
         ContactManager._propTitle,
         ContactManager._propPhone,
         ContactManager._propUserCreated
     });
 }
Exemple #7
0
 public void Watch()
 {
     _mailList = Core.ResourceStore.FindResourcesWithPropLive(STR.Email, Core.Props.Annotation);
     _mailList.ResourceChanged  += new ResourcePropIndexEventHandler(OnMailChanged);
     _mailList.ResourceAdded    += new ResourceIndexEventHandler(OnMailChanged);
     _mailList.ResourceDeleting += new ResourceIndexEventHandler(OnMailChanged);
     _mailList.AddPropertyWatch(Core.Props.Annotation);
 }
Exemple #8
0
 public void Watch()
 {
     _importanceMailList = Core.ResourceStore.FindResourcesWithPropLive(STR.Email, PROP.Importance);
     _importanceMailList.ResourceChanged  += new ResourcePropIndexEventHandler(OnImportanceMailChanged);
     _importanceMailList.ResourceAdded    += new ResourceIndexEventHandler(OnImportanceMailChanged);
     _importanceMailList.ResourceDeleting += new ResourceIndexEventHandler(OnImportanceMailChanged);
     _importanceMailList.AddPropertyWatch(PROP.Importance);
 }
Exemple #9
0
        public CategoryTotalCountDecorator()
        {
            _textStyle = new TextStyle(FontStyle.Regular, Color.Green, SystemColors.Window);

            _allDeleted = Core.ResourceStore.FindResourcesWithPropLive(null, Core.Props.IsDeleted);

            _allDecoCats = Core.ResourceStore.FindResourcesWithPropLive("Category", "ShowTotalItems");
            _allDecoCats.AddPropertyWatch(Core.ResourceStore.PropTypes["Category"].Id);
            _allDecoCats.ResourceChanged += OnCategory;
        }
Exemple #10
0
 public void Watch()
 {
     _tasksList = Core.ResourceStore.GetAllResourcesLive(STR.Task);
     _tasksList.ResourceChanged += new ResourcePropIndexEventHandler(OnTaskChanged);
     _tasksList.AddPropertyWatch(new int[]
     {
         PROP.Status, PROP.RemindDate, PROP.StartDate, Core.Props.Date, PROP.Description,
         Core.Props.Subject, PROP.Priority
     });
     _tasksList.ResourceAdded    += new ResourceIndexEventHandler(OnTaskAdded);
     _tasksList.ResourceDeleting += new ResourceIndexEventHandler(OnTaskDeleted);
 }
Exemple #11
0
        public void  Initialize()
        {
            foreach (IResource res in AllRules)
            {
                RegisterIconWatcher(res);
            }

            //-----------------------------------------------------------------
            //  Maintain the live list of tray icon rules in order to keep an
            //  eye on "RuleTurnedOff" property (controlled from the Rules
            //  Manager form) : unlike other types of rules, we have to react
            //  immediately by changing icon and tooltip text.
            //-----------------------------------------------------------------
            AllRules.ResourceChanged += AllRules_ResourceChanged;
            AllRules.AddPropertyWatch(Core.ResourceStore.PropTypes["RuleTurnedOff"].Id);
        }
Exemple #12
0
 public void Watch()
 {
     _phonesList = Core.ResourceStore.GetAllResourcesLive("Phone");
     _phonesList.ResourceChanged += new ResourcePropIndexEventHandler(OnPhoneChanged);
     _phonesList.AddPropertyWatch(new int[] { ContactManager._propPhoneName, ContactManager._propPhoneNumber });
 }