Ejemplo n.º 1
0
 public async void Deactivate()
 {
     if (await casparCGService.SendCommandsAsync(placeholder.ReplacePlaceholders(configuration.LowerthirdsDeactivateCommands, currentlyActive)))
     {
         currentlyActive.IsActive = false;
         currentlyActive          = null;
         DeactivateCommand.RaiseCanExecuteChanged();
         ActivateCommand.RaiseCanExecuteChanged();
     }
 }
Ejemplo n.º 2
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();
            }
        }