OpenMediaAsync() public method

public OpenMediaAsync ( Media item ) : Task
item DataAccess.Media
return Task
Example #1
0
        public async void CommandBinding_AddAudio(object sender, ExecutedRoutedEventArgs e)
        {
            if (!menuAddAudio.IsEnabled)
            {
                return;
            }

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

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

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

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