Laine_prikol

OpenLaineOS

May 1st, 2016
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- OpenLaineOS ver 1.1(beta)
  2. forms=require("forms")
  3. local term = require("term")
  4. local shell = require("shell")
  5. local computer = require("computer")
  6. local component = require("component")
  7. local os = require("os")
  8. local img = require "imglib"
  9. -- Переменные
  10. os_ver = "1.1"
  11. Form1=forms.addForm()
  12. Form1.border=2
  13. -- Обои скоро будут...
  14. -- Всё
  15. -- Выход
  16. exitForm=forms.addForm()
  17. exitForm.border=2
  18. exitForm.W=35
  19. exitForm.H=7
  20. exitForm.left=math.floor((Form1.W-exitForm.W)/2)
  21. exitForm.top =math.floor((Form1.H-exitForm.H)/2)
  22. exitForm:addLabel(8,3,"Вы хотите выйти в консоль?")
  23. exitForm:addButton(5,5,"Да",function() forms.stop() term.clear() end)
  24. exitForm:addButton(18,5,"Нет",function() Form1:setActive() end)
  25. -- Управление
  26. controlForm=forms.addForm()
  27. controlForm.border=2
  28. controlForm.W=31
  29. controlForm.H=7
  30. controlForm.left=math.floor((Form1.W-controlForm.W)/2)
  31. controlForm.top =math.floor((Form1.H-controlForm.H)/2)
  32. controlForm:addLabel(8,3,"Что хотите сделать?")
  33. controlForm:addButton(5,5,"Выключить",function() computer.shutdown(true) end)
  34. controlForm:addButton(18,5,"Перезагрузить",function() computer.shutdown(reboot) end)
  35. controlForm:addButton(20,1, "X" , function() Form1:setActive() end)
  36. controlForm:addLabel(2,1,"Система")
  37. -- Обновление
  38. UpForm=forms.addForm()
  39. UpForm.border=2
  40. UpForm.W=80
  41. UpForm.H=12
  42. UpForm.left=math.floor((Form1.W-UpForm.W)/2)
  43. UpForm.top =math.floor((Form1.H-UpForm.H)/2)
  44. UpForm:addLabel(8,3,"Обновить систему? Ваша версия:")
  45. UpForm:addLabel(8,4,os_ver)
  46. UpForm:addLabel(3,8,"Примичание: если вы сделайте установку обновлений вручную то, вам нужно будет")
  47. UpForm:addLabel(3,9,"в программах найти файл 'Custon update'")
  48. UpForm:addLabel(3,10,"Примичание: Все данные пользователя при обновлении остаются")
  49. UpForm:addButton(5,5,"Обновить",function() term.clear() os.execute("pastebin run ZkfNN8as installer") end)
  50. UpForm:addButton(50,5,"Загрузить инсталлер и сделать установку вручную",function() os.execute("pastebin get ZkfNN8as installOS")  end)
  51. UpForm:addButton(70,1, "X" , function() Form1:setActive() end)
  52. UpForm:addLabel(2,1,"Обновление системы(beta)")
  53. -- Кнопаны на столе
  54. Btn1=Form1:addButton(2,2,"Выход",function() exitForm:setActive() end)
  55. Btn1.color=0x818585
  56. Btn2=Form1:addButton(11,2,"Управление",function() controlForm:setActive() end)
  57. Btn2.color=0x818585
  58. Btn3=Form1:addButton(21,2,"Программы",function() ProgForm:setActive() end)
  59. Btn3.color=0x818585
  60. Btn4=Form1:addButton(31,2,"О системе",function() os.execute("edit credits") os.execute("OS_start") end)
  61. Btn4.color=0x818585
  62. Btn4=Form1:addButton(44,2,"Выйти из системы",function() os.execute("Lock.lua") os.execute("OS_start") end)
  63. Btn4.color=0x818585
  64. Btn5=Form1:addButton(44,2,"Обновление системы",function() UpForm:setActive() end)
  65. Btn5.color=0x818585
  66. controlForm:addLabel(2,1,"Система")
  67. -- Список программ
  68. ProgForm=forms.addForm()
  69. ProgForm.border=2
  70. ProgForm:addLabel(2,1,"Программы")
  71. Btn2=ProgForm:addButton(5,20,"X",function() Form1:setActive() end)
  72. ProgForm.W=18
  73. ProgForm.H=20
  74. ProgForm.left=math.floor((Form1.W-ProgForm.W)/2)
  75. ProgForm.top =math.floor((Form1.H-ProgForm.H)/2)
  76. Btn2=ProgForm:addButton(5,3,"Midday commander",function() os.execute("mc") os.execute("OS_start") end)
  77. Btn2.color=B0FAAF
  78. Btn3=ProgForm:addButton(5,4,"RedBoardControl2",function() os.execute("redcontrol") os.execute("OS_start") end)
  79. Btn3.color=B0FAAF
  80. Btn4=ProgForm:addButton(5,5,"Tanspol(beta)",function() os.execute("Tans1") os.execute("OS_start") end)
  81. Btn4.color=B0FAAF
  82. Btn5=ProgForm:addButton(5,6,"Change Password",function() os.execute("edit Lock.lua") os.execute("OS_start") end)
  83. Btn5.color=B0FAAF
  84. Btn5=ProgForm:addButton(5,7,"Custom Update(beta)",function() os.execute("installOS") end)
  85. Btn5.color=B0FAAF
  86. forms.run(Form1)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×