Beispiel #1
0
        private async void MainForm_Shown(object sender, EventArgs e)
        {
            if (GeneralSetting.AutoUpdate)
            {
                var needUpdate = await GeneralSetting.CheckVersionAndUpdate();

                if (needUpdate)
                {
                    Application.Exit();
                }
            }
        }
Beispiel #2
0
        private async void button_checkUpdate_Click(object sender, EventArgs e)
        {
            button_checkUpdate.Enabled = false;

            var needUpdate = await GeneralSetting.CheckVersionAndUpdate();

            if (needUpdate)
            {
                Application.Exit();
            }
            else
            {
                button_checkUpdate.Enabled = true;
                label_updateResult.Text    = Resource.GetString(Key.LatestVersionMsg);
            }
        }