Code: Select all
ASYNC METHOD btnInstallServiceClick(sender AS Object , e AS EventArgs) AS VOID
SELF:obtnInstallService:Enabled := FALSE
AWAIT Task.Run(Action{ SELF , @InstallService() })
RETURN
PROTECT METHOD InstallService() AS VOID
VAR helper := Helper{}
helper:Install()
SELF:CheckButtons()
RETURN
Code: Select all
ASYNC METHOD btnInstallServiceClick(sender AS Object , e AS EventArgs) AS VOID
SELF:obtnInstallService:Enabled := FALSE
AWAIT Task.Run( { () => VAR helper := Helper{}; helper:Install(); SELF:CheckButtons() } )
RETURN
Regards,
Stefan