Lisätty versiotieto ohjelmaan
Signed-off-by: laurimaaninka <lauri.maaninka@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
- Kuljetuslistaa luodessa kuljetusrivin nollaaminen/palauttaminen oletusmääriin.
|
||||
- Kuljetuslistojen ja raporttien tulostamismekanismin läpikäynti
|
||||
- Kierroshallinnassa asiakasta raahattaessa placeholderin fiksaus
|
||||
- Lisätty versionumero ohjelmaan
|
||||
|
||||
# 1.0.0
|
||||
Ohjelman kieli vaihdettu Pythonista Javaan, sekä tietokanta pickle-tiedostosta SQLite tietokantaan
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>fi.lpam</groupId>
|
||||
<artifactId>Ruokamanageri</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.1.0</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>25</maven.compiler.source>
|
||||
@@ -66,6 +66,12 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
@@ -24,6 +24,8 @@ public class App extends Application {
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws IOException {
|
||||
new Tietokanta(Main.dev);
|
||||
|
||||
|
||||
TabPane root = new TabPane();
|
||||
root.setSide(Side.LEFT);
|
||||
root.setTabMinWidth(50);
|
||||
@@ -53,7 +55,13 @@ public class App extends Application {
|
||||
|
||||
Scene scene = new Scene(root);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setTitle("Ruokamanageri");
|
||||
|
||||
StringBuilder title = new StringBuilder();
|
||||
title.append("Ruokamanageri");
|
||||
title.append(" v").append(Main.properties.getProperty("version"));
|
||||
if (Main.dev) title.append(" KEHITYS");
|
||||
primaryStage.setTitle(title.toString());
|
||||
|
||||
primaryStage.setMaximized(true);
|
||||
primaryStage.show();
|
||||
primaryStage.getIcons().add(new Image(Objects.requireNonNull(Main.class.getResourceAsStream("kuljetusruokalaatikko.jpg"))));
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package fi.lpam;
|
||||
|
||||
import javax.print.DocFlavor;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
public class Main {
|
||||
public static boolean dev;
|
||||
public static Properties properties;
|
||||
|
||||
static void main(String[] args) {
|
||||
//noinspection RedundantIfStatement
|
||||
@@ -10,6 +16,16 @@ public class Main {
|
||||
} else {
|
||||
dev = false;
|
||||
}
|
||||
|
||||
InputStream stream = Main.class.getClassLoader().getResourceAsStream("app.properties");
|
||||
properties = new Properties();
|
||||
try {
|
||||
properties.load(stream);
|
||||
}
|
||||
catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
App.main();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
version=${project.version}
|
||||
Reference in New Issue
Block a user