예제 #1
0
파일: Form1.cs 프로젝트: candy06/socws1
        private void button2_Click(object sender, EventArgs e)
        {
            stationsList.Items.Clear();
            selectedStations.Clear();
            Stopwatch stopwatch = Stopwatch.StartNew();

            Station[] stations = client.GetStationsOf((string)citiesList.SelectedItem);
            stopwatch.Stop();
            int s = stations.Length;

            for (int i = 0; i < s; i++)
            {
                stationsList.Items.Add(stations[i].Name);
                selectedStations.Add(stations[i]);
            }

            selectNewStationButton.Enabled = false;

            label4.Text    = "Execution time of GetStationsOf: " + stopwatch.ElapsedMilliseconds + "ms";
            label4.Visible = true;

            button2.Enabled      = false;
            stationsList.Enabled = true;
        }