コード例 #1
0
ファイル: Backups.cs プロジェクト: ksparakis/cloud-recover
 private void button1_Click(object sender, EventArgs e)
 {
     // open instances
     this.Hide();
     MyInstances f = new MyInstances();
     f.Show();
 }   
コード例 #2
0
ファイル: Backups.cs プロジェクト: ksparakis/cloud-recover
 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");
     }
 }
コード例 #3
0
ファイル: loginForm.cs プロジェクト: ksparakis/cloud-recover
        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();
        }