private void btnShutdown_Click(object sender, EventArgs e) { if (OSRemoteAdmin.admin_shutdown(senhaRegiao)) { MessageBox.Show("Shutdown accepted and in progress."); } else { MessageBox.Show("Shutdown wasn't accepted by the simulator"); } }
private void btnBackupOAR_Click(object sender, EventArgs e) { string nomeOAR = String.Format("{0:yyyy-MM-dd-HH-mm}.oar", DateTime.Now); if (OSRemoteAdmin.admin_save_oar(senhaRegiao, edtNomeRegiao.Text, classes.utilities.SOPath(String.Format("{0}\\{1}", oarDir, nomeOAR)))) { MessageBox.Show(String.Format("OAR Backup is running. File : {0}", nomeOAR)); ReloadOARFileList(); } else { MessageBox.Show("OAR Backup wasn't accepted by the simulator"); } }
private void btnRestoreOAR_Click(object sender, EventArgs e) { string nomeOAR = lsbArquivosBackup.Items[lsbArquivosBackup.SelectedIndex].ToString(); if (MessageBox.Show(String.Format("Confirm restore the OAR file {0} ?\n\nCurrent content will be LOST !", nomeOAR), "Restore OAR File", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (OSRemoteAdmin.admin_restore_oar(senhaRegiao, edtNomeRegiao.Text, classes.utilities.SOPath(String.Format("{0}\\{1}", oarDir, nomeOAR)))) { MessageBox.Show(String.Format("OAR Restore is running. File : {0}", nomeOAR)); } else { MessageBox.Show("OAR Restore wasn't accepted by the simulator"); } } }