private void importthread() { BackupSettingsExportImport newimport = new BackupSettingsExportImport(); if (newimport != null) { newimport.newmessage += new textexportmessage(textoutput); newimport.ExportImport(ref progressBar, CONFIG_FILE); newimport.MyLoadSettings(); newimport.getallversionnumbers("", false); //get only program version numbers after loadsettings bool ok = newimport.restorebackup(filenametextBox.Text); if (ok) MessageBox.Show(this, "Import completed successfully"); else { if (PB_th != null) { newimport.ProgressbarCancel(); } MessageBox.Show(this, "Import not successful - Check the status and the log file"); } newimport.MySaveSettings(); newimport.newmessage -= new textexportmessage(textoutput); } textoutput("\n"); //create new paragraph after completed export BUSY = false; //job completed /* bool ok = newexportimport.restorebackup(filenametextBox.Text); if (ok) MessageBox.Show("Import completed successfully", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); else { if (PB_th != null) { newexportimport.progressbar((int)PB_action.CANCEL, ref PB_Import, PB_action_number); } MessageBox.Show(this, "Import not successful - Check the status and the log file"); } //MyLoadSettings(); // reload plugin settings after import textoutput("\n"); //create new paragraph after completed import BUSY = false; //reset processing flag */ }
private void exportthread() { BackupSettingsExportImport newexport = new BackupSettingsExportImport(); if (newexport != null) { //newexport.ExportImportInit(ref progressBar, false); newexport.newmessage += new textexportmessage(textoutput); newexport.ExportImport(ref progressBar,CONFIG_FILE); newexport.MyLoadSettings(); newexport.getallversionnumbers("", false); //get only program version numbers after loadsettings bool ok = newexport.createbackup(filenametextBox.Text); if (ok) MessageBox.Show(this, "Export completed successfully"); else { if (PB_th != null) { newexport.ProgressbarCancel(); } MessageBox.Show(this, "Export not successful - Check the status and the log file"); } newexport.MySaveSettings(); newexport.newmessage -= new textexportmessage(textoutput); } textoutput("\n"); //create new paragraph after completed export BUSY = false; //job completed }