Advertisement
Laine_prikol

OC LPHM

Jul 12th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.22 KB | None | 0 0
  1. forms=require("forms")
  2. local term = require("term")
  3. local shell = require("shell")
  4. local computer = require("computer")
  5. local component = require("component")
  6. local os = require("os")
  7. os.execute("resolution 80 25")
  8. computer.beep(700,0.1)
  9. -- ГЛАВНАЯ ФОРМА
  10. Form1=forms.addForm()
  11. Form1.border=2
  12. Form1:addLabel(2,1,"Laine Programs Hub Menu LPHM1")
  13. Form1:addLabel(2,25,"Version: 0.2")
  14. -- ОБНОВЛЕНИЕ
  15. UpForm=forms.addForm()
  16. UpForm.border=2
  17. UpForm.W=60
  18. UpForm.H=12
  19. UpForm.left=math.floor((Form1.W-UpForm.W)/2)
  20. UpForm.top =math.floor((Form1.H-UpForm.H)/2)
  21. UpForm:addLabel(8,3,"Обновить LPHM и все его программы?")
  22. UpForm:addLabel(3,10,"PS: Все данные пользователя при обновлении остаются")
  23. UpForm:addButton(25,6,"Обновить",function() term.clear() os.execute("rm -r lphm") os.execute("rm 2") os.execute("rm lphmstart")  os.execute("pastebin run 1BxySpLe") end)
  24. UpForm:addButton(50,1, "X" , function() Form1:setActive() end)
  25. UpForm:addLabel(2,1,"Обновление LPHM(beta)")
  26. -- ВЫХОД
  27. exitForm=forms.addForm()
  28. exitForm.border=2
  29. exitForm.W=31
  30. exitForm.H=7
  31. exitForm.left=math.floor((Form1.W-exitForm.W)/2)
  32. exitForm.top =math.floor((Form1.H-exitForm.H)/2)
  33. exitForm:addLabel(8,3,"Вы хотите выйти?")
  34. exitForm:addButton(5,5,"Да",function() forms.stop() computer.beep(350,0.5) end)
  35. exitForm:addButton(18,5,"Нет",function() Form1:setActive() end)
  36. -- КНОПКИ
  37. Btn1=Form1:addButton(70,1,"X",function() exitForm:setActive() computer.beep(100,0.1) computer.beep(1000,0.5)  end)
  38. Btn1.color=0xFF0000
  39. Btn1=Form1:addButton(6,3,"Redboard Control2",function() os.execute("lphm/redboard") os.execute("2")  end)
  40. Btn1.color=0x505050
  41. Btn1=Form1:addButton(6,4,"Tanspol (beta)",function() os.execute("lphm/tanspol") os.execute("2") end)
  42. Btn1.color=0x505050
  43. Btn1=Form1:addButton(70,25,"UPDATE",function() UpForm:setActive() computer.beep(1500,0.3) end)
  44. Btn1.color=0x505050
  45. Btn1=Form1:addButton(10,5,"Tanspol Advanced (beta)",function() os.execute("lphm/tanspola") os.execute("2") end)
  46. Btn1.color=0x505050
  47. Btn1=Form1:addButton(6,6,"Clock (beta)",function() os.execute("lphm/clock") os.execute("2") end)
  48. Btn1.color=0x505050
  49. forms.run(Form1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement