Advertisement
Guest User

Untitled

a guest
Jan 29th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.67 KB | None | 0 0
  1. class Settings:
  2.  
  3.     def retention(self):
  4.         app.addLabelOptionBox("Delete", ["After", "Before"], 5, 5)
  5.         app.addLabel("txt1Lab", "backup.", 5, 6)
  6.         app.addEntry("daysEntry", 5, 7, 0, 0)
  7.         app.addLabel("txt2Lab", "day(s).", 5, 8)
  8.  
  9.     def ok(self):
  10.         return app.getEntry("userEntry")
  11.  
  12.     ## GUI ##
  13.     app = gui(handleArgs=False,title="Settings Window")#,size="fullscreen")
  14.     app.setBg("lightBlue")
  15.  
  16.     ## Header ##
  17.     #app.addLabel("header","Settings page of Syback. All informations will be saved on instalation directory.",0,0,3
  18.  
  19.     ## First Block ##
  20.     app.addLabel("title1Lab", "Connection", 0, 0, 9)
  21.     app.addHorizontalSeparator(1,0,9)
  22.     app.addLabel("userLab", "Username:", 2, 0)
  23.     app.addEntry("userEntry", 2, 1)
  24.     app.addLabel("passLab", "Password:", 2, 2)
  25.     app.addSecretEntry("passEntry", 2, 3)
  26.     app.addLabel("dbLab", "DBName:", 2, 4)
  27.     app.addEntry("dbEntry", 2, 5)
  28.     app.addLabel("srvLab", "Server:", 2, 6)
  29.     app.addEntry("srvEntry", 2, 7)
  30.     app.addCheckBox("Encryption", 2, 8)
  31.  
  32.     ## Second BLock ##
  33.     app.addLabel("title2Lab", "Backup and Retention", 3, 0, 9)
  34.     app.addHorizontalSeparator(4,0,9)
  35.     app.addLabel("dir1Lab", "Backup FULL Directory:", 5, 0)
  36.     app.addEntry("dir1Entry", 5, 1, 3)
  37.     app.addButton("Enable retention policy", retention, 5, 4)
  38.     app.addLabel("dir2Lab", "Backup TLOG Directory:", 6, 0)
  39.     app.addEntry("dir2Entry", 6, 1, 3)
  40.  
  41.     ## Button ##
  42.     app.addButton("OK", ok, 7, 1, 9)
  43.  
  44.     ## Adjustments ##
  45.     app.setFocus("userEntry")
  46.     app.getLabelWidget("title1Lab").config(font="Helvetica 18")
  47.     app.getLabelWidget("title2Lab").config(font="Helvetica 18")
  48.  
  49.     ## GRID VIEW ##
  50.     #app.setLabelBg("header","red")
  51.     #app.getLabelWidget("header").config(font="Helvetica 22"
  52.  
  53.     app.go()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement