public void minecraftUpdate() { if (isMinecraftUpdate) { if (MessageBox.Show(this.Resources["haveNewMinecraftUpdates"].ToString(), this.Resources["haveNewUpdatesTitle"].ToString(), MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { try { this.Hide(); GetUpdate updateForm = new GetUpdate(); updateForm.Show(); updateForm.setParent(this); updateForm.setDownload(minecraftDownload); updateForm.minecraftUpdateStart(); updateForm.Show(); } catch (Exception ex) { if (ex.Message == "networkerror") { MessageBox.Show(this.Resources["networkError"].ToString(), this.Resources["errorMessageTitle"].ToString(), MessageBoxButton.OK, MessageBoxImage.Error); } } } } }
private void selfUpdate() { try { checkUpdate(); } catch (Exception ex) { if (ex.Message == "networkerror") { MessageBox.Show(this.Resources["networkError"].ToString(), this.Resources["errorMessageTitle"].ToString(), MessageBoxButton.OK, MessageBoxImage.Error); } } if (isSelfUpdate) { if (MessageBox.Show(this.Resources["haveNewSelfUpdates"].ToString(), this.Resources["haveNewUpdatesTitle"].ToString(), MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { try { this.Hide(); GetUpdate updateForm = new GetUpdate(); updateForm.Show(); updateForm.setParent(this); updateForm.setDownload(selfDownload); updateForm.selfUpdateStart(); updateForm.Show(); } catch (Exception ex) { if (ex.Message == "networkerror") { MessageBox.Show(this.Resources["networkError"].ToString(), this.Resources["errorMessageTitle"].ToString(), MessageBoxButton.OK, MessageBoxImage.Error); } } } else minecraftUpdate(); } else minecraftUpdate(); }