예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            richTextBox2.Text = "等待中...";
            if (comboBox2.Text == "")
            {
                return;
            }
            String result = connector.GetStringWithUrl(baseUrl, "api_lottery.php?action=getTheLatestLottery&group_name=" + comboBox2.SelectedItem.ToString());

            richTextBox2.Text = result;

            JObject jObject = connector.StringConvertJObj(result);

            if (jObject == null)
            {
                return;
            }
            if (jObject["data"]["state"].Value <string>() == "success")
            {
                textBox6.Text = textBox4.Text = textBox5.Text = textBox2.Text = textBox1.Text = jObject["data"]["lottery_no"].Value <string>();
            }
        }