コード例 #1
0
ファイル: admin.ascx.cs プロジェクト: jre08/YAFNET
        /// <summary>
        /// Shows the upgrade message.
        /// </summary>
        private void ShowUpgradeMessage()
        {
            var latestInfo = new LatestInformationService().GetLatestVersionInformation();

            if (latestInfo == null || latestInfo.Version <= YafForumInfo.AppVersionCode)
            {
                return;
            }

            // updateLink
            var updateLink = new Action <HyperLink>(
                link =>
            {
                link.Text        = latestInfo.Message;
                link.NavigateUrl = latestInfo.Link;
            });

            if (latestInfo.IsWarning)
            {
                this.UpdateWarning.Visible = true;
                updateLink(this.UpdateLinkWarning);
            }
            else
            {
                this.UpdateHightlight.Visible = true;
                updateLink(this.UpdateLinkHighlight);
            }
        }
コード例 #2
0
        /// <summary>
        /// Shows the upgrade message.
        /// </summary>
        private void ShowUpgradeMessage()
        {
            var latestInfo = new LatestInformationService().GetLatestVersion();

            if (latestInfo == null || BitConverter.ToInt64(latestInfo, 0) <= BitConverter.ToInt64(BoardInfo.AppVersionCode, 0))
            {
                return;
            }

            // updateLink
            this.UpdateHightlight.Visible = true;
        }
コード例 #3
0
ファイル: admin.ascx.cs プロジェクト: daozm/YAFNET
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load([NotNull] object sender, [NotNull] EventArgs e)
        {
            if (this.IsPostBack)
            {
                return;
            }

            this.PageLinks.AddRoot();
            this.PageLinks.AddLink(this.GetText("ADMIN_ADMIN", "Administration"), string.Empty);

            this.Page.Header.Title = this.GetText("ADMIN_ADMIN", "Administration");

            // bind data
            this.BindBoardsList();

            this.BindData();

            var latestInfo = new LatestInformationService().GetLatestVersionInformation();

            if (latestInfo == null || latestInfo.Version <= YafForumInfo.AppVersionCode)
            {
                return;
            }

            // updateLink
            var updateLink = new Action <HyperLink>(
                link =>
            {
                link.Text        = latestInfo.Message;
                link.NavigateUrl = latestInfo.Link;
            });

            if (latestInfo.IsWarning)
            {
                this.UpdateWarning.Visible = true;
                updateLink(this.UpdateLinkWarning);
            }
            else
            {
                this.UpdateHightlight.Visible = true;
                updateLink(this.UpdateLinkHighlight);
            }

            // UpgradeNotice.Visible = install._default.GetCurrentVersion() < Data.AppVersion;
        }