コード例 #1
0
        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;
            }
        }
コード例 #2
0
 private async void Closing(bool isConfirmed)
 {
     if (SelectedConfiguration != null)
     {
         placeholderService.AddAll(SelectedConfiguration.Values);
     }
     await casparService.SendCommandsAsync(placeholderService.ReplacePlaceholders(startupConfiguration.InitCommands));
 }
コード例 #3
0
        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();
            }
        }