Exemple #1
0
 public WordManager(JSONObject word_item)
 {
     this.wordItem = word_item;
     this.definitionList = wordItem.getJSONArray("definitionList");
     this.translateList = wordItem.getJSONArray("translateList");
     this.exampleList = wordItem.getJSONArray("exampleList");
     this.enWord = wordItem.getString("enWord");
     this.Count = this.definitionList.Count;
 }
Exemple #2
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 #3
0
 private void httpResponse(JSONObject response)
 {
     JSONArray list = response.getJSONArray("wordList");
     for (int i = 0; i < list.Count; i++)
     {
         JSONObject item = list.getJSONObject(i);
         Console.WriteLine(item.toString());
         WordManager manager = new WordManager(item);
     }
 }
Exemple #4
0
 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);
     }
 }