//Check if the config file is exist or not and work with it
private boolean initConfig() {
DataConfig dataConfig = new DataConfig();
if (dataConfig.isConfigFileExist()) {
//System.out.println("Exist, now should try to read the config File");
ConfigBean configBean;
//read object from config file
configBean = dataConfig.readConfigFile();
if (configBean != null) {
//start checking object
// System.out.println("not null");
if (DataConfig.IsValidDBInfo(configBean)) {
//db info is ok, now check the admin
if (dataConfig.IsValidAdminInfo(configBean)) {
//admin info ok, now we should clear ther admin info then open the main form
//configBean.setAdminID(-1);
configBean.setAdminAccount("");
dataConfig.writeConfigFile(configBean);
return true;
} else {
//admin info is not ok, open login dialog
(new Login()).setVisible(true);