Major demo refresh.. switched everything to new function names, new design patterns

Out with the old, in with the new!!
This commit is contained in:
MikeTheWatchGuy 2018-09-24 18:01:00 -04:00
parent 2a06683383
commit a1f4c60271
68 changed files with 706 additions and 1863 deletions

View file

@ -30,25 +30,23 @@ def FlashLED():
layout = [[rg.T('Raspberry Pi LEDs')],
[rg.T('', size=(14, 1), key='output')],
[rg.ReadFormButton('Switch LED')],
[rg.ReadFormButton('Flash LED')],
[rg.Exit()]
]
[rg.ReadButton('Switch LED')],
[rg.ReadButton('Flash LED')],
[rg.Exit()]]
form = rg.FlexForm('Raspberry Pi GUI', grab_anywhere=False)
form.Layout(layout)
window = rg.Window('Raspberry Pi GUI', grab_anywhere=False).Layout(layout)
while True:
button, values = form.Read()
button, values = window.Read()
if button is None:
break
if button is 'Switch LED':
form.FindElement('output').Update(SwitchLED())
window.FindElement('output').Update(SwitchLED())
elif button is 'Flash LED':
form.FindElement('output').Update('LED is Flashing')
form.ReadNonBlocking()
window.FindElement('output').Update('LED is Flashing')
window.ReadNonBlocking()
FlashLED()
form.FindElement('output').Update('')
window.FindElement('output').Update('')
rg.Popup('Done... exiting')