コード例 #1
0
        protected AppActionCollection GetAppActionList(AppBase app)
        {
            AppActionCollection appActions = new AppActionCollection();

            foreach (AppAction appAction in app.AppActions)
            {
                if (FeedBO.Instance.IsSiteFeed(app.AppID, appAction.ActionType))
                {
                    continue;
                }

                bool display = true;
                foreach (FeedSendItem tempItem in AllSettings.Current.PrivacySettings.FeedSendItems)
                {
                    if ((tempItem.DefaultSendType == FeedSendItem.SendType.ForceSend || tempItem.DefaultSendType == FeedSendItem.SendType.ForceNotSend) &&
                        tempItem.AppID == app.AppID && tempItem.ActionType == appAction.ActionType)
                    {
                        display = false;
                        break;
                    }
                }

                if (display)
                {
                    appActions.Add(appAction);
                }
            }

            return(appActions);
        }
コード例 #2
0
        protected AppActionCollection GetFiltratedAppActionList(Guid appID)
        {
            AppActionCollection appActions = new AppActionCollection();
            AppBase             app        = AppManager.GetApp(appID);

            foreach (FeedFilter feedFilter in UserFeedFilters)
            {
                if (feedFilter.AppID == appID)
                {
                    if (feedFilter.FilterType == FilterType.FilterApp)
                    {
                        appActions = app.AppActions;
                        break;
                    }
                    else if (feedFilter.FilterType == FilterType.FilterAppAction)
                    {
                        AppAction appAction = app.AppActions.GetValue(feedFilter.ActionType.Value);
                        if (appAction != null)
                        {
                            appActions.Add(appAction);
                        }
                    }
                }
            }

            return(appActions);
        }
コード例 #3
0
        public void AppActionList(AppBase app, AppActionsTemplate template)
        {
            AppActionCollection appActions = app.AppActions;

            int j = 0;

            foreach (AppAction appAction in appActions)
            {
                template(j++, appAction);
            }
        }
コード例 #4
0
        public void AppActionList(
            AppBase app
            , GlobalTemplateMembers.CannotDoTemplate cannotDo
            , GlobalTemplateMembers.NodataTemplate nodata
            , AppActionListHeadFootTemplate head
            , AppActionListHeadFootTemplate foot
            , AppActionListItemTemplate item)
        {
            AppActionCollection appActions = app.AppActions;

            head();

            int j = 0;

            foreach (AppAction appAction in appActions)
            {
                if (FeedBO.Instance.IsSiteFeed(app.AppID, appAction.ActionType))
                {
                    continue;
                }

                bool display = true;
                foreach (FeedSendItem tempItem in AllSettings.Current.PrivacySettings.FeedSendItems)
                {
                    if ((tempItem.DefaultSendType == FeedSendItem.SendType.ForceSend || tempItem.DefaultSendType == FeedSendItem.SendType.ForceNotSend) &&
                        tempItem.AppID == app.AppID && tempItem.ActionType == appAction.ActionType)
                    {
                        display = false;
                    }
                }

                if (display)
                {
                    item(j++, appAction);
                }
            }

            if (appActions.Count == 0)
            {
                nodata();
            }

            foot();
        }
コード例 #5
0
        public void FiltratedAppActionList(Guid appID
                                           , FiltratedAppActionListHeadFootTemplate head
                                           , FiltratedAppActionListHeadFootTemplate foot
                                           , FiltratedAppActionListItemTemplate item)
        {
            AppActionCollection appActions = new AppActionCollection();
            AppBase             app        = AppManager.GetApp(appID);

            foreach (FeedFilter feedFilter in UserFeedFilters)
            {
                if (feedFilter.AppID == appID)
                {
                    if (feedFilter.FilterType == FilterType.FilterApp)
                    {
                        appActions = app.AppActions;
                        break;
                    }
                    else if (feedFilter.FilterType == FilterType.FilterAppAction)
                    {
                        AppAction appAction = app.AppActions.GetValue(feedFilter.ActionType.Value);
                        if (appAction != null)
                        {
                            appActions.Add(appAction);
                        }
                    }
                }
            }

            int j = 0;

            head();
            foreach (AppAction appAction in appActions)
            {
                item(j++, appAction);
            }
            foot();
        }
コード例 #6
0
ファイル: privacy.aspx.cs プロジェクト: huchao007/bbsmax
        protected AppActionCollection GetAppActionList(AppBase app)
        {
            AppActionCollection appActions = new AppActionCollection();

            foreach (AppAction appAction in app.AppActions)
            {
                if (FeedBO.Instance.IsSiteFeed(app.AppID, appAction.ActionType))
                    continue;

                bool display = true;
                foreach (FeedSendItem tempItem in AllSettings.Current.PrivacySettings.FeedSendItems)
                {
                    if ((tempItem.DefaultSendType == FeedSendItem.SendType.ForceSend || tempItem.DefaultSendType == FeedSendItem.SendType.ForceNotSend)
                        && tempItem.AppID == app.AppID && tempItem.ActionType == appAction.ActionType)
                    {
                        display = false;
                        break;
                    }
                }

                if (display)
                    appActions.Add(appAction);
            }

            return appActions;
        }
コード例 #7
0
ファイル: feedfilter.aspx.cs プロジェクト: huchao007/bbsmax
        protected AppActionCollection GetFiltratedAppActionList(Guid appID)
        {
            AppActionCollection appActions = new AppActionCollection();
            AppBase app = AppManager.GetApp(appID);
            foreach (FeedFilter feedFilter in UserFeedFilters)
            {
                if (feedFilter.AppID == appID)
                {
                    if (feedFilter.FilterType == FilterType.FilterApp)
                    {
                        appActions = app.AppActions;
                        break;
                    }
                    else if (feedFilter.FilterType == FilterType.FilterAppAction)
                    {
                        AppAction appAction = app.AppActions.GetValue(feedFilter.ActionType.Value);
                        if (appAction != null)
                            appActions.Add(appAction);
                    }
                }
            }

            return appActions;
        }
コード例 #8
0
        public void FiltratedAppActionList(Guid appID
            , FiltratedAppActionListHeadFootTemplate head
            , FiltratedAppActionListHeadFootTemplate foot
            , FiltratedAppActionListItemTemplate item)
        {
            AppActionCollection appActions = new AppActionCollection();
            AppBase app = AppManager.GetApp(appID);
            foreach (FeedFilter feedFilter in UserFeedFilters)
            {
                if (feedFilter.AppID == appID)
                {
                    if (feedFilter.FilterType == FilterType.FilterApp)
                    {
                        appActions = app.AppActions;
                        break;
                    }
                    else if (feedFilter.FilterType == FilterType.FilterAppAction)
                    {
                        AppAction appAction = app.AppActions.GetValue(feedFilter.ActionType.Value);
                        if (appAction != null)
                            appActions.Add(appAction);
                    }
                }
            }

            int j = 0;
            head();
            foreach (AppAction appAction in appActions)
            {
                item(j++, appAction);
            }
            foot();
        }