예제 #1
0
        public Task GetStatus()
        {
            StatusViewModel vm = new StatusViewModel();

            vm.bpm        = StreamingSetup.GetBPM();
            vm.IsAutoMode = EffectService.IsAutoModeRunning();

            return(Clients.All.SendAsync("Status", vm));
        }
예제 #2
0
        public async Task GetStatus()
        {
            var configs = await StreamingSetup.GetGroupConfigurationsAsync();

            StatusViewModel vm = new StatusViewModel();

            vm.bpm        = StreamingSetup.GetBPM();
            vm.IsAutoMode = EffectService.IsAutoModeRunning();
            vm.AutoModeHasRandomEffects = EffectService.AutoModeHasRandomEffects;
            vm.ShowDisconnect           = !(StreamingSetup.CurrentConnection?.HideDisconnect ?? false);
            vm.GroupNames   = configs.Select(x => x.Name).ToList();
            vm.CurrentGroup = StreamingSetup.CurrentConnection?.Name;

            await Clients.All.SendAsync("Status", vm);
        }