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

31 lines
1.0 KiB
Kotlin
Raw Normal View History

package org.hso.texturesyncclient.app
2019-06-03 17:33:23 +02:00
import org.hso.texturesyncclient.controller.RootController
2019-06-05 16:05:10 +02:00
import org.hso.texturesyncclient.controller.SettingsController
import org.hso.texturesyncclient.view.importView.ImportView
import org.hso.texturesyncclient.view.mainView.MainView
2019-06-04 18:20:09 +02:00
import org.hso.texturesyncclient.view.mainView.MainViewController
import org.hso.texturesyncclient.view.startupView.StartupView
2019-06-05 16:05:10 +02:00
import org.hso.texturesyncclient.view.startupView.StartupViewController
import tornadofx.App
2019-06-05 16:05:10 +02:00
class Main: App(StartupView::class){
2019-06-04 16:05:47 +02:00
val controller = RootController()
2019-06-05 16:05:10 +02:00
private val svc: StartupViewController by inject()
2019-06-04 16:05:47 +02:00
init {
2019-06-05 16:05:10 +02:00
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")
}
2019-06-04 16:05:47 +02:00
}
}