예제 #1
0
        protected void versionCheck()
        {
            //アップデートチェック
            VersionXml version = new VersionXml(LiplisUpdaterDefine.getUrlVersion(flgDebug));

            //自信のバージョン取得
            FileVersionInfo ver = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);

            //デバッグ表示
            if (flgDebug)
            {
                Console.WriteLine("最新バージョン : " + version.version);
                Console.WriteLine("現在バージョン : " + ver.ProductVersion);
            }

            //バージョン比較
            if (version.version.CompareTo(ver.ProductVersion) > 0)
            {
                //アップデート情報を追加する
                liplisNowTopic.nameList.Add("@");
                liplisNowTopic.emotionList.Add(0);
                liplisNowTopic.pointList.Add(0);

                liplisNowTopic.nameList.Add("最新バージョンが公開されています。バージョンアップして下さい。");
                liplisNowTopic.emotionList.Add(0);
                liplisNowTopic.pointList.Add(0);

                liplisNowTopic.result = liplisNowTopic.result +  "最新バージョンが公開されています。バージョンアップして下さい。";
                liplisNowTopic.sorce = liplisNowTopic.sorce + "最新バージョンが公開されています。バージョンアップして下さい。";
            }
        }
예제 #2
0
        /// <summary>
        /// クラスの初期化
        /// </summary>
        private void getNewVersion()
        {
            version = new VersionXml(LiplisUpdaterDefine.getUrlVersion(debug));

            //バージョン表示
            if (!version.version.Equals(""))
            {
                lblNewVer.Text = version.version;

                if (lblNewVer.Text.Equals(lblNowVer.Text))
                {
                    CenterMessageBox.Show(this, "最新バージョンです。" + Environment.NewLine + "アップデートの必要はありません。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    btnUpdate.Enabled = false;
                }
                else
                {
                    msgTargetVersion msg = version.getSameVersion(lblNowVer.Text);

                    if (msg.enable.Equals("true"))
                    {
                        CenterMessageBox.Show(this, "最新バージョンがあります。" + Environment.NewLine + "アップデートできます。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        btnUpdate.Enabled = true;
                    }
                    else
                    {
                        CenterMessageBox.Show(this, "アップデート可能なバージョンではありません。" + Environment.NewLine + "手動でアップデートして下さい。" + Environment.NewLine + "手順についてはLipliStyleのサイトを御覧ください。", this.Text,  MessageBoxButtons.OK, MessageBoxIcon.Error);
                        btnUpdate.Enabled = false;
                    }
                }
            }
            else
            {
                CenterMessageBox.Show(this, "最新バージョンが取得できません", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                lblNewVer.Text = "最新バージョン取得失敗";
                updateEnable = false;
                btnUpdate.Enabled = false;
            }
        }