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 getOrderList() { if (isClient) { FloderUtils floder = new FloderUtils(this.outPath); ArrayList pathes = floder.listAllOrder(); resultList = pathes; reloadList(); } else { HttpWorker httpWorker = new HttpWorker(HttpWorker.orderList, httpResponse); JSONObject form = new JSONObject(); form.setString("status", "4"); httpWorker.setData(form); httpWorker.httpWorker(); WaitDialog.show(); } }
//private ChartDraw chartDraw = null; public Memory(ConfigManager manager, ArrayList root_f) { InitializeComponent(); this.configManager = manager; // this.TopMost = true; this.rootFrom = root_f; if (!manager.getIsTest()) { string memory = ChromeUtils.memoryURL + configManager.getOrderID(); ChromeUtils.openChrome(memory); } BluetoothDeviceManager deviceManager = manager.getDeviceManager(); FloderUtils folder = new FloderUtils(manager.getPath()); folder.createRoot(); this.runPath = folder.createDeviceFolder(deviceManager.getDeviceAddress(), manager.getOrderID()); this.brainReceiver = new BrainReceiver(deviceManager.getCOM(), brainReiverCallback, sectionReciver, abrainCallback); //this.chartDraw = new ChartDraw(runPath); //chartDraw.Show(); //chartDraw.Location = new Point(0,120); labelDeviceName.Text = deviceManager.getDeviceName() + "(" + deviceManager.getCOM() + ")"; labelMac.Text = deviceManager.getDeviceAddress(); serviceTime = -1; brainReciverRun(); }
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); } }