parent
b1052fa894
commit
7e3ce9ce56
|
@ -2,6 +2,7 @@ package org.hso.texturesyncclient.app
|
|||
|
||||
import javafx.scene.image.Image
|
||||
import javafx.stage.Stage
|
||||
import org.hso.texturesyncclient.controller.SettingsController
|
||||
import org.hso.texturesyncclient.view.startupView.StartupView
|
||||
import org.hso.texturesyncclient.view.startupView.StartupViewController
|
||||
import tornadofx.App
|
||||
|
@ -9,7 +10,7 @@ import tornadofx.App
|
|||
class Main: App(StartupView::class){
|
||||
|
||||
//start first controller
|
||||
private val svc = StartupViewController()
|
||||
private val svc: StartupViewController by inject()
|
||||
|
||||
override fun start(stage: Stage) {
|
||||
|
||||
|
@ -23,6 +24,9 @@ class Main: App(StartupView::class){
|
|||
|
||||
super.start(stage)
|
||||
stage.scene.stylesheets.add("/css/Styles.css") // this call must be after the super call
|
||||
|
||||
SettingsController.init()
|
||||
svc.initConnection()
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package org.hso.texturesyncclient.view.startupView
|
||||
|
||||
import org.hso.texturesyncclient.controller.RootController
|
||||
import org.hso.texturesyncclient.controller.SettingsController
|
||||
import tornadofx.Controller
|
||||
|
||||
|
||||
|
@ -10,9 +9,8 @@ class StartupViewController : Controller() {
|
|||
private val sv = find(StartupView::class)
|
||||
private val rootc = find(RootController::class)
|
||||
|
||||
init {
|
||||
fun initConnection() {
|
||||
println("init StartupViewController")
|
||||
SettingsController.init()
|
||||
startConnectionUI()
|
||||
runAsync {
|
||||
rootc.initConnection(" ")
|
||||
|
|
Loading…
Reference in New Issue