Ejemplo n.º 1
0
        public Task GetStatus()
        {
            StatusViewModel vm = new StatusViewModel();

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

            return(Clients.All.SendAsync("Status", vm));
        }
Ejemplo n.º 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);
        }