private void executeBootloader() { List <BootloaderModel.Step> steps = new List <BootloaderModel.Step>(); // fetch profile { BootloaderModel.Step step = new BootloaderModel.Step(); step.name = Constant.BootloaderStep.FetchProfile; step.length = 1; step.tip = "bootloader_step_fetch_profile"; step.onExecute = () => { serviceAccount.FetchProfile(DataCache.activeAccountID, () => { controllerBootloader.FinishCurrentStep(); }); }; steps.Add(step); modelBootloader.SaveSteps(steps); } // refresh profile { BootloaderModel.Step step = new BootloaderModel.Step(); step.name = Constant.BootloaderStep.RefreshProfile; step.length = 1; step.tip = "bootloader_step_refresh_profile"; step.onExecute = () => { modelAccount.RefreshProfile(); controllerBootloader.FinishCurrentStep(); }; steps.Add(step); modelBootloader.SaveSteps(steps); } controllerBootloader.Execute(); }
private IEnumerator sleep() { yield return(new WaitForSeconds(3.0F)); controllerBootloader.FinishCurrentStep(); }