Exemplo n.º 1
0
        /**
         * ダイアログを表示する。
         */
        public static async Task <bool> Show(StorageFile source, FrameworkElement anchor, WvvTrimmingCompleted completed)
        {
            if (null == completed)
            {
                return(false);
            }

            var content = new WvvTrimmingDialog(source, completed);
            await WvvDialog.Show(content, anchor);

            return(true);
        }
Exemplo n.º 2
0
        private async void OnTrimmingDialog(object sender, TappedRoutedEventArgs e)
        {
            var picker = new FileOpenPicker();

            picker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.VideosLibrary;
            picker.FileTypeFilter.Add(".mp4");
            Windows.Storage.StorageFile file = await picker.PickSingleFileAsync();

            if (file == null)
            {
                Debug.WriteLine("File picking cancelled");
                return;
            }

            await WvvTrimmingDialog.Show(file, (FrameworkElement)sender, (trimmed, renderer) =>
            {
                Debug.WriteLine("Trimmed.");
            });
        }