Ejemplo n.º 1
0
 public StreamsViewModel(Configuration conf, ICasparCGService casparCGService, IPlaceholderService placeholderService, IExecuteService executeService)
 {
     this.casparCGService    = casparCGService;
     this.placeholderService = placeholderService;
     this.executeService     = executeService;
     Streams           = new ObservableCollection <Stream>(conf.Streams);
     StreamsHeader     = conf.StreamsHeader;
     ActivateCommand   = new DelegateCommand <Stream>(ActivateStream);
     DeactivateCommand = new DelegateCommand <Stream>(DeactivateStream);
 }
Ejemplo n.º 2
0
        public StartupDialogViewModel(StartupConfiguration configuration, IPlaceholderService placeholderService, ICasparCGService casparService, IEventAggregator ea)
        {
            this.startupConfiguration = configuration;
            this.placeholderService   = placeholderService;
            this.casparService        = casparService;

            Configurations        = configuration.Configurations;
            SelectedConfiguration = Configurations?.FirstOrDefault();

            ea.GetEvent <Core.Events.StartupDialogClosing>().Subscribe(Closing);
        }
Ejemplo n.º 3
0
        public LowerthirdsViewModel(Configuration conf, ICasparCGService casparCGService, IPlaceholderService placeholder)
        {
            this.configuration   = conf;
            this.casparCGService = casparCGService;
            this.placeholder     = placeholder;

            Lowerthirds              = new ObservableCollection <Lowerthird>(conf.Lowerthirds);
            LowerthirdsHeader        = conf.LowerthirdsHeader;
            LowerthirdDeactivateText = conf.LowerthirdDeactivateText;

            ActivateCommand   = new DelegateCommand <Lowerthird>(Activate, i => !i.IsActive);
            AddCommand        = new DelegateCommand(Add);
            DeactivateCommand = new DelegateCommand(Deactivate, () => currentlyActive != null);
            DeleteCommand     = new DelegateCommand <Lowerthird>(Delete);
            EditCommand       = new DelegateCommand <Lowerthird>(Edit);

            EditDialogRequest = new InteractionRequest <Confirmation>();
        }