private void MainForm_Load(object sender, EventArgs e) { if (Runtime.DesignMode) { return; } _capture = new Capture(Handle); _goodbyedpiManager = new Manager(); GeneralSetting.Load(); LayoutSetting.Load(); CaptureSetting.Load(); BuildLayout(); // 업데이트 tmp 파일 삭제 var di = new DirectoryInfo(Application.StartupPath); var fis = di.GetFiles("*.update.tmp"); foreach (var fi in fis) { string filePath = fi.FullName.Replace(".update.tmp", ""); fi.CopyTo(filePath, true); fi.Delete(); } }
private async void MainForm_Shown(object sender, EventArgs e) { if (GeneralSetting.AutoUpdate) { var needUpdate = await GeneralSetting.CheckVersionAndUpdate(); if (needUpdate) { Application.Exit(); } } }
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); } }
private void SettingDialog_FormClosing(object sender, FormClosingEventArgs e) { GeneralSetting.Save(); CaptureSetting.Save(); LayoutSetting.Save(); }