Skip to content

Commit 7c488e1

Browse files
committed
Removed API (GDPR)
1 parent 651beb1 commit 7c488e1

1 file changed

Lines changed: 14 additions & 23 deletions

File tree

DatabaseChanger/DatabaseChanger/Form1.cs

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.CodeDom;
33
using System.Collections.Generic;
44
using System.ComponentModel;
@@ -22,7 +22,7 @@ public partial class Form1 : Form
2222
private readonly string[] hints = new[]
2323
{"default", "eus", "cus", "scus", "wus", "sbr", "neu", "weu", "eas", "seas", "eau", "wja"};
2424

25-
public Form1()
25+
public Form1()
2626
{
2727
InitializeComponent();
2828
this.FormBorderStyle = FormBorderStyle.FixedSingle;
@@ -39,15 +39,20 @@ public Form1()
3939
var directories = Directory.GetDirectories(PATH);
4040

4141

42-
getNames();
4342

44-
//cboUUID.SelectedIndex = 0;
43+
foreach (string directory in directories)
44+
{
45+
46+
cboUUID.Items.Add(directory.Remove(0,PATH.Length+1));
47+
}
48+
cboUUID.SelectedIndex = 0;
4549
cboDatacenter.SelectedIndex = 0;
4650
lblStatus.Text = "";
4751

48-
//cboDatacenter.SelectedItem = getCurrentDatacenter();
52+
cboDatacenter.SelectedItem = getCurrentDatacenter();
53+
4954

50-
55+
5156

5257
}
5358

@@ -84,24 +89,10 @@ private void onIndexChanged(object sender, EventArgs e)
8489
{
8590
cboDatacenter.SelectedItem = getCurrentDatacenter();
8691
}
87-
88-
private async void getNames()
89-
{
90-
lblStatus.Text = "test";
91-
}
9292

93-
public string GetAsync(string uri)
94-
{
95-
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
96-
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
97-
98-
using(HttpWebResponse response = (HttpWebResponse) request.GetResponse())
99-
using(Stream stream = response.GetResponseStream())
100-
using(StreamReader reader = new StreamReader(stream))
101-
{
102-
return reader.ReadToEnd();
103-
}
104-
}
93+
94+
95+
10596

10697
}
10798
}

0 commit comments

Comments
 (0)