Ejemplo n.º 1
0
        /// <summary>
        /// Converts the file.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void ConvertFileClick(object sender, EventArgs e)
        {
            Progress <IProgressData> progressIndicator = new Progress <IProgressData>(ReportFileConversionProgress);

            StreamingCombineUiModel streamingCombineUiModel = GetBoundMetaData();

            _presenter.ConvertFile(streamingCombineUiModel, progressIndicator);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the converted file path.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void SetConvertedFilePathClick(object sender, EventArgs e)
        {
            StreamingCombineUiModel conversionData = GetBoundMetaData();

            SaveFileDialog dialog = new SaveFileDialog
            {
                AddExtension = true,
                DefaultExt   = ".mp4",
                Filter       = "MP4 File (*.mp4)|*.mp4|MKV File (*.mkv)|*.mkv"
            };

            dialog.ShowDialog();

            SetSuggestedControl(btnConvertFile, false);

            conversionData.ConvertedFilePath = dialog.FileName;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Sets the combined file location click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        void SetCombinedFileLocationClick(object sender, EventArgs e)
        {
            StreamingCombineUiModel conversionData = GetBoundMetaData();

            OpenFileDialog dialog = new OpenFileDialog
            {
                AddExtension = true,
                DefaultExt   = ".ts",
                Filter       = "MPEG Transport Stream File (*.ts)|*.ts"
            };

            dialog.ShowDialog();

            conversionData.UnconvertedFilePath = dialog.FileName;

            SetSuggestedControl(btnSetConvertedFileLocation, true);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Sets the temporary location.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void SetTempChunkFilesLocationClick(object sender, EventArgs e)
        {
            StreamingCombineUiModel conversionData = GetBoundMetaData();
            string tempDirectory = conversionData.TempDirectory;

            FolderBrowserDialog dialog = new FolderBrowserDialog
            {
                ShowNewFolderButton = true,
            };

            if (Directory.Exists(tempDirectory))
            {
                dialog.SelectedPath = tempDirectory;
            }
            else
            {
                dialog.RootFolder = Environment.SpecialFolder.Desktop;
            }

            dialog.ShowDialog();

            conversionData.TempDirectory = dialog.SelectedPath;
        }