Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     // open instances
     this.Hide();
     MyInstances f = new MyInstances();
     f.Show();
 }   
Exemplo n.º 2
0
 public void startInstance_callback(string res)
 {
     JsonValue json = JsonValue.Parse(res); //Creates JsonValue from response string
     Console.WriteLine("My Json String = " + json.ToString()); //log that a response was recieved
     if (DataManager.cleanJSON(json["HttpStatus"].ToString()) == "200")
     {
         // Code to execute on success goes here
         Console.WriteLine("pending");
         DataManager.setInstanceUp(false);
         DataManager.setRecoveryStatus("start");
         DataManager.setRecoveryID(DataManager.cleanJSON(json["recovery_id"].ToString()));
         aTimer = new System.Timers.Timer();
         aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
         // Set the Interval to 1 minute. 1000 = 1 second.
         aTimer.Interval = 30000;
         aTimer.Start();
         // open instances
         this.Hide();
         MyInstances f = new MyInstances();
         f.Show();
     }
     else
     {
         // Code to execute on error goes here
         Console.WriteLine("error");
     }
 }
Exemplo n.º 3
0
        public void getBackups_callback(string res1)
        {
            JsonValue json = JsonValue.Parse(res1); //Creates JsonValue from response string
            Console.WriteLine("My Json String = " + json.ToString()); //log that a response was recieved

            if (DataManager.cleanJSON(json["HttpStatus"].ToString()) == "200")
            {
                // Code to execute on success goes here
                Console.WriteLine("Success");
                DataManager.addBackupsList(json);
            }
            else
            {
                // Code to execute on error goes here
                Console.WriteLine("error");

            }
            this.Hide();
            MyInstances f = new MyInstances();
            f.Show();
        }