private async Task <bool> DroppedFileCustomDialogAsync(string file)
        {
            MessageDialogResult result = await _dialogService.ShowMessageAsync(this, "", "", MessageDialogStyle.AffirmativeAndNegative);

            if (result == MessageDialogResult.Affirmative)
            {
                return(false);
            }

            var settings = new MetroDialogSettings();

            settings.ColorScheme = MetroDialogColorScheme.Theme;

            var fileNoExt = Path.GetFileNameWithoutExtension(file);

            ConvertSettings.AudioName     = fileNoExt;
            ConvertSettings.AnimationName = fileNoExt;

            var info = await MediaToolKit.GetVideoFormat(file);

            var infoSplit = info.Split(',');

            ConvertSettings.Fps = double.Parse(infoSplit[1]);

            customDialog = new CustomDialog()
            {
                Title = info
            };

            customDialog.Content = (VideoCopyView)_regionManager.Regions[RegionNames.ContentRegion].GetView("VideoCopyView");

            await _dialogService.ShowMetroDialogAsync(this, customDialog, settings);

            return(true);
        }
示例#2
0
        public async Task GetVideoFormatTest()
        {
            var info = await MediaToolKit.GetVideoFormat(@"C:\test.mp4");

            foreach (var item in info.Split(','))
            {
                Console.WriteLine(item);
            }
        }