OpenMediaAsync() public method

public OpenMediaAsync ( Media item ) : Task
item DataAccess.Media
return Task
Exemplo 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);
            }
        }