add export to c# button
This commit is contained in:
@@ -80,6 +80,7 @@ public class B3
|
||||
public final RadioButton msSqlStyle;
|
||||
public final CheckBox generateRelationalModelCB;
|
||||
public final Button saveSQLScriptBTN;
|
||||
public final Button saveCSScriptBTN;
|
||||
public final CheckBox generateInsertsCB;
|
||||
public final CheckBox singleInsertStatementCB;
|
||||
public final CheckBox addCurrentDateToDatabaseNameCB;
|
||||
@@ -743,6 +744,22 @@ public class B3
|
||||
}
|
||||
});
|
||||
|
||||
this.saveCSScriptBTN = new Button("Generate/Save C# script");
|
||||
this.saveCSScriptBTN.setTooltip(new Tooltip("The ddl-script will be generated and saved into a file"));
|
||||
this.saveCSScriptBTN.setMaxWidth(Double.MAX_VALUE);
|
||||
setMouseHandler(this.saveCSScriptBTN);
|
||||
GridPane.setFillWidth(this.saveCSScriptBTN, Boolean.TRUE);
|
||||
this.saveCSScriptBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, CornerRadii.EMPTY, Insets.EMPTY)));
|
||||
|
||||
this.saveCSScriptBTN.setOnAction(arg0 -> {
|
||||
if (B3.this.generateRelationalModelCB.isSelected()) {
|
||||
try {
|
||||
B3.this.saveSQLScript();
|
||||
} catch (ZZ20 ignored) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.generateInsertsCB = new CheckBox("Generate insert statement");
|
||||
this.generateInsertsCB.setTooltip(new Tooltip("If selected, insert statements are generated in the ddl-script"));
|
||||
@@ -878,7 +895,14 @@ public class B3
|
||||
box.getChildren().addAll(this.addCurrentDateToDatabaseNameCB, this.generateInsertsCB, this.singleInsertStatementCB, this.saveSQLScriptBTN);
|
||||
TitledPane createddl = new TitledPane("Create DDL", box);
|
||||
createddl.setExpanded(false);
|
||||
this.buttonPane.add(createddl, 0, ri, 2, 1);
|
||||
this.buttonPane.add(createddl, 0, ri++, 2, 1);
|
||||
|
||||
VBox csbox = new VBox(10.0D);
|
||||
csbox.getChildren().addAll(saveCSScriptBTN);
|
||||
|
||||
TitledPane createcsharp = new TitledPane("Create C# Code", csbox);
|
||||
createcsharp.setExpanded(false);
|
||||
this.buttonPane.add(createcsharp, 0, ri, 2, 1);
|
||||
|
||||
this.statusInformation = new TextField("Creation Mode: entity-set -> press left mouse button on working area -> enter name of entity-set -> press enter key");
|
||||
this.statusInformation.setEditable(false);
|
||||
|
||||
Reference in New Issue
Block a user