diff --git a/Form1.cs b/Form1.cs index e3d3902..de4f053 100644 --- a/Form1.cs +++ b/Form1.cs @@ -76,15 +76,17 @@ public Form1() { using (StreamReader reader = new StreamReader(response2.GetResponseStream())) { - var text = reader.ReadToEnd().ToString().ToLower(); - string[] splittext = text.Substring(text.IndexOf("{"product":"policy")).Replace("{"product":"policy", "|{"product":"policy").Replace(""", "\"").ToString().Split(new char[] { '|', '>' }, 3)[1].Replace("{\"releaseid", "|{\"releaseid").Split(new char[] { '|' }); + string texting = reader.ReadToEnd(); + string text = texting.ToLower().Replace(""", "\""); + reader.Close(); + string[] splittext = text.Substring(text.IndexOf("\"product\": \"policy")).Replace("\"product\": \"policy", "|\"product\": \"policy").ToString().Split(new char[] { '|', '>' }, 3)[1].Replace("\"releaseid", "|\"releaseid").Split(new char[] { '|' }); for (int i = 0; i < splittext.GetLength(0); i++) { - if (splittext[i].Contains("productversion") & splittext[i].Contains("artifactname\":\"zip\",")) + if (splittext[i].Contains("productversion") & splittext[i].Contains("artifactname\": \"zip\",")) { - string productVersion = splittext[i].Substring(splittext[i].IndexOf("productversion\":\"")).Split(new char[] { '"' }, 4)[2]; + string productVersion = splittext[i].Substring(splittext[i].IndexOf("productversion\": \"")).Split(new char[] { '"' }, 4)[2]; string productVShort = productVersion.Split(new char[] { '.' }, 2)[0]; - string productURL = splittext[i].Substring(splittext[i].IndexOf("artifactname\":\"zip\",\"location\":")).Split(new char[] { '"' }, 8)[6]; + string productURL = splittext[i].Substring(splittext[i].IndexOf("\"location\":")).Split(new char[] { '"' }, 5)[3]; if (policyVMenu != productVShort) { SubPVMenu = new ToolStripMenuItem(productVShort); @@ -112,11 +114,11 @@ async void Download2_Click(object sender, EventArgs e) policyVMenu = productVShort; } - else if (splittext[i].Contains("productversion") & splittext[i].Contains("artifactname\":\"cab\",")) + else if (splittext[i].Contains("productversion") & splittext[i].Contains("artifactname\": \"cab\",")) { - string productVersion = splittext[i].Substring(splittext[i].IndexOf("productversion\":\"")).Split(new char[] { '"' }, 4)[2]; + string productVersion = splittext[i].Substring(splittext[i].IndexOf("productversion\": \"")).Split(new char[] { '"' }, 4)[2]; string productVShort = productVersion.Split(new char[] { '.' }, 2)[0]; - string productURL = splittext[i].Substring(splittext[i].IndexOf("artifactname\":\"cab\",\"location\":")).Split(new char[] { '"' }, 8)[6]; + string productURL = splittext[i].Substring(splittext[i].IndexOf("\"location\":")).Split(new char[] { '"' }, 5)[3]; if (policyVMenu != productVShort) { SubPVMenu = new ToolStripMenuItem(productVShort); diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 93e3623..b5ac26e 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,6 +32,6 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.8.1")] -[assembly: AssemblyFileVersion("1.4.8.1")] +[assembly: AssemblyVersion("1.4.8.2")] +[assembly: AssemblyFileVersion("1.4.8.2")] [assembly: NeutralResourcesLanguage("en")] diff --git a/Version.txt b/Version.txt index ed5e6e8..fe508fc 100644 --- a/Version.txt +++ b/Version.txt @@ -1 +1 @@ -1.4.8.1 \ No newline at end of file +1.4.8.2 \ No newline at end of file