Esempio n. 1
0
        private void posts_PreRender(object sender, EventArgs e)
        {
            bool isWatched = HandleWatchTopic();

            // options menu...
            OptionsMenu.AddPostBackItem("watch", isWatched ? GetText("UNWATCHTOPIC") : GetText("WATCHTOPIC"));
            if (PageContext.BoardSettings.AllowEmailTopic)
            {
                OptionsMenu.AddPostBackItem("email", GetText("EMAILTOPIC"));
            }
            OptionsMenu.AddPostBackItem("print", GetText("PRINTTOPIC"));
            if (PageContext.BoardSettings.ShowRSSLink)
            {
                OptionsMenu.AddPostBackItem("rssfeed", GetText("RSSTOPIC"));
            }

            // view menu
            ViewMenu.AddPostBackItem("normal", GetText("NORMAL"));
            ViewMenu.AddPostBackItem("threaded", GetText("THREADED"));

            // attach both the menus to HyperLinks
            OptionsMenu.Attach(OptionsLink);
            ViewMenu.Attach(ViewLink);

            if (!_dataBound)
            {
                BindData();
            }
        }