Exemple #1
0
 /**
  *  @return void
  **/
 private void MainWindow_Load(object sender, EventArgs e)
 {
     Machine machine = new Machine();
     /**
      *  @note update machine's online status
      **/
     WebConnection webRequest = new WebConnection("http://ontrackapp.org/update/register", "POST", "machine-name="+machine.getMachineName()+"&uptime="+machine.getMachineUpTime()+"&last-user="******"http://ontrackapp.org/ajax/subjects", "POST", "");
     string response = webRequest.getResponse();
     dynamic json = JObject.Parse(response);
     foreach (var subject in json.subjects) {
         Subject sub = new Subject();
         sub.setSubjectName((string)subject.title);
         this.subjects.Add(sub);
     }
     
 }