private void ShowUpdateForm(bool topMost = false) { if (_retrievedVersion == null) { return; } var udf = new UpdateForm(_retrievedVersion); udf.TopMost = topMost; udf.ShowDialog(this); }
private void btnCheckUpdate_Click(object sender, EventArgs e) { using (AudioSwitcherService.AudioSwitcher client = ConnectionHelper.GetAudioSwitcherProxy()) { if (client == null) { return; } AudioSwitcherVersionInfo vi = client.GetUpdateInfo(AssemblyVersion); if (vi != null && !string.IsNullOrEmpty(vi.URL)) { var udf = new UpdateForm(vi); udf.ShowDialog(this); } else { MessageBox.Show(this, "You have the latest version!"); } } }