Beispiel #1
0
        private async Task ReleaseLightModuleAsync()
        {
            await LightModule.StopAsync();

            LightModule.Dispose();
            LightModule = null;
        }
Beispiel #2
0
 /// <summary>
 /// 开启模拟灯光
 /// </summary>
 /// <param name="group"></param>
 /// <returns></returns>
 private async Task StartLightAsync(string group)
 {
     if (LightExamItem != null && LightExamItem.State == ExamItemState.Progressing)
     {
         await LightModule.StopAsync();
     }
     await LightModule.StartAsync(new ExamContext { ExamGroup = group });
 }