Interaction logic for LayerControl.xaml
Inheritance: System.Windows.Controls.UserControl, ILayer
Esempio n. 1
0
        public async void CommandBinding_AddVideo(object sender, ExecutedRoutedEventArgs e)
        {
            if (!menuAddVideo.IsEnabled)
            {
                return;
            }

            VideoListItem Result = SearchVideoWindow.Instance(new SearchSettings()
            {
                MediaType = MediaType.Video
            });

            if (Result != null)
            {
                LayerVideoControl Layer = new LayerVideoControl();
                await Layer.OpenMediaAsync(SessionCore.Instance.Business.GetMediaObject(Result.FileName));

                SessionCore.Instance.Layers.Add(Layer);
            }
        }
        public async void CommandBinding_AddVideo(object sender, ExecutedRoutedEventArgs e) {
            if (!menuAddVideo.IsEnabled)
                return;

            VideoListItem Result = SearchVideoWindow.Instance(new SearchSettings() { MediaType = MediaType.Video });
            if (Result != null) {
                LayerVideoControl Layer = new LayerVideoControl();
                await Layer.OpenMediaAsync(SessionCore.Instance.Business.GetMediaObject(Result.FileName));
                SessionCore.Instance.Layers.Add(Layer);
            }
        }