예제 #1
0
 private void shutDown() {
   // inform every usecase
   UCUseCases.toClose();
   // shutdown data connection
   UDataBaseConnect.CloseConnection(connection);
   new Deb(debug, "closing");
   System.exit(0);
 }
예제 #2
0
  public Control() {
    app_settings_pane =
        new FLGProperties(
            app_settings, propertyfilename, new File(defaultfilename), significantstring);
    app_settings = app_settings_pane.getProperties();
    new Deb(debug, "fetched properties");
    if (!UDataBaseConnect.getDataBankDrivers(app_settings))
      javax.swing.JOptionPane.showMessageDialog(
          null,
          "'sun.jdbc.odbc.JdbcOdbcDriver' or 'com.mysql.jdbc.Driver' nicht gefunden.\nDas Programm wird jetzt beendet");

    do {

      connection = UDataBaseConnect.getConnection(app_settings);
      if (connection == null) {
        VPVDialog.showSettingsDialog(app_settings_pane);
      }
      new Deb(debug, "connecting");
    } while (connection == null);
    new Deb(debug, "connected");
    thecontrol = this;
    // USQLQuery.setParams(this,connection);
    // new Deb(debug,"initialized UtilsParams");
    bvs = new UStorage(this, connection);
    new Deb(debug, "initialized bvs");
    OBUBookUse.init();
    new Deb(debug, "initialized OBUBuukUse");
    EtikettDruck.setPropertyFileStrings(
        propertyfilenameett, defaultfilenameett, significantstringett);
    new Deb(debug, "set EtikettDruck.setPropertyFileStrings");
    mainGUI = new MainGUI(this);
    new Deb(debug, "initialized mainGUI");
    ((VBVCSVImporterView) (UCUseCases.Datenimport.view)).init(mainGUI);
    new Deb(debug, "initialized BVCSV");
    switchusecases = UCUseCases.getSelected2Usecases();
    new Deb(debug, "initialized switchusecases");
    scanner = new ScanAdapter(this);
    new Deb(debug, "initialized SCANNER");
    MainGUI.selectView(UCUseCases.Ausleihe); // default usecase
    new Deb(debug, "End of Constructor of Control");
  }