Fixed LockBTN when no DB is loaded

This commit is contained in:
Hendrik Schutter 2018-10-05 23:01:30 +02:00
parent 786586c382
commit 2a59156b0b
2 changed files with 11 additions and 0 deletions

View File

@ -84,6 +84,7 @@ public class Main extends Application
// config.xml NOT found, first start of app
System.out.println("keine XML gefunden!");
mwc.blockUI(true); // disable UI elements that need DB
mwc.blockUnlock();
File dir = new File(System.getProperty("user.home") + "/bin/jFxKasse");
dir.mkdir(); // Create new Subfolder
}

View File

@ -24,6 +24,8 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
import org.omg.CORBA.PUBLIC_MEMBER;
import com.jfoenix.controls.JFXTextField;
import javafx.beans.value.ChangeListener;
@ -408,6 +410,8 @@ public class MainWindowController
initUI(); // Starting the UI elements
getSelectedCat();
createNewJob();
btnLock.setDisable(false);
}
@ -1252,6 +1256,12 @@ public class MainWindowController
public void updateTimeLabel()
{
labelTime.setText("Uhrzeit: " + getSystemTime());
}
public void blockUnlock() {
btnLock.setDisable(true);
}
}