コード例 #1
0
ファイル: posts.ascx.cs プロジェクト: coredweller/PhishMarket
        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();
            }
        }
コード例 #2
0
ファイル: posts.ascx.cs プロジェクト: zi-yu/orionsbelt
        private void posts_PreRender(object sender, EventArgs e)
        {
            bool bWatched = HandleWatchTopic();

            MyTestMenu.AddItem("watch", bWatched ? GetText("unwatchtopic") : GetText("watchtopic"));
            MyTestMenu.AddItem("email", GetText("emailtopic"));
            MyTestMenu.AddItem("print", GetText("printtopic"));
            if (BoardSettings.ShowRSSLink)
            {
                MyTestMenu.AddItem("rssfeed", GetText("rsstopic"));
            }
            ViewMenu.AddItem("normal", GetText("NORMAL"));
            ViewMenu.AddItem("threaded", GetText("THREADED"));
            MyTestMenu.Attach(MyTest);
            ViewMenu.Attach(View);

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