Skip to content

Commit

Permalink
Removed API (GDPR)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnRG committed May 24, 2018
1 parent 651beb1 commit 7c488e1
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions DatabaseChanger/DatabaseChanger/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.ComponentModel;
Expand All @@ -22,7 +22,7 @@ public partial class Form1 : Form
private readonly string[] hints = new[]
{"default", "eus", "cus", "scus", "wus", "sbr", "neu", "weu", "eas", "seas", "eau", "wja"};

public Form1()
public Form1()
{
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.FixedSingle;
Expand All @@ -39,15 +39,20 @@ public Form1()
var directories = Directory.GetDirectories(PATH);


getNames();

//cboUUID.SelectedIndex = 0;
foreach (string directory in directories)
{

cboUUID.Items.Add(directory.Remove(0,PATH.Length+1));
}
cboUUID.SelectedIndex = 0;
cboDatacenter.SelectedIndex = 0;
lblStatus.Text = "";

//cboDatacenter.SelectedItem = getCurrentDatacenter();
cboDatacenter.SelectedItem = getCurrentDatacenter();




}

Expand Down Expand Up @@ -84,24 +89,10 @@ private void onIndexChanged(object sender, EventArgs e)
{
cboDatacenter.SelectedItem = getCurrentDatacenter();
}

private async void getNames()
{
lblStatus.Text = "test";
}

public string GetAsync(string uri)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

using(HttpWebResponse response = (HttpWebResponse) request.GetResponse())
using(Stream stream = response.GetResponseStream())
using(StreamReader reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}




}
}

0 comments on commit 7c488e1

Please sign in to comment.