Guest User

Untitled

a guest
Apr 10th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. Shoes.app(:title => 'FTP File Uploader', :width => 500, :height => 400, :resizable => false) do
  2.  
  3. require 'net/ftp'
  4.  
  5. background gradient rgb(255, 255, 255), rgb(150, 150, 150), :angle => 45
  6.  
  7. stack :margin => 20 do
  8. caption 'FTP File Uploader'
  9.  
  10. flow :margin => 3 do
  11. inscription 'FTP-server: '
  12. @server = edit_line :width => 200
  13. end
  14.  
  15. flow :margin => 3 do
  16. inscription 'FTP-path: '
  17. @path = edit_line :width => 200
  18. end
  19.  
  20. flow :margin => 3 do
  21. inscription 'Username: '
  22. @username = edit_line :width => 200, :text => 'anonymous'
  23. end
  24.  
  25. flow :margin => 3 do
  26. inscription 'Password: '
  27. @password = edit_line :width => 200, :secret => true
  28. end
  29.  
  30. para
  31.  
  32. flow :margin => 3 do
  33. inscription 'Filename: '
  34. @filename = edit_line :width => 200
  35. para ' '
  36. button 'Browse...' do
  37. @filename.text = ask_open_file
  38. end
  39. end
  40.  
  41. flow :margin => 3 do
  42. @status = para ''
  43. end
  44.  
  45. end
  46. end
Add Comment
Please, Sign In to add comment