public void Downloadtexture(string newestVersion, string localArmaPath, string armaPath, MainFrame parent, bool ShowDownloadSuccess = true) { this.showDownloadSuccess = ShowDownloadSuccess; localArma = localArmaPath; this.newestVersion = newestVersion.Split('_').Last(); this.armaPath = armaPath; this.parent = parent; InitializeComponent(); Icon = Resources.TaskbarIconWhite; CenterToScreen(); lblVersion.Text = this.newestVersion; if (Directory.Exists(armaPath + @"\@USALifeMod")) { try { Directory.Delete(armaPath + @"\@USALifeMod", true); } catch (Exception) { lblStatus.Text = "FEHLER"; MessageBox.Show("Keine Berechtigung beim Updaten der Modfile (Fehlercode: #4)" + "\n" + "Sie müssen ihr Arma3 geschlossen haben, um die Mod vollständig upzudaten." + "\n" + Administrationtxt + "\n" + "(URL:" + downloadPath + "/" + newestVersion + ")", "Kann die Datei nicht herunterladen", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } startDownloadTexture(newestVersion); } else { startDownloadTexture(newestVersion); lblVersion.Text = this.newestVersion; } }
public void DownloadUpdater(string newestVersion, string localArmaPath, string armaPath, MainFrame parent) { localArma = localArmaPath; this.newestVersion = newestVersion.Split('/').Last(); this.armaPath = armaPath; this.parent = parent; InitializeComponent(); Icon = Resources.TaskbarIconWhite; CenterToScreen(); lblVersion.Text = this.newestVersion; startDownloadUpdater(newestVersion); }