예제 #1
0
파일: Form1.cs 프로젝트: candy06/socws1
        private void button1_Click(object sender, EventArgs e)
        {
            citiesList.Items.Clear();

            Stopwatch stopwatch = Stopwatch.StartNew();

            City[] cityObjects = client.GetCities();
            stopwatch.Stop();
            int s = cityObjects.Length;

            for (int i = 0; i < s; i++)
            {
                citiesList.Items.Add(cityObjects[i].Name);
            }

            label1.Visible = false;

            label3.Text    = "Execution time of GetCities: " + stopwatch.ElapsedMilliseconds + "ms";
            label3.Visible = true;

            citiesList.Enabled = true;

            button2.Enabled = false;
            button3.Enabled = false;
        }