Compare commits

..

No commits in common. "cd8a3218d5f5ab490fc98c83e32fa070c9c25284" and "39b2a2c442b6d96663b0f87fca117017fd33d63e" have entirely different histories.

3 changed files with 3 additions and 44 deletions

View File

@ -5,10 +5,4 @@ import tornadofx.App
class Main: App(StartupView::class){ class Main: App(StartupView::class){
} }

View File

@ -6,7 +6,6 @@ import com.jfoenix.controls.JFXTextField
import javafx.geometry.Insets import javafx.geometry.Insets
import javafx.geometry.Pos import javafx.geometry.Pos
import javafx.scene.control.Label import javafx.scene.control.Label
import javafx.scene.input.KeyCode
import javafx.scene.layout.Background import javafx.scene.layout.Background
import javafx.scene.layout.BackgroundFill import javafx.scene.layout.BackgroundFill
import javafx.scene.layout.CornerRadii import javafx.scene.layout.CornerRadii
@ -25,22 +24,16 @@ class StartupView : View() {
val btnConnect = JFXButton("Manuell Verbinden") val btnConnect = JFXButton("Manuell Verbinden")
private val svc: StartupViewController by inject()
override val root = borderpane { override val root = borderpane {
center = vbox(50) { center = vbox(50) {
maxWidth = 150.0 maxWidth = 150.0
alignment = Pos.CENTER alignment = Pos.CENTER
add(labelStatus) add(labelStatus).apply {
add(spinnerStatus) labelStatus.background = Background(BackgroundFill(Color.YELLOWGREEN, CornerRadii.EMPTY, Insets.EMPTY))
labelStatus.apply {
this.background = Background(BackgroundFill(Color.YELLOWGREEN, CornerRadii.EMPTY, Insets.EMPTY))
} }
add(spinnerStatus)
spinnerStatus.isVisible = false
vbox(10){ vbox(10){
alignment = Pos.CENTER alignment = Pos.CENTER
@ -48,13 +41,6 @@ class StartupView : View() {
add(labelServerIP) add(labelServerIP)
add(tfServerIP) add(tfServerIP)
add(btnConnect) add(btnConnect)
btnConnect.apply { action { svc.btnConnectAction(tfServerIP.text)} }
tfServerIP.setOnKeyPressed {
if (it.code == KeyCode.ENTER){
svc.btnConnectAction(tfServerIP.text)
}
}
} }
} }

View File

@ -4,27 +4,6 @@ import tornadofx.Controller
class StartupViewController : Controller() { class StartupViewController : Controller() {
fun btnConnectAction(txt:String){
println("Connect BTN: $txt")
//TODO check IP4
spinnterStart()
}
fun spinnterStart(){
val startupView = find(StartupView::class)
startupView.spinnerStatus.isVisible = true
}
fun spinnerStop(){
val startupView = find(StartupView::class)
startupView.spinnerStatus.isVisible = false
}
fun labelStatusSetText (txt:String){
val startupView = find(StartupView::class)
startupView.labelStatus.text = txt
}
} }