TextureSync/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt

31 lines
1.0 KiB
Kotlin

package org.hso.texturesyncclient.app
import org.hso.texturesyncclient.controller.RootController
import org.hso.texturesyncclient.controller.SettingsController
import org.hso.texturesyncclient.view.importView.ImportView
import org.hso.texturesyncclient.view.mainView.MainView
import org.hso.texturesyncclient.view.mainView.MainViewController
import org.hso.texturesyncclient.view.startupView.StartupView
import org.hso.texturesyncclient.view.startupView.StartupViewController
import tornadofx.App
class Main: App(StartupView::class){
val controller = RootController()
private val svc: StartupViewController by inject()
init {
SettingsController.init()
if (SettingsController.serverAddressIsSet()) {
//load settings in ui and try to connect
println("serverAddress is set")
svc.setServerAddress(SettingsController.getServerAddress())
svc.btnConnectAction(SettingsController.getServerAddress())
} else {
println("serverAddress is not set")
}
}
}