1- using System ;
1+ using System ;
22using System . CodeDom ;
33using System . Collections . Generic ;
44using 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