public FormEffectEditor(TimedSequenceEditorForm sequenceEditorForm) { InitializeComponent(); _sequenceEditorForm = sequenceEditorForm; host = new ElementHost { Dock = DockStyle.Fill }; _effectPropertyEditorGridEffectEffectPropertiesEditor = new EffectPropertyEditorGrid { ShowReadOnlyProperties = true, PropertyFilterVisibility = Visibility.Hidden }; _effectPropertyEditorGridEffectEffectPropertiesEditor.KeyDown += Editor_OnKeyDown; host.Child = _effectPropertyEditorGridEffectEffectPropertiesEditor; Controls.Add(host); sequenceEditorForm.TimelineControl.SelectionChanged += timelineControl_SelectionChanged; _effectPropertyEditorGridEffectEffectPropertiesEditor.PropertyValueChanged += EffectPropertyEditorValueChanged; _effectPropertyEditorGridEffectEffectPropertiesEditor.PreviewChanged += EditorPreviewStateChanged; _previewLoopTimer.Elapsed += PreviewLoopTimerOnElapsed; }
public FormEffectEditor(TimedSequenceEditorForm sequenceEditorForm) { if (Application.Current == null) { // create the Application object new Application(); } ResourceDictionary dict = new ResourceDictionary { Source = new Uri("/EffectEditor;component/Themes/Theme.xaml", UriKind.Relative) }; Application.Current.Resources.MergedDictionaries.Add(dict); InitializeComponent(); _sequenceEditorForm = sequenceEditorForm; host = new ElementHost { Dock = DockStyle.Fill }; _effectPropertyEditorGridEffectEffectPropertiesEditor = new EffectPropertyEditorGrid { ShowReadOnlyProperties = true, PropertyFilterVisibility = Visibility.Hidden }; _effectPropertyEditorGridEffectEffectPropertiesEditor.KeyDown += Editor_OnKeyDown; host.Child = _effectPropertyEditorGridEffectEffectPropertiesEditor; Controls.Add(host); sequenceEditorForm.TimelineControl.SelectionChanged += timelineControl_SelectionChanged; _effectPropertyEditorGridEffectEffectPropertiesEditor.PropertyValueChanged += EffectPropertyEditorValueChanged; _effectPropertyEditorGridEffectEffectPropertiesEditor.PreviewChanged += EditorPreviewStateChanged; _previewLoopTimer.Elapsed += PreviewLoopTimerOnElapsed; }