public SequenceTypeDataModelBase() { Media = new MediaCollection(); LocalDataSet = new ModuleLocalDataSet(); SequenceLayers = new SequenceLayers(); _InitDataStreams(); }
public LayerEditorView(SequenceLayers layers) { CommandBindings.Add(new CommandBinding(LayerEditorCommands.AddLayer, OnAddLayer, CanExecuteAddLayer)); CommandBindings.Add(new CommandBinding(LayerEditorCommands.RemoveLayer, OnRemoveLayer, CanExecuteRemoveLayer)); CommandBindings.Add(new CommandBinding(LayerEditorCommands.ConfigureLayer, ConfigureLayer, CanExecuteConfigureLayer)); _layers = layers; InitializeLayers(); DataContext = this; Layers.CollectionChanged += Layers_CollectionChanged; }
private void SurrogateRead(StreamingContext context) { SelectedTimingProvider = _selectedTimingProviderSurrogate.CreateSelectedTimingProvider(); Media = new MediaCollection(_mediaSurrogates.Select(x => x.CreateMedia())); // Rehydrate the local module data store. LocalDataSet = new ModuleLocalDataSet(); LocalDataSet.DataModels = _dataModels; // Rehydrate the modules. var elementNodes = VixenSystem.Nodes.Distinct().ToDictionary(x => x.Id); IEffectNode[] effectNodes = _effectNodeSurrogates.Select(x => x.CreateEffectNode(elementNodes)).ToArray(); // weed out effects without nodes.. effectNodes = effectNodes.Where(x => x.Effect.TargetNodes.Count() != 0).ToArray(); ISequenceFilterNode[] sequenceFilterNodes = _filterNodeSurrogates.Select(x => x.CreateFilterNode()).ToArray(); // Connect them to their respective data from the data store. // This was previously being done by adding the data to the sequence after loading the data. foreach (var effectNode in effectNodes) { LocalDataSet.AssignModuleInstanceData(effectNode.Effect); } foreach (var sequenceFilterNode in sequenceFilterNodes) { LocalDataSet.AssignModuleInstanceData(sequenceFilterNode.Filter); } if (SequenceLayers != null) { var layerMixingFilterModels = new ModuleLocalDataSet { DataModels = _layerMixingFilterDataModels }; //Bring in the layers foreach (var layer in SequenceLayers.Layers) { var surrogate = _layerMixingFilterSurrogates.FirstOrDefault(x => x.LayerReferenceId == layer.Id); if (surrogate != null) { layer.LayerMixingFilter = surrogate.CreateLayerMixingFilter(); layerMixingFilterModels.AssignModuleInstanceData(layer.LayerMixingFilter); } } } else { SequenceLayers = new SequenceLayers(); } // Get the modules back into their collections. _InitDataStreams(); EffectData.AddData(effectNodes); SequenceFilterData.AddData(sequenceFilterNodes); }
public FindEffectForm(TimelineControl timelineControl, SequenceLayers layerManager) { InitializeComponent(); _layerManager = layerManager; contextMenuStrip1.Renderer = new ThemeToolStripRenderer(); Icon = Resources.Icon_Vixen3; TimelineControl = timelineControl; comboBoxFind.SelectedIndex = 0; listViewEffectStartTime.BeginUpdate(); listViewEffectStartTime.ColumnAutoSize(); listViewEffectStartTime.SetLastColumnWidth(); listViewEffectStartTime.EndUpdate(); ThemeUpdateControls.UpdateControls(this); }
public LayerEditor(SequenceLayers layers) { InitializeComponent(); var host = new ElementHost { Dock = DockStyle.Fill }; Controls.Add(host); _layerEditorView = new Editor.LayerEditor.LayerEditorView(layers); host.Child = _layerEditorView; _layerEditorView.CollectionChanged += LayerEditorViewCollectionChanged; }
private static Color ProcessIntentNodes(KeyValuePair <Guid, IntentNodeCollection> effectIntent, TimeSpan effectRelativeTime) { IntentStateList states = new IntentStateList(); foreach (IIntentNode intentNode in effectIntent.Value) { if (TimeNode.IntersectsInclusively(intentNode, effectRelativeTime)) { IIntentState intentState = intentNode.CreateIntentState(effectRelativeTime - intentNode.StartTime, SequenceLayers.GetDefaultLayer()); states.Add(intentState); } } return(IntentHelpers.GetOpaqueRGBMaxColorForIntents(states)); }
private static Dictionary <Color, DiscreteValue> ProcessDiscreteIntentNodes(KeyValuePair <Guid, IntentNodeCollection> effectIntent, TimeSpan effectRelativeTime) { IntentStateList states = new IntentStateList(); foreach (IIntentNode intentNode in effectIntent.Value) { if (TimeNode.IntersectsInclusively(intentNode, effectRelativeTime)) { IIntentState intentState = intentNode.CreateIntentState(effectRelativeTime - intentNode.StartTime, SequenceLayers.GetDefaultLayer()); states.Add(intentState); } } return(GetAlphaDiscreteColorsForIntents(states)); }
protected override ILayer GetLayerForNode(IEffectNode node) { return(SequenceLayers.GetDefaultLayer()); }
public StaticIntentState(ResultType value) : this(value, SequenceLayers.GetDefaultLayer()) { }
public IntentState(IIntent <ResultType> intent, TimeSpan intentRelativeTime) : this(intent, intentRelativeTime, SequenceLayers.GetDefaultLayer()) { }