示例#1
0
文件: Form1.cs 项目: zelha/iws
        private void button1_Click(object sender, EventArgs e)
        {
            city = textBox1.Text;
            ServiceVelibReference.WSVelibClient client = new ServiceVelibReference.WSVelibClient();
            string[] stations = client.GetListStations(textBox1.Text);


            listBox1.DataSource = stations;
        }
示例#2
0
文件: Form1.cs 项目: zelha/iws
        private void button2_Click(object sender, EventArgs e)
        {
            ServiceVelibReference.WSVelibClient client = new ServiceVelibReference.WSVelibClient();
            ServiceVelibReference.VelibStation  station;
            System.Console.WriteLine(listBox1.SelectedItem.ToString());
            station     = client.getStation(city, listBox1.SelectedItem.ToString());
            label3.Text = station.Name;
            label4.Text = "Available bikes " + station.AvailableBikes.ToString();
            label5.Text = "Available bike stands " + station.AvailableBikeStands.ToString();
            label6.Text = "Bike stands " + station.BikeStands.ToString();

            label7.Text = (station.Banking) ? "Accepts credit card" : "Doesn't accept credit card ";
        }