Exemple #1
0
        private void httpResponse(JSONObject response)
        {
            WaitDialog.close();
            int error_code = response.getInt("error_code");

            if (error_code == 0)
            {
                Boolean   isTest               = radioTest.Checked;
                Boolean   isclient             = checkBoxClient.Checked;
                ArrayList list                 = bluetooth_list.getResult();
                BluetoothDeviceManager manager = (BluetoothDeviceManager)list[0];
                string        order_id         = response.getString("orderID");
                ConfigManager config_manager   = new ConfigManager(order_id, outputText.Text, int.Parse(textTestTime.Text), manager, isTest, isclient, textUserName.Text, textUserYearOld.Text);
                if (!config_manager.getIsTest())
                {
                    ShowExDialog.show("第一步、選擇單字", Properties.Resources.choose);
                    string chooseUrl = ChromeUtils.chooseURL + order_id;
                    ChromeUtils.openChrome(chooseUrl);
                    Choose choose = new Choose(config_manager);
                    choose.Show();
                    choose.Location  = new Point(0, 0);
                    this.WindowState = FormWindowState.Minimized;
                }
                else
                {
                    MessageBox.Show("準備好了?確定後開始測試");
                    ArrayList formList = new ArrayList();
                    formList.Add(this);
                    formList.Add(bluetooth_list);
                    new Memory(config_manager, formList);
                }
            }
            else
            {
                string message = response.getString("message");
                MessageBox.Show(message);
            }
        }
Exemple #2
0
 private void httpResponse(JSONObject response)
 {
     WaitDialog.close();
     int error_code = response.getInt("error_code");
     if (error_code == 0)
     {
         Boolean isTest = radioTest.Checked;
         Boolean isclient = checkBoxClient.Checked;
         ArrayList list = bluetooth_list.getResult();
         BluetoothDeviceManager manager = (BluetoothDeviceManager)list[0];
         string order_id = response.getString("orderID");
         ConfigManager config_manager = new ConfigManager(order_id, outputText.Text, int.Parse(textTestTime.Text), manager, isTest, isclient, textUserName.Text, textUserYearOld.Text);
         if (!config_manager.getIsTest())
         {
             ShowExDialog.show("第一步、選擇單字", Properties.Resources.choose);
             string chooseUrl = ChromeUtils.chooseURL + order_id;
             ChromeUtils.openChrome(chooseUrl);
             Choose choose = new Choose(config_manager);
             choose.Show();
             choose.Location = new Point(0, 0);
             this.WindowState = FormWindowState.Minimized;
         }
         else
         {
             MessageBox.Show("準備好了?確定後開始測試");
             ArrayList formList = new ArrayList();
             formList.Add(this);
             formList.Add(bluetooth_list);
             new Memory(config_manager, formList);
         }
     }
     else
     {
         string message = response.getString("message");
         MessageBox.Show(message);
     }
 }