private async void ActivateStream(Stream str) { if (str.CommandLineOnActivate != null) { executeService.ExecuteCommandLine(placeholderService.ReplacePlaceholders(str.CommandLineOnActivate, str)); } if (!await casparCGService.SendCommandsAsync(placeholderService.ReplacePlaceholders(str.ActivateCommands, str))) { str.IsActive = false; } }
private async void Closing(bool isConfirmed) { if (SelectedConfiguration != null) { placeholderService.AddAll(SelectedConfiguration.Values); } await casparService.SendCommandsAsync(placeholderService.ReplacePlaceholders(startupConfiguration.InitCommands)); }
public async void Activate(Lowerthird lowerthird) { bool worked; if (currentlyActive != null) { if (worked = await casparCGService.SendCommandsAsync(placeholder.ReplacePlaceholders(configuration.LowerthirdsChangeCommands, lowerthird))) { currentlyActive.IsActive = false; } } else { worked = await casparCGService.SendCommandsAsync(placeholder.ReplacePlaceholders(configuration.LowerthirdsActivateCommands, lowerthird)); } if (worked) { currentlyActive = lowerthird; lowerthird.IsActive = true; DeactivateCommand.RaiseCanExecuteChanged(); ActivateCommand.RaiseCanExecuteChanged(); } }