public void autoBackup() { try { InitializeSystem.runningStatus = Common.Messages.Information.Info003; PreferenceManagerImpl preferenceImpl = new PreferenceManagerImpl(); String path = preferenceImpl.getPreferenceValueByKey("autoBackupLocation"); if(String.IsNullOrWhiteSpace(path)) { MessageBox.Show(Common.Messages.Error.Error002); InitializeSystem.isFinishedThread = true; } else { InitializeSystem.runningStatus = Common.Messages.Information.Info004; DirectoryInfo dirInfo = new DirectoryInfo(path); String saveFileName = DateTime.Today.ToString("yyyy-MM-dd") + ".sql"; if(!File.Exists(path + "\\" + saveFileName)) { InitializeSystem.runningStatus = Common.Messages.Information.Info005; Thread.Sleep(200); MySqlBackup mb = new MySqlBackup(DBConnector.getInstance().getConnection()); ExportInformations info = new ExportInformations(); info.FileName = path + "\\" + saveFileName; mb.Export(info); InitializeSystem.runningStatus = Common.Messages.Information.Info006; } } } catch(Exception) { } }