Guest User

Untitled

a guest
Mar 15th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. package com.wt.mggui.model
  2.  
  3. import javafx.beans.property.SimpleStringProperty
  4. import tornadofx.*
  5.  
  6. /**
  7. * Created by wt on 2017/5/20.
  8. */
  9. class Config {
  10. val ipProperty = SimpleStringProperty()
  11. val dataBaseProperty = SimpleStringProperty()
  12. val rootUserProperty = SimpleStringProperty()
  13. val passwordProperty = SimpleStringProperty()
  14. val tableNameProperty = SimpleStringProperty()
  15. val entityNameProperty = SimpleStringProperty()
  16. val entityPackageProperty = SimpleStringProperty()
  17. val mapperPackageProperty = SimpleStringProperty()
  18. val servicePackageProperty = SimpleStringProperty()
  19. }
  20.  
  21. class ConfigModel(val configs: Config) : ViewModel() {
  22. val ip = bind { configs.ipProperty }
  23. val dataBase = bind { configs.dataBaseProperty }
  24. val rootUser = bind { configs.rootUserProperty }
  25. val password = bind { configs.passwordProperty }
  26. val tableName = bind { configs.tableNameProperty }
  27. val entityName = bind { configs.entityNameProperty }
  28. val entityPackage = bind { configs.entityPackageProperty }
  29. val mapperPackage = bind { configs.mapperPackageProperty }
  30. val servicePackage = bind { configs.servicePackageProperty }
  31. }
Add Comment
Please, Sign In to add comment