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); }
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); }
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>(); }