Exemple #1
0
 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);
     }
 }
Exemple #2
0
 private void background_Finish(object sender, RunWorkerCompletedEventArgs e)
 {
     JSONObject values = new JSONObject(reponse);
     JSONObject data = values.getJSONObject("data");
     if (aCb != null) aCb(data);
     stopWorker();
 }
Exemple #3
0
        private void background_Finish(object sender, RunWorkerCompletedEventArgs e)
        {
            JSONObject values = new JSONObject(reponse);
            JSONObject data   = values.getJSONObject("data");

            if (aCb != null)
            {
                aCb(data);
            }
            stopWorker();
        }