private void httpResponse(JSONObject response) { WaitDialog.close(); int error_code = response.getInt("error_code"); if (error_code == 0) { FloderUtils folder = new FloderUtils(outPath); JSONObject value = response.getJSONObject("value"); string file_path = folder.createDeviceFolder(value.getString("deviceAddress"), orderID); BrainChart brainCharts = new BrainChart(file_path,true,false); //brainCharts.Location = new Point(350, 45); //brainCharts.TopLevel = false; //this.Controls.Add(brainCharts); brainCharts.Show(); brainCharts.Location = new Point(0, 0); resultList.Clear(); JSONArray list = response.getJSONArray("list"); for (int i = 0; i < list.Count; i++) { JSONObject item = list.getJSONObject(i); resultList.Add(item); } reloadList(); setValue(value); } else { string message = response.getString("message"); MessageBox.Show(message); } }
private void httpResponse(JSONObject response) { WaitDialog.close(); int error_code = response.getInt("error_code"); if (error_code == 0) { ChromeUtils.closeChrome(); this.Close(); OrderView view = new OrderView(configManager.getOrderID(),configManager.getPath()); view.Show(); } else { string message = response.getString("message"); MessageBox.Show(message); } }
private void httpResponse(JSONObject response) { WaitDialog.close(); int error_code = response.getInt("error_code"); if (error_code == 0) { resultList.Clear(); FloderUtils floder = new FloderUtils(this.outPath); ArrayList pathes = floder.listAllOrder(); resultList = pathes; JSONArray list = response.getJSONArray("list"); for (int i = 0; i < list.Count; i++) { JSONObject item = list.getJSONObject(i); resultList.Add(item); } reloadList(); } else { string message = response.getString("message"); MessageBox.Show(message); } }
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); } }