コード例 #1
0
        /// <summary>
        /// Called by FeedSource if a category is added from outside the application
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnAddedCategory(object sender, FeedSource.CategoryEventArgs e)
        {
            FeedSourceEntry entry = sourceManager.SourceOf((FeedSource)sender);

            InvokeOnGui(delegate
            {
                this.AddCategory(entry, e.CategoryName);
                SubscriptionModified(entry, NewsFeedProperty.FeedCategoryAdded);
            });
        }
コード例 #2
0
        /// <summary>
        /// Called by FeedSource if a category is deleted from outside the application
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnDeletedCategory(object sender, FeedSource.CategoryEventArgs e)
        {
            FeedSourceEntry entry = sourceManager.SourceOf((FeedSource)sender);

            InvokeOnGui(delegate
            {
                TreeFeedsNodeBase tn = TreeHelper.FindChildNode(guiMain.GetRoot(RootFolderType.MyFeeds), e.CategoryName, FeedNodeType.Category);
                if (tn != null)
                {
                    guiMain.DeleteCategory(tn);
                    SubscriptionModified(entry, NewsFeedProperty.FeedCategoryRemoved);
                }
            });
        }