From 3162dafdd060dd6d416092daf560534ac5616d17 Mon Sep 17 00:00:00 2001 From: Matt McManis Date: Mon, 21 Oct 2019 21:01:45 -0700 Subject: [PATCH] v1.7.7.0-alpha Added Valid Path Checker Improved Audio Bitrate Converter Calculator using Normalizer Fixed `FLAC` Batch Auto Quality --- source/Axiom/Axiom/Controls/AudioControls.cs | 12 +- source/Axiom/Axiom/Controls/Configure.cs | 10 +- source/Axiom/Axiom/Controls/FormatControls.cs | 12 +- source/Axiom/Axiom/Controls/ScriptView.cs | 2 +- .../Axiom/Axiom/Controls/SubtitleControls.cs | 8 +- source/Axiom/Axiom/Controls/VideoControls.cs | 22 +- source/Axiom/Axiom/CropWindow.xaml.cs | 30 +- source/Axiom/Axiom/DebugConsole.xaml.cs | 16 +- source/Axiom/Axiom/FFmpeg/FFmpeg.cs | 32 +- source/Axiom/Axiom/FFmpeg/FFplay.cs | 4 +- source/Axiom/Axiom/FFmpeg/FFprobe.cs | 56 +- source/Axiom/Axiom/FailedImportWindow.xaml.cs | 4 +- .../Axiom/Axiom/FilePropertiesWindow.xaml.cs | 2 +- source/Axiom/Axiom/Filters/AudioFilters.cs | 20 +- source/Axiom/Axiom/Filters/VideoFilters.cs | 38 +- source/Axiom/Axiom/Generators/Audio.cs | 247 +++--- source/Axiom/Axiom/Generators/Format.cs | 14 +- source/Axiom/Axiom/Generators/Streams.cs | 10 +- source/Axiom/Axiom/Generators/Subtitle.cs | 14 +- source/Axiom/Axiom/Generators/Video.cs | 128 ++-- source/Axiom/Axiom/Log.cs | 20 +- source/Axiom/Axiom/LogConsole.xaml.cs | 8 +- source/Axiom/Axiom/MainWindow.xaml | 2 +- source/Axiom/Axiom/MainWindow.xaml.cs | 701 ++++++++++-------- source/Axiom/Axiom/Presets/Profiles.cs | 22 +- source/Axiom/Axiom/Properties/AssemblyInfo.cs | 4 +- .../Axiom/Properties/Resources.Designer.cs | 8 +- source/Axiom/Axiom/UpdateWindow.xaml.cs | 17 +- .../Axiom/Axiom/ViewModel/AudioViewModel.cs | 6 +- .../Axiom/ViewModel/ConfigureViewModel.cs | 12 +- .../Axiom/ViewModel/FilterAudioViewModel.cs | 8 +- .../Axiom/ViewModel/FilterVideoViewModel.cs | 8 +- .../Axiom/Axiom/ViewModel/FormatViewModel.cs | 8 +- source/Axiom/Axiom/ViewModel/MainViewModel.cs | 12 +- .../Axiom/ViewModel/SubtitleViewModel.cs | 6 +- .../Axiom/Axiom/ViewModel/VideoViewModel.cs | 6 +- source/Axiom/Axiom/ViewModel/ViewModelBase.cs | 2 +- 37 files changed, 845 insertions(+), 686 deletions(-) diff --git a/source/Axiom/Axiom/Controls/AudioControls.cs b/source/Axiom/Axiom/Controls/AudioControls.cs index f514ae00..556d6adf 100644 --- a/source/Axiom/Axiom/Controls/AudioControls.cs +++ b/source/Axiom/Axiom/Controls/AudioControls.cs @@ -41,7 +41,7 @@ namespace Axiom public class AudioControls { /// - /// Set Controls + /// Set Controls /// public static void SetControls(string codec_SelectedItem) { @@ -423,7 +423,7 @@ public static void SetControls(string codec_SelectedItem) /// - /// Audio BitRate Display + /// Audio BitRate Display /// public static void AudioBitRateDisplay( List items, @@ -457,7 +457,7 @@ string selectedQuality /// - /// Quality Controls + /// Quality Controls /// public static void QualityControls() { @@ -514,7 +514,7 @@ public static void QualityControls() /// - /// Auto Copy Conditions Check + /// Auto Copy Conditions Check /// public static bool AutoCopyConditionsCheck( string inputExt, @@ -552,7 +552,7 @@ public static void QualityControls() /// - /// Copy Controls + /// Copy Controls /// public static void CopyControls() { @@ -684,7 +684,7 @@ public static void CopyControls() /// - /// Auto Codec Copy + /// Auto Codec Copy /// public static void AutoCopyAudioCodec() { diff --git a/source/Axiom/Axiom/Controls/Configure.cs b/source/Axiom/Axiom/Controls/Configure.cs index b5ccb77c..a46a408b 100644 --- a/source/Axiom/Axiom/Controls/Configure.cs +++ b/source/Axiom/Axiom/Controls/Configure.cs @@ -45,7 +45,7 @@ public class Configure /// - /// INI Reader + /// INI Reader /// /* * Source: GitHub Sn0wCrack @@ -79,7 +79,7 @@ public string Read(string Section, string Key) /// - /// Import axiom.conf file + /// Import axiom.conf file /// public static void ImportConfig(MainWindow mainwindow) { @@ -204,7 +204,7 @@ public static void ImportConfig(MainWindow mainwindow) /// - /// Import Read Config + /// Import Read Config /// public static void ReadConfig(MainWindow mainwindow, /*MainView vm, */INIFile conf) { @@ -307,7 +307,7 @@ public static void ReadConfig(MainWindow mainwindow, /*MainView vm, */INIFile co /// - /// Export axiom.conf + /// Export axiom.conf /// public static void ExportConfig(MainWindow mainwindow, string path) { @@ -463,7 +463,7 @@ public static void ExportConfig(MainWindow mainwindow, string path) /// - /// Export Write Config + /// Export Write Config /// //public static void WriteConfig(MainWindow mainwindow, MainViewModel vm, INIFile conf) //{ diff --git a/source/Axiom/Axiom/Controls/FormatControls.cs b/source/Axiom/Axiom/Controls/FormatControls.cs index 5e1f9b01..3f66dc56 100644 --- a/source/Axiom/Axiom/Controls/FormatControls.cs +++ b/source/Axiom/Axiom/Controls/FormatControls.cs @@ -40,12 +40,12 @@ public class FormatControls { // -------------------------------------------------------------------------------------------------------- /// - /// ComboBoxes Item Sources + /// ComboBoxes Item Sources /// // -------------------------------------------------------------------------------------------------------- /// - /// Set Controls + /// Set Controls /// public static void SetControls(string container_SelectedItem) { @@ -417,7 +417,7 @@ public static void SetControls(string container_SelectedItem) /// - /// Get Output Extension + /// Get Output Extension /// public static void OutputFormatExt() { @@ -428,7 +428,7 @@ public static void OutputFormatExt() /// - /// MediaType Controls Controls + /// MediaType Controls Controls /// public static void MediaTypeControls() { @@ -844,7 +844,7 @@ public static void MediaTypeControls() /// - /// Audio Stream Controls + /// Audio Stream Controls /// public static void AudioStreamControls() { @@ -969,7 +969,7 @@ public static void AudioStreamControls() /// - /// Cut Controls + /// Cut Controls /// public static void CutControls() { diff --git a/source/Axiom/Axiom/Controls/ScriptView.cs b/source/Axiom/Axiom/Controls/ScriptView.cs index efd1ecf3..47dac8af 100644 --- a/source/Axiom/Axiom/Controls/ScriptView.cs +++ b/source/Axiom/Axiom/Controls/ScriptView.cs @@ -33,7 +33,7 @@ public class ScriptView public static bool sort = false; /// - /// Clear RichTextBox + /// Clear RichTextBox /// public static void ClearScriptView() { diff --git a/source/Axiom/Axiom/Controls/SubtitleControls.cs b/source/Axiom/Axiom/Controls/SubtitleControls.cs index 7901a4ee..fe45a23f 100644 --- a/source/Axiom/Axiom/Controls/SubtitleControls.cs +++ b/source/Axiom/Axiom/Controls/SubtitleControls.cs @@ -30,7 +30,7 @@ namespace Axiom public class SubtitleControls { /// - /// Set Controls + /// Set Controls /// public static void SetControls(string selectedCodec) { @@ -251,7 +251,7 @@ public static void SetControls(string selectedCodec) /// - /// Auto Copy Conditions Check + /// Auto Copy Conditions Check /// public static bool AutoCopyConditionsCheck( string inputExt, @@ -280,7 +280,7 @@ public static void SetControls(string selectedCodec) /// - /// Copy Controls + /// Copy Controls /// public static void CopyControls() { @@ -402,7 +402,7 @@ public static void CopyControls() /// - /// Auto Codec Copy + /// Auto Codec Copy /// public static void AutoCopySubtitleCodec() { diff --git a/source/Axiom/Axiom/Controls/VideoControls.cs b/source/Axiom/Axiom/Controls/VideoControls.cs index f1d4f29e..10bff475 100644 --- a/source/Axiom/Axiom/Controls/VideoControls.cs +++ b/source/Axiom/Axiom/Controls/VideoControls.cs @@ -55,13 +55,13 @@ public class VideoControls /// - /// Controls + /// Controls /// public static bool passUserSelected = false; // Used to determine if User manually selected CRF, 1 Pass or 2 Pass /// - /// Set Controls + /// Set Controls /// public static void SetControls(string codec_SelectedItem) { @@ -572,7 +572,7 @@ public static void SetControls(string codec_SelectedItem) /// - /// BitRate Display + /// BitRate Display /// public static void VideoBitRateDisplay(List items, string selectedQuality, @@ -660,7 +660,7 @@ public static void SetControls(string codec_SelectedItem) /// - /// Quality Controls + /// Quality Controls /// public static void QualityControls() { @@ -829,7 +829,7 @@ public static void QualityControls() /// - /// Pixel Format Controls + /// Pixel Format Controls /// public static void PixelFormatControls(string mediaType, string codec, @@ -944,7 +944,7 @@ string quality /// - /// Optimize Controls + /// Optimize Controls /// public static void OptimizeControls() { @@ -1016,7 +1016,7 @@ public static void OptimizeControls() /// - /// Encoding Pass Controls + /// Encoding Pass Controls /// public static void EncodingPassControls() { @@ -1162,7 +1162,7 @@ public static void EncodingPassControls() /// - /// Auto Copy Conditions Check + /// Auto Copy Conditions Check /// public static bool AutoCopyConditionsCheck(string inputExt, string outputExt @@ -1248,7 +1248,7 @@ string outputExt /// - /// Copy Controls + /// Copy Controls /// public static void CopyControls() { @@ -1371,10 +1371,10 @@ public static void CopyControls() /// - /// Auto Codec Copy + /// Auto Codec Copy /// /// - /// Input Extension is Same as Output Extension and Video Quality is Auto + /// Input Extension is Same as Output Extension and Video Quality is Auto /// public static void AutoCopyVideoCodec() { diff --git a/source/Axiom/Axiom/CropWindow.xaml.cs b/source/Axiom/Axiom/CropWindow.xaml.cs index 11b42c45..8633a42d 100644 --- a/source/Axiom/Axiom/CropWindow.xaml.cs +++ b/source/Axiom/Axiom/CropWindow.xaml.cs @@ -37,13 +37,13 @@ public partial class CropWindow : Window private MainWindow mainwindow = (MainWindow)System.Windows.Application.Current.MainWindow; // Temp save settings when Crop Window is closed - public static int? divisibleCropWidth; - public static int? divisibleCropHeight; - public static string cropWidth; - public static string cropHeight; - public static string cropX; - public static string cropY; - public static string crop; // Combined Width, Height, X, Y + public static int? divisibleCropWidth { get; set; } + public static int? divisibleCropHeight { get; set; } + public static string cropWidth { get; set; } + public static string cropHeight { get; set; } + public static string cropX { get; set; } + public static string cropY { get; set; } + public static string crop { get; set; } // Combined Width, Height, X, Y public CropWindow(MainWindow mainwindow) @@ -122,7 +122,7 @@ public CropWindow(MainWindow mainwindow) /// - /// Close All + /// Close All /// private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { @@ -131,7 +131,7 @@ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs } /// - /// Crop Width + /// Crop Width /// private void tbxVideo_Crop_Width_KeyDown(object sender, KeyEventArgs e) { @@ -143,7 +143,7 @@ private void tbxVideo_Crop_Width_KeyDown(object sender, KeyEventArgs e) } /// - /// Crop Height + /// Crop Height /// private void tbxVideo_Crop_Height_KeyDown(object sender, KeyEventArgs e) { @@ -155,7 +155,7 @@ private void tbxVideo_Crop_Height_KeyDown(object sender, KeyEventArgs e) } /// - /// Crop X + /// Crop X /// private void tbxVideo_Crop_X_KeyDown(object sender, KeyEventArgs e) { @@ -167,7 +167,7 @@ private void tbxVideo_Crop_X_KeyDown(object sender, KeyEventArgs e) } /// - /// Crop Y + /// Crop Y /// private void tbxVideo_Crop_Y_KeyDown(object sender, KeyEventArgs e) { @@ -180,7 +180,7 @@ private void tbxVideo_Crop_Y_KeyDown(object sender, KeyEventArgs e) /// - /// SET Button + /// SET Button /// public void btnSet_Click(object sender, RoutedEventArgs e) { @@ -291,7 +291,7 @@ public void btnSet_Click(object sender, RoutedEventArgs e) /// - /// Clear Button + /// Clear Button /// public void btnClear_Click(object sender, RoutedEventArgs e) { @@ -299,7 +299,7 @@ public void btnClear_Click(object sender, RoutedEventArgs e) } /// - /// Crop Clear (Method) + /// Crop Clear (Method) /// public static void CropClear() { diff --git a/source/Axiom/Axiom/DebugConsole.xaml.cs b/source/Axiom/Axiom/DebugConsole.xaml.cs index d7f2907d..e9fc71c9 100644 --- a/source/Axiom/Axiom/DebugConsole.xaml.cs +++ b/source/Axiom/Axiom/DebugConsole.xaml.cs @@ -45,9 +45,9 @@ public partial class DebugConsole : Window public static Paragraph debugParagraph = new Paragraph(); //RichTextBox - public static Brush Heading; - public static Brush Variable; - public static Brush Value; + public static Brush Heading { get; set; } + public static Brush Variable { get; set; } + public static Brush Value { get; set; } public DebugConsole(MainWindow mainwindow) @@ -155,7 +155,7 @@ private void btnExpand_Click(object sender, RoutedEventArgs e) /// - /// Debug Test Button + /// Debug Test Button /// private void btnDebugTest_Click(object sender, RoutedEventArgs e) { @@ -211,7 +211,7 @@ public async void DebugTest() /// - /// Random Button + /// Random Button /// private void btnDebugRandom_Click(object sender, RoutedEventArgs e) { @@ -233,7 +233,7 @@ private void btnDebugRandom_Click(object sender, RoutedEventArgs e) /// - /// Control Randomizer + /// Control Randomizer /// public void DebugControlRandomizer() { @@ -364,7 +364,7 @@ public void DebugControlRandomizer() } /// - /// Select Random + /// Select Random /// public string SelectRandom(List items) { @@ -376,7 +376,7 @@ public string SelectRandom(List items) /// - /// Debug Write + /// Debug Write /// public void DebugWrite(DebugConsole debugconsole) { diff --git a/source/Axiom/Axiom/FFmpeg/FFmpeg.cs b/source/Axiom/Axiom/FFmpeg/FFmpeg.cs index 84b8e10e..214f73ab 100644 --- a/source/Axiom/Axiom/FFmpeg/FFmpeg.cs +++ b/source/Axiom/Axiom/FFmpeg/FFmpeg.cs @@ -49,29 +49,29 @@ public class FFmpeg { // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// /// -------------------------------------------------------------------------------------------------------- // FFmepg / FFprobe - public static string ffmpeg; // ffmpeg.exe location - public static string ffmpegArgs; // FFmpeg Arguments - public static string ffmpegArgsSort; // FFmpeg Arguments Sorted + public static string ffmpeg { get; set; } // ffmpeg.exe location + public static string ffmpegArgs { get; set; } // FFmpeg Arguments + public static string ffmpegArgsSort { get; set; } // FFmpeg Arguments Sorted // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------- /// - /// Process Methods + /// Process Methods /// // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------- /// - /// Keep FFmpegWindow Switch (Method) + /// Keep FFmpegWindow Switch (Method) /// /// - /// CMD.exe command, /k = keep, /c = close - /// Do not .Close(); if using /c, it will throw a Dispose exception + /// CMD.exe command, /k = keep, /c = close + /// Do not .Close(); if using /c, it will throw a Dispose exception /// public static String KeepWindow() { @@ -94,7 +94,7 @@ public static String KeepWindow() /// - /// 1-Pass Arguments + /// 1-Pass Arguments /// // 1-Pass, CRF, & Auto public static String OnePassArgs() @@ -365,7 +365,7 @@ public static String OnePassArgs() /// - /// 2-Pass Arguments + /// 2-Pass Arguments /// public static String TwoPassArgs() { @@ -798,7 +798,7 @@ public static String TwoPassArgs() /// - /// FFmpeg Single File - Generate Args + /// FFmpeg Single File - Generate Args /// public static String FFmpegSingleGenerateArgs() { @@ -861,7 +861,7 @@ public static String FFmpegSingleGenerateArgs() /// - /// FFmpeg Batch - Generate Args + /// FFmpeg Batch - Generate Args /// public static void FFmpegBatchGenerateArgs() { @@ -961,7 +961,7 @@ public static void FFmpegBatchGenerateArgs() /// - /// YouTube Download - Generate Args + /// YouTube Download - Generate Args /// public static void YouTubeDownloadGenerateArgs() { @@ -1122,7 +1122,7 @@ public static void YouTubeDownloadGenerateArgs() /// - /// FFmpeg Generate Script + /// FFmpeg Generate Script /// public static void FFmpegScript() { @@ -1132,7 +1132,7 @@ public static void FFmpegScript() /// - /// FFmpeg Start + /// FFmpeg Start /// public static void FFmpegStart() { @@ -1147,7 +1147,7 @@ public static void FFmpegStart() /// - /// FFmpeg Convert + /// FFmpeg Convert /// public static void FFmpegConvert() { diff --git a/source/Axiom/Axiom/FFmpeg/FFplay.cs b/source/Axiom/Axiom/FFmpeg/FFplay.cs index b92b0a0e..c0e639c0 100644 --- a/source/Axiom/Axiom/FFmpeg/FFplay.cs +++ b/source/Axiom/Axiom/FFmpeg/FFplay.cs @@ -31,10 +31,10 @@ namespace Axiom public class FFplay { // FFplay - public static string ffplay; // ffplay.exe + public static string ffplay { get; set; } // ffplay.exe /// - /// Preview FFplay + /// Preview FFplay /// public static void Preview(MainWindow mainwindow) { diff --git a/source/Axiom/Axiom/FFmpeg/FFprobe.cs b/source/Axiom/Axiom/FFmpeg/FFprobe.cs index e9142e67..56d33869 100644 --- a/source/Axiom/Axiom/FFmpeg/FFprobe.cs +++ b/source/Axiom/Axiom/FFmpeg/FFprobe.cs @@ -34,45 +34,45 @@ public class FFprobe { // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// // -------------------------------------------------------------------------------------------------------- // FFprobe - public static string ffprobe; // ffprobe.exe + public static string ffprobe { get; set; } // ffprobe.exe // Arguments for StartInfo - public static string argsProperties; - public static string argsVideoCodec; - public static string argsAudioCodec; - public static string argsVideoBitRate; - public static string argsAudioBitRate; - public static string argsSize; - public static string argsDuration; - public static string argsFrameRate; - public static string argsFileProperties; + public static string argsProperties { get; set; } + public static string argsVideoCodec { get; set; } + public static string argsAudioCodec { get; set; } + public static string argsVideoBitRate { get; set; } + public static string argsAudioBitRate { get; set; } + public static string argsSize { get; set; } + public static string argsDuration { get; set; } + public static string argsFrameRate { get; set; } + public static string argsFileProperties { get; set; } // Results to Modify - public static string inputFileProperties; - public static string inputVideoCodec; - public static string inputVideoBitRate; - public static string inputAudioCodec; - public static string inputAudioBitRate; - public static string inputSize; //used to calculate video bitrate - public static string inputDuration; //used to calculate video bitrate - public static string inputFrameRate; //used for Frame Range + public static string inputFileProperties { get; set; } + public static string inputVideoCodec { get; set; } + public static string inputVideoBitRate { get; set; } + public static string inputAudioCodec { get; set; } + public static string inputAudioBitRate { get; set; } + public static string inputSize { get; set; } //used to calculate video bitrate + public static string inputDuration { get; set; } //used to calculate video bitrate + public static string inputFrameRate { get; set; } //used for Frame Range // Single Auto - public static string vEntryType; // ffprobe format or stream - public static string aEntryType; // ffprobe format or stream + public static string vEntryType { get; set; } // ffprobe format or stream + public static string aEntryType { get; set; } // ffprobe format or stream // Batch Auto - public static string vEntryTypeBatch; - public static string batchFFprobeAuto; + public static string vEntryTypeBatch { get; set; } + public static string batchFFprobeAuto { get; set; } /// - /// FFprobe Detect Metadata (Method) + /// FFprobe Detect Metadata (Method) /// public static void Metadata() { @@ -267,7 +267,7 @@ public static void Metadata() /// - /// FFprobe Video Entry Type Containers (Method) + /// FFprobe Video Entry Type Containers (Method) /// // Used for Auto Quality to pass Bit Rate Entry Type to FFprobe public static void VideoEntryType() @@ -315,7 +315,7 @@ public static void VideoEntryType() /// - /// FFprobe Audio Entry Type Containers (Method) + /// FFprobe Audio Entry Type Containers (Method) /// // Used for Auto Quality to pass Bit Rate Entry Type to FFprobe public static void AudioEntryType() @@ -359,7 +359,7 @@ public static void AudioEntryType() /// - /// FFprobe Cut Duration + /// FFprobe Cut Duration /// public static String CutDuration(string input_Text, bool batch_IsChecked @@ -387,7 +387,7 @@ bool batch_IsChecked /// - /// FFprobe Input File Info Parse (Method) + /// FFprobe Input File Info Parse (Method) /// public static String InputFileInfo(string input_Text, bool batch_IsChecked, diff --git a/source/Axiom/Axiom/FailedImportWindow.xaml.cs b/source/Axiom/Axiom/FailedImportWindow.xaml.cs index 3379ad90..0f8ac6ba 100644 --- a/source/Axiom/Axiom/FailedImportWindow.xaml.cs +++ b/source/Axiom/Axiom/FailedImportWindow.xaml.cs @@ -29,7 +29,7 @@ Axiom UI namespace Axiom { /// - /// Interaction logic for FailedImportWindow.xaml + /// Interaction logic for FailedImportWindow.xaml /// public partial class FailedImportWindow : Window { @@ -39,7 +39,7 @@ public FailedImportWindow() } /// - /// Window Loaded + /// Window Loaded /// public void Window_Loaded(object sender, RoutedEventArgs e) { diff --git a/source/Axiom/Axiom/FilePropertiesWindow.xaml.cs b/source/Axiom/Axiom/FilePropertiesWindow.xaml.cs index affe097b..19ae90d1 100644 --- a/source/Axiom/Axiom/FilePropertiesWindow.xaml.cs +++ b/source/Axiom/Axiom/FilePropertiesWindow.xaml.cs @@ -49,7 +49,7 @@ public FilePropertiesWindow(MainWindow mainwindow) } /// - /// Window Loaded + /// Window Loaded /// private void Window_Loaded(object sender, RoutedEventArgs e) { diff --git a/source/Axiom/Axiom/Filters/AudioFilters.cs b/source/Axiom/Axiom/Filters/AudioFilters.cs index 2edcca06..4411cfd4 100644 --- a/source/Axiom/Axiom/Filters/AudioFilters.cs +++ b/source/Axiom/Axiom/Filters/AudioFilters.cs @@ -44,17 +44,17 @@ Axiom UI namespace Axiom { /// - /// Audio Filters (Class) + /// Audio Filters (Class) /// public class AudioFilters { // Filter Lists public static List aFiltersList = new List(); // Filters to String Join - public static string aFilter; + public static string aFilter { get; set; } /// - /// Remove Click (Method) + /// Remove Click (Method) /// //public static void RemoveClick_Filter(MainWindow mainwindow) //{ @@ -79,7 +79,7 @@ public class AudioFilters /// - /// Lowpass (Method) + /// Lowpass (Method) /// public static void Lowpass_Filter() { @@ -93,7 +93,7 @@ public static void Lowpass_Filter() } /// - /// Highpass (Method) + /// Highpass (Method) /// public static void Highpass_Filter() { @@ -108,7 +108,7 @@ public static void Highpass_Filter() /// - /// Contrast (Method) + /// Contrast (Method) /// public static void Contrast_Filter() { @@ -133,7 +133,7 @@ public static void Contrast_Filter() /// - /// Extra Stereo (Method) + /// Extra Stereo (Method) /// public static void ExtraStereo_Filter() { @@ -185,7 +185,7 @@ public static void ExtraStereo_Filter() /// - /// Headphones (Method) + /// Headphones (Method) /// public static void Headphones_Filter() { @@ -200,7 +200,7 @@ public static void Headphones_Filter() /// - /// Tempo (Method) + /// Tempo (Method) /// public static void Tempo_Filter() { @@ -228,7 +228,7 @@ public static void Tempo_Filter() /// - /// Audio Filter Combine (Method) + /// Audio Filter Combine (Method) /// public static String AudioFilter() { diff --git a/source/Axiom/Axiom/Filters/VideoFilters.cs b/source/Axiom/Axiom/Filters/VideoFilters.cs index 88703e3d..16e35a9d 100644 --- a/source/Axiom/Axiom/Filters/VideoFilters.cs +++ b/source/Axiom/Axiom/Filters/VideoFilters.cs @@ -53,18 +53,18 @@ Axiom UI namespace Axiom { /// - /// Video Filters (Class) + /// Video Filters (Class) /// public class VideoFilters { // Filter public static List vFiltersList = new List(); // Master Filters List - public static string geq; // png transparent to jpg whtie background filter - public static string vFilter; + public static string geq { get; set; } // png transparent to jpg whtie background filter + public static string vFilter { get; set; } /// - /// PNG to JPG (Method) + /// PNG to JPG (Method) /// public static void PNGtoJPG_Filter() { @@ -124,7 +124,7 @@ public static void SubtitlesBurn_Filter() /// - /// Deband + /// Deband /// public static void Deband_Filter() { @@ -141,7 +141,7 @@ public static void Deband_Filter() /// - /// Deshake + /// Deshake /// public static void Deshake_Filter() { @@ -156,7 +156,7 @@ public static void Deshake_Filter() /// - /// Deflicker (Method) + /// Deflicker (Method) /// public static void Deflicker_Filter() { @@ -171,7 +171,7 @@ public static void Deflicker_Filter() /// - /// Dejudder + /// Dejudder /// public static void Dejudder_Filter() { @@ -186,7 +186,7 @@ public static void Dejudder_Filter() /// - /// Denoise + /// Denoise /// public static void Denoise_Filter() { @@ -232,7 +232,7 @@ public static void Denoise_Filter() /// - /// Deinterlace + /// Deinterlace /// /// /// https://ffmpeg.org/ffmpeg-filters.html#yadif-1 @@ -296,7 +296,7 @@ public static void Deinterlace_Filter() /// - /// Selective Color Class + /// Selective Color Class /// //public static List SelectiveColorList { get; set; } //public partial class FilterVideoSelectiveColor @@ -312,7 +312,7 @@ public static void Deinterlace_Filter() //} /// - /// Selective Color Normalize (Method) + /// Selective Color Normalize (Method) /// public static String SelectiveColor_Normalize(double value) { @@ -339,7 +339,7 @@ public static String SelectiveColor_Normalize(double value) } /// - /// Selective Color (Method) + /// Selective Color (Method) /// public static void SelectiveColor_Filter() { @@ -515,7 +515,7 @@ public static void SelectiveColor_Filter() /// - /// Video EQ (Method) + /// Video EQ (Method) /// public static void Video_EQ_Filter() { @@ -548,7 +548,7 @@ public static void Video_EQ_Filter() /// - /// Video EQ - Brightness (Method) + /// Video EQ - Brightness (Method) /// public static String Video_EQ_Brightness_Filter() { @@ -599,7 +599,7 @@ public static String Video_EQ_Brightness_Filter() } /// - /// Video EQ - Contrast (Method) + /// Video EQ - Contrast (Method) /// public static String Video_EQ_Contrast_Filter() { @@ -652,7 +652,7 @@ public static String Video_EQ_Contrast_Filter() } /// - /// Video EQ - Saturation (Method) + /// Video EQ - Saturation (Method) /// public static String Video_EQ_Saturation_Filter() { @@ -705,7 +705,7 @@ public static String Video_EQ_Saturation_Filter() } /// - /// Video EQ - Gamma (Method) + /// Video EQ - Gamma (Method) /// public static String Video_EQ_Gamma_Filter() { @@ -758,7 +758,7 @@ public static String Video_EQ_Gamma_Filter() /// - /// Video Filter Combine (Method) + /// Video Filter Combine (Method) /// public static String VideoFilter() { diff --git a/source/Axiom/Axiom/Generators/Audio.cs b/source/Axiom/Axiom/Generators/Audio.cs index 09837ac4..de3477a0 100644 --- a/source/Axiom/Axiom/Generators/Audio.cs +++ b/source/Axiom/Axiom/Generators/Audio.cs @@ -53,37 +53,37 @@ public class Audio { // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// /// -------------------------------------------------------------------------------------------------------- // Audio - public static string aCodec; - public static string aChannel; - public static string aBitMode; // -b:a, -q:a - public static string aBitRate; - public static string aBitRateNA; // fallback default if not available - public static string aQuality; - public static string aLossless; - public static string aCompressionLevel; - public static string aSamplerate; - public static string aBitDepth; - public static string aVolume; - public static string aHardLimiter; + public static string aCodec { get; set; } + public static string aChannel { get; set; } + public static string aBitMode { get; set; } // -b:a, -q:a + public static string aBitRate { get; set; } + public static string aBitRateNA { get; set; } // fallback default if not available + public static string aQuality { get; set; } + public static string aLossless { get; set; } + public static string aCompressionLevel { get; set; } + public static string aSamplerate { get; set; } + public static string aBitDepth { get; set; } + public static string aVolume { get; set; } + public static string aHardLimiter { get; set; } // Batch //public static string aBitRateLimiter; // limits the bitrate value of webm and ogg - public static string batchAudioAuto; + public static string batchAudioAuto { get; set; } // -------------------------------------------------------------------------------------------------------- /// - /// Methods + /// Methods /// /// -------------------------------------------------------------------------------------------------------- /// - /// Audio Codec + /// Audio Codec /// public static String AudioCodec(string codec_SelectedItem, string codec_Command @@ -100,7 +100,7 @@ string codec_Command /// - /// BitRate Mode + /// BitRate Mode /// public static String BitRateMode(bool vbr_IsChecked, List quality_Items, @@ -132,7 +132,7 @@ string codec_Command /// - /// Audio Quality - Auto + /// Audio Quality - Auto /// public static void QualityAuto(string input_Text, bool batch_IsChecked, @@ -302,7 +302,7 @@ bool vbr_IsChecked /// - /// Audio Quality - Lossless + /// Audio Quality - Lossless /// public static void QualityLossless(List quality_Items) { @@ -311,7 +311,7 @@ public static void QualityLossless(List quality_Ite /// - /// Audio Quality - Preset + /// Audio Quality - Preset /// public static void QualityPreset(string bitrate_Text) { @@ -323,7 +323,7 @@ public static void QualityPreset(string bitrate_Text) /// - /// Audio Quality - Custom + /// Audio Quality - Custom /// public static void QualityCustom(bool vbr_IsChecked, string codec_SelectedItem, @@ -361,7 +361,7 @@ string bitrate_Text /// - /// Audio Quality + /// Audio Quality /// public static String AudioQuality(string input_Text, bool batch_IsChecked, @@ -469,7 +469,7 @@ bool vbr_IsChecked /// - /// Audio BitRate Calculator + /// Audio BitRate Calculator /// public static String AudioBitRateCalculator(string codec_SelectedItem, string aEntryType, @@ -615,7 +615,7 @@ string inputAudioBitRate /// - /// Audio VBR Calculator + /// Audio VBR Calculator /// public static String AudioVBRCalculator(bool vbr_IsChecked, string codec_SelectedItem, @@ -651,30 +651,50 @@ string inputBitRate // ------------------------- if (codec_SelectedItem == "Vorbis") { - // Above 290k set to 10 Quality - if (aBitRateVBR > 290) - { - aBitRateVBR = aBitRateVBR = Convert.ToDouble(quality_Items.FirstOrDefault(item => item.Name == "Auto")?.VBR); - } - // 32 bracket - else if (aBitRateVBR >= 128) //above 113kbps, use standard equation - { - aBitRateVBR = aBitRateVBR * 0.03125; - } - // 16 bracket - else if (aBitRateVBR <= 127) //112kbps needs work, half decimal off - { - aBitRateVBR = (aBitRateVBR * 0.03125) - 0.5; - } - else if (aBitRateVBR <= 96) - { - aBitRateVBR = (aBitRateVBR * 0.013125) - 0.25; - } - // 8 bracket - else if (aBitRateVBR <= 64) - { - aBitRateVBR = 0; - } + // VBR User entered value algorithm (0 low / 10 high) + + double inputMin = 0; // kbps + double inputMax = 320; // kbps + double normMin = 0; // low + double normMax = 10; // high + + aBitRateVBR = Math.Round( + MainWindow.NormalizeValue( + aBitRateVBR, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average + ) + + , 5 // max decimal places + ); + + //// Above 290k set to 10 Quality + //if (aBitRateVBR > 290) + //{ + // aBitRateVBR = aBitRateVBR = Convert.ToDouble(quality_Items.FirstOrDefault(item => item.Name == "Auto")?.VBR); + //} + //// 32 bracket + //else if (aBitRateVBR >= 128) + //{ + // //aBitRateVBR = aBitRateVBR * 0.03125; + //} + //// 16 bracket + //else if (aBitRateVBR < 128) + //{ + // //aBitRateVBR = (aBitRateVBR * 0.03125) - 0.5; + //} + //else if (aBitRateVBR <= 96) + //{ + // //aBitRateVBR = (aBitRateVBR * 0.013125) - 0.25; + //} + //// 8 bracket + //else if (aBitRateVBR <= 64) + //{ + // aBitRateVBR = 0; + //} //MessageBox.Show(aBitRateVBR.ToString()); //debug } @@ -709,7 +729,7 @@ string inputBitRate } else { - // VBR User entered value algorithm (2 high / 0.1 low) + // VBR User entered value algorithm (0.1 low / 2 high) aBitRateVBR = Math.Min(2, Math.Max(aBitRateVBR * 0.00625, 0.1)); } } @@ -726,7 +746,7 @@ string inputBitRate } else { - // VBR User entered value algorithm (0 high / 10 low) + // VBR User entered value algorithm (10 low / 0 high) aBitRateVBR = (((aBitRateVBR * (-0.01)) / 2.60) + 1) * 10; } } @@ -743,7 +763,7 @@ string inputBitRate } else { - // VBR User entered value algorithm (0 high / 10 low) + // VBR User entered value algorithm (10 low / 0 high) aBitRateVBR = (((aBitRateVBR * (-0.01)) / 2.60) + 1) * 10; } } @@ -764,7 +784,7 @@ string inputBitRate /// - /// Channel + /// Channel /// public static String Channel(string codec_SelectedItem, string channel_SelectedItem @@ -836,7 +856,7 @@ string channel_SelectedItem /// - /// Compression Level + /// Compression Level /// public static String CompressionLevel(string codec_SelectedItem, string compressionLevel_SelectedItem @@ -884,7 +904,7 @@ string compressionLevel_SelectedItem /// - /// Sample Rate + /// Sample Rate /// public static String SampleRate(string codec_SelectedItem, List sampleRate_Items, @@ -922,7 +942,7 @@ string sampleRate_SelectedItem /// - /// Bit Depth + /// Bit Depth /// public static String BitDepth(string codec_SelectedItem, List bitDepth_Items, @@ -970,7 +990,7 @@ string bitDepth_SelectedItem /// - /// Audio BitRate Limiter (Method) + /// Audio BitRate Limiter (Method) /// public static int AudioBitRateLimiter(string codec_SelectedItem, string quality_SelectedItem, @@ -1078,7 +1098,7 @@ int aBitRateLimit /// - /// Batch Audio BitRate Limiter (Method) + /// Batch Audio BitRate Limiter (Method) /// public static String BatchAudioBitRateLimiter(string codec_SelectedItem, string quality_SelectedItem @@ -1149,7 +1169,7 @@ string quality_SelectedItem /// - /// Batch Audio Quality Auto + /// Batch Audio Quality Auto /// public static String BatchAudioQualityAuto(bool batch_IsChecked, string codec_SelectedItem, @@ -1166,7 +1186,10 @@ string quality_SelectedItem // Batch CMD Detect // - if (quality_SelectedItem == "Auto") + if (quality_SelectedItem == "Auto" && + codec_SelectedItem != "FLAC" && // Don't set Auto FLAC bitrate, FFmpeg will choose default + codec_SelectedItem != "PCM"// Don't set Auto PCM bitrate, FFmpeg will choose default + ) { // Make List List BatchAudioAutoList = new List() @@ -1197,7 +1220,7 @@ string quality_SelectedItem /// - /// Volume + /// Volume /// public static void Volume() { @@ -1247,7 +1270,7 @@ public static void Volume() /// - /// Hard Limiter Filter (Method) + /// Hard Limiter Filter (Method) /// public static void HardLimiter() { @@ -1272,15 +1295,20 @@ public static void HardLimiter() // -0.1 to -3dB if (value > -4) { + double inputMin = -3; + double inputMax = -0.1; + double normMin = 0.7; + double normMax = 0.99; + limit = Convert.ToString( Math.Round( MainWindow.NormalizeValue( - value, // input - -3, // input min - -0.1, // input max - 0.7, // normalize min - 0.99, // normalize max - 0.845 // midpoint + value, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average ) , 4 // max decimal places @@ -1291,15 +1319,20 @@ public static void HardLimiter() // -4 to -7dB else if (value <= -4 && value >= -7) { + double inputMin = -7; + double inputMax = -4; + double normMin = 0.45; + double normMax = 0.65; + limit = Convert.ToString( Math.Round( MainWindow.NormalizeValue( - value, // input - -7, // input min - -4, // input max - 0.45, // normalize min - 0.65, // normalize max - 0.55 // midpoint + value, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average ) , 4 // max decimal places @@ -1310,15 +1343,20 @@ public static void HardLimiter() // -8 to -10dB else if (value <= -8 && value >= -10) { + double inputMin = -10; + double inputMax = -8; + double normMin = 0.3; + double normMax = 0.4; + limit = Convert.ToString( Math.Round( MainWindow.NormalizeValue( - value, // input - -10, // input min - -8, // input max - 0.3, // normalize min - 0.4, // normalize max - 0.35 // midpoint + value, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average ) , 4 // max decimal places @@ -1329,15 +1367,20 @@ public static void HardLimiter() // -11 to -16dB else if (value <= -11 && value >= -16) { + double inputMin = -16; + double inputMax = -11; + double normMin = 0.15; + double normMax = 0.275; + limit = Convert.ToString( Math.Round( MainWindow.NormalizeValue( - value, // input - -16, // input min - -11, // input max - 0.15, // normalize min - 0.275, // normalize max - 0.2125 // midpoint + value, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average ) , 4 // max decimal places @@ -1348,15 +1391,20 @@ public static void HardLimiter() // -17 to -19dB else if (value <= -17 && value >= -19) { + double inputMin = -19; + double inputMax = -17; + double normMin = 0.1; + double normMax = 0.135; + limit = Convert.ToString( Math.Round( MainWindow.NormalizeValue( - value, // input - -19, // input min - -17, // input max - 0.1, // normalize min - 0.135, // normalize max - 0.1175 // midpoint + value, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average ) , 8 // max decimal places @@ -1367,15 +1415,20 @@ public static void HardLimiter() // -20 to -24dB else if (value <= -20) { + double inputMin = -24; + double inputMax = -20; + double normMin = 0.0625; + double normMax = 0.0975; + limit = Convert.ToString( Math.Round( MainWindow.NormalizeValue( - value, // input - -24, // input min - -20, // input max - 0.0625, // normalize min - 0.0975, // normalize max - 0.08 // midpoint + value, // input + inputMin, // input min + inputMax, // input max + normMin, // normalize min + normMax, // normalize max + (normMin + normMax) / 2 // midpoint average ) , 4 // max decimal places diff --git a/source/Axiom/Axiom/Generators/Format.cs b/source/Axiom/Axiom/Generators/Format.cs index 78c028e7..58b26b14 100644 --- a/source/Axiom/Axiom/Generators/Format.cs +++ b/source/Axiom/Axiom/Generators/Format.cs @@ -42,12 +42,12 @@ public class Format { // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// /// -------------------------------------------------------------------------------------------------------- // Cut - public static string trimStart; - public static string trimEnd; + public static string trimStart { get; set; } + public static string trimEnd { get; set; } //public static string trim; // combine trimStart, trimEnd // -------------------------------------------------- @@ -177,12 +177,12 @@ public class Format // -------------------------------------------------------------------------------------------------------- /// - /// Methods + /// Methods /// /// -------------------------------------------------------------------------------------------------------- /// - /// Force Format + /// Force Format /// // Used for Two-Pass, Pass 1 public static String ForceFormat(string container_SelectedItem) @@ -323,7 +323,7 @@ public static String ForceFormat(string container_SelectedItem) /// - /// Cut Start + /// Cut Start /// public static String CutStart(string input_Text, bool batch_IsChecked, @@ -381,7 +381,7 @@ string frameStart_Text /// - /// Cut End + /// Cut End /// public static String CutEnd(string input_Text, bool batch_IsChecked, diff --git a/source/Axiom/Axiom/Generators/Streams.cs b/source/Axiom/Axiom/Generators/Streams.cs index 1a6acdb6..513d415b 100644 --- a/source/Axiom/Axiom/Generators/Streams.cs +++ b/source/Axiom/Axiom/Generators/Streams.cs @@ -38,11 +38,11 @@ public class Streams /// Variables /// // -------------------------------------------------------------------------------------------------------- - public static string vMap; // video streams - public static string cMap; // video chapters - public static string sMap; // video subtitles - public static string aMap; // audio streams - public static string mMap; // file metadata + public static string vMap { get; set; } // video streams + public static string cMap { get; set; } // video chapters + public static string sMap { get; set; } // video subtitles + public static string aMap { get; set; } // audio streams + public static string mMap { get; set; } // file metadata //public static string map; // combines all maps diff --git a/source/Axiom/Axiom/Generators/Subtitle.cs b/source/Axiom/Axiom/Generators/Subtitle.cs index 4a384146..26cbd4fd 100644 --- a/source/Axiom/Axiom/Generators/Subtitle.cs +++ b/source/Axiom/Axiom/Generators/Subtitle.cs @@ -33,14 +33,14 @@ public class Subtitle { // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// /// -------------------------------------------------------------------------------------------------------- - public static string sCodec; // Subtitle Codec - public static string subtitles; + public static string sCodec { get; set; } // Subtitle Codec + public static string subtitles { get; set; } - public static string subsDir; // Subtitles Directory + public static string subsDir { get; set; } // Subtitles Directory public static List subtitleFilePathsList = new List(); // Files Added public static List subtitleFileNamesList = new List(); // File Names without Path @@ -48,12 +48,12 @@ public class Subtitle // -------------------------------------------------------------------------------------------------------- /// - /// Methods + /// Methods /// // -------------------------------------------------------------------------------------------------------- /// - /// Subtitle Codec + /// Subtitle Codec /// public static String SubtitleCodec(string codec_SelectedItem, string codec_Command @@ -71,7 +71,7 @@ string codec_Command /// - /// Subtitles External + /// Subtitles External /// public static String SubtitlesExternal(string codec_SelectedItem, string stream_SelectedItem diff --git a/source/Axiom/Axiom/Generators/Video.cs b/source/Axiom/Axiom/Generators/Video.cs index c223f18c..a9f8177d 100644 --- a/source/Axiom/Axiom/Generators/Video.cs +++ b/source/Axiom/Axiom/Generators/Video.cs @@ -60,67 +60,67 @@ class Video { // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// // -------------------------------------------------------------------------------------------------------- // Video - public static string vEncodeSpeed; - public static string vCodec; // Video Codec - public static string vQuality; // Video Quality - public static string vBitMode; - public static string vLossless; - public static string vBitRate; // Video BitRate - public static string vBitRateNA; // N/A e.g. Define 3000K - public static string vMinRate; - public static string vMaxRate; - public static string vBufSize; - public static string vOptions; // -pix_fmt, -qcomp - public static string vCRF; // Constant Rate Factor - public static string pix_fmt; - public static string vAspectRatio; - public static string vScalingAlgorithm; - public static string fps; // Frames Per Second - public static string image; // JPEG & PNG options - public static string optTune; // x264/x265 tuning modes - public static string optProfile; // x264/x265 Profile - public static string optLevel; // x264/x265 Level - public static string optFlags; // Additional Optimization Flags - public static string optimize; // Contains opTune + optProfile + optLevel + public static string vEncodeSpeed { get; set; } + public static string vCodec { get; set; } // Video Codec + public static string vQuality { get; set; } // Video Quality + public static string vBitMode { get; set; } + public static string vLossless { get; set; } + public static string vBitRate { get; set; } // Video BitRate + public static string vBitRateNA { get; set; } // N/A e.g. Define 3000K + public static string vMinRate { get; set; } + public static string vMaxRate { get; set; } + public static string vBufSize { get; set; } + public static string vOptions { get; set; } // -pix_fmt, -qcomp + public static string vCRF { get; set; } // Constant Rate Factor + public static string pix_fmt { get; set; } + public static string vAspectRatio { get; set; } + public static string vScalingAlgorithm { get; set; } + public static string fps { get; set; } // Frames Per Second + public static string image { get; set; } // JPEG & PNG options + public static string optTune { get; set; } // x264/x265 tuning modes + public static string optProfile { get; set; } // x264/x265 Profile + public static string optLevel { get; set; } // x264/x265 Level + public static string optFlags { get; set; } // Additional Optimization Flags + public static string optimize { get; set; } // Contains opTune + optProfile + optLevel // x265 Params public static List x265paramsList = new List(); // multiple parameters - public static string x265params; // combined inline list + public static string x265params { get; set; } // combined inline list // Scale - public static string width; - public static string height; - public static string scale; // contains size, width, height + public static string width { get; set; } + public static string height { get; set; } + public static string scale { get; set; } // contains size, width, height // Pass - public static string v2PassArgs; // 2-Pass Arguments - public static string passSingle; // 1-Pass & CRF Args - public static string pass1Args; // Batch 2-Pass (Pass 1) - public static string pass2Args; // Batch 2-Pass (Pass 2) - public static string pass1; // x265 Modifier - public static string pass2; // x265 Modifier + public static string v2PassArgs { get; set; } // 2-Pass Arguments + public static string passSingle { get; set; } // 1-Pass & CRF Args + public static string pass1Args { get; set; } // Batch 2-Pass (Pass 1) + public static string pass2Args { get; set; } // Batch 2-Pass (Pass 2) + public static string pass1 { get; set; } // x265 Modifier + public static string pass2 { get; set; } // x265 Modifier // Batch - public static string batchVideoAuto; + public static string batchVideoAuto { get; set; } // Rendering - public static string hwacceleration; + public static string hwacceleration { get; set; } // -------------------------------------------------------------------------------------------------------- /// - /// Methods + /// Methods /// /// -------------------------------------------------------------------------------------------------------- /// - /// Hardware Acceleration + /// Hardware Acceleration /// /// https://trac.ffmpeg.org/wiki/HWAccelIntro public static String HWAcceleration(string mediaType_SelectedItem, @@ -218,7 +218,7 @@ string hwaccel_SelectedItem /// - /// Hardware Acceleration Codec Override + /// Hardware Acceleration Codec Override /// /// https://trac.ffmpeg.org/wiki/HWAccelIntro public static String HWAccelerationCodecOverride(string hwaccel_SelectedItem, @@ -267,7 +267,7 @@ string codec_SelectedItem /// - /// Video Codec + /// Video Codec /// public static String VideoCodec(string hwAccel_SelectedItem, string codec_SelectedItem, @@ -297,7 +297,7 @@ string codec_Command /// - /// Encode Speed + /// Encode Speed /// public static String VideoEncodeSpeed(List encodeSpeedItems, string encodeSpeed_SelectedItem, @@ -353,7 +353,7 @@ string pass /// - /// BitRate Mode + /// BitRate Mode /// public static String BitRateMode(List quality_Items, string quality_SelectedItem, @@ -395,7 +395,7 @@ bool vbr_IsChecked /// - /// Video Quality - Auto + /// Video Quality - Auto /// public static void QualityAuto(bool batch_IsChecked, bool vbr_IsChecked, @@ -601,7 +601,7 @@ string input_Text /// - /// Video Quality - Lossless + /// Video Quality - Lossless /// public static void QualityLossless(string codec_SelectedItem, List qualityItems @@ -626,7 +626,7 @@ List qualityItems /// - /// Video Quality - Custom + /// Video Quality - Custom /// public static void QualityCustom(bool vbr_IsChecked, List quality_Items, @@ -676,7 +676,7 @@ string bufsize_Text /// - /// Video Quality - Preset + /// Video Quality - Preset /// public static void QualityPreset(bool vbr_IsChecked, string codec_SelectedItem, @@ -775,7 +775,7 @@ string bufsize_Text /// - /// Video Quality + /// Video Quality /// public static String VideoQuality(bool batch_IsChecked, bool vbr_IsChecked, @@ -938,7 +938,7 @@ string input_Text .Where(s => !s.Equals("\n")) ); - // Log Console Message ///////// + // Log Console Message ///////// Log.WriteAction = () => { Log.logParagraph.Inlines.Add(new LineBreak()); @@ -966,7 +966,7 @@ string input_Text /// - /// Batch Video Quality Auto (Method) + /// Batch Video Quality Auto (Method) /// public static String BatchVideoQualityAuto(bool batch_IsChecked, string codec_SelectedItem, @@ -1032,7 +1032,7 @@ string quality_SelectedItem /// - /// Video BitRate Calculator (Method) + /// Video BitRate Calculator (Method) /// public static String VideoBitRateCalculator(string container_SelectedItem, string mediaType_SelectedItem, @@ -1199,7 +1199,7 @@ string quality_SelectedItem /// - /// Pass 1 Modifier (Method) + /// Pass 1 Modifier (Method) /// // x265 Pass 1 public static String Pass1Modifier(string codec_SelectedItem, @@ -1241,7 +1241,7 @@ string pass_SelectedItem /// - /// Pass 2 Modifier (Method) + /// Pass 2 Modifier (Method) /// // x265 Pass 2 public static String Pass2Modifier(string codec_SelectedItem, @@ -1283,10 +1283,10 @@ string pass_SelectedItem /// - /// Frame Rate To Decimal + /// Frame Rate To Decimal /// /// - /// When using Video Frame Range instead of Time + /// When using Video Frame Range instead of Time /// public static String FramesToDecimal(string frame) { @@ -1342,7 +1342,7 @@ public static String FramesToDecimal(string frame) /// - /// Pixel Foramt + /// Pixel Foramt /// public static String PixFmt(string codec_SelectedItem, string pixelFormat_SelectedItem @@ -1367,7 +1367,7 @@ string pixelFormat_SelectedItem /// - /// Optimize + /// Optimize /// public static String Optimize(string codec_SelectedItem, List optimize_Items, @@ -1437,7 +1437,7 @@ string level_SelectedItem /// - /// FPS + /// FPS /// public static String FPS(string codec_SelectedItem, string fps_SelectedItem, @@ -1541,7 +1541,7 @@ string fps_Text /// - /// Video Speed (Method) + /// Video Speed (Method) /// public static void Speed(//string mediaType_SelectedItem, string codec_SelectedItem, @@ -1588,7 +1588,7 @@ string speed_Text /// - /// Size Width Auto + /// Size Width Auto /// public static String SizeWidthAuto(string codec_SelectedItem) { @@ -1617,7 +1617,7 @@ public static String SizeWidthAuto(string codec_SelectedItem) /// - /// Size Height Auto + /// Size Height Auto /// public static String SizeHeightAuto(string codec_SelectedItem) { @@ -1646,7 +1646,7 @@ public static String SizeHeightAuto(string codec_SelectedItem) /// - /// Size + /// Size /// // Size is a Filter public static void Scale(string codec_SelectedItem, @@ -2060,7 +2060,7 @@ string cropClear_Text /// - /// Aspect Ratio + /// Aspect Ratio /// public static String AspectRatio(string aspectRatio_SelectedItem) { @@ -2092,7 +2092,7 @@ public static String AspectRatio(string aspectRatio_SelectedItem) /// - /// Scaling Algorithm + /// Scaling Algorithm /// public static String ScalingAlgorithm(string scalingAlgorithm_SelectedItem) { @@ -2118,7 +2118,7 @@ public static String ScalingAlgorithm(string scalingAlgorithm_SelectedItem) /// - /// Crop (Method) + /// Crop (Method) /// public static void Crop(CropWindow cropwindow) { @@ -2156,7 +2156,7 @@ public static void Crop(CropWindow cropwindow) /// - /// Images + /// Images /// public static String Images(string mediaType_SelectedItem, string codec_SelectedItem//, diff --git a/source/Axiom/Axiom/Log.cs b/source/Axiom/Axiom/Log.cs index 66c02cd6..ef9c0493 100644 --- a/source/Axiom/Axiom/Log.cs +++ b/source/Axiom/Axiom/Log.cs @@ -41,7 +41,7 @@ public class Log // List of Actions public static List LogActions = new List(); // Action - public static Action WriteAction; + public static Action WriteAction { get; set; } // Rich Textbox Paragraph public static Paragraph logParagraph = new Paragraph(); //RichTextBox @@ -51,15 +51,15 @@ public class Log // Theme // -------------------------------------------------------------------------------------------------------- // Console Colors - public static Brush ConsoleDefault; // Default - public static Brush ConsoleTitle; // Titles - public static Brush ConsoleWarning; // Warning - public static Brush ConsoleError; // Error - public static Brush ConsoleAction; // Actions + public static Brush ConsoleDefault { get; set; } // Default + public static Brush ConsoleTitle { get; set; } // Titles + public static Brush ConsoleWarning { get; set; } // Warning + public static Brush ConsoleError { get; set; } // Error + public static Brush ConsoleAction { get; set; } // Actions /// - /// Lod Console Message Add (Method) + /// Lod Console Message Add (Method) /// //public static void LogConsoleMessageAdd(string message, string emphasis, Brush color, int linebreaks) //{ @@ -87,7 +87,7 @@ public class Log /// - /// Define Log Path (Method) + /// Define Log Path (Method) /// public static void DefineLogPath() { @@ -107,7 +107,7 @@ public static void DefineLogPath() /// - /// Create Output Log (Method) + /// Create Output Log (Method) /// public static void CreateOutputLog(MainWindow mainwindow) { @@ -183,7 +183,7 @@ public static void CreateOutputLog(MainWindow mainwindow) /// - /// Log Write All + /// Log Write All /// public static void LogWriteAll(MainWindow mainwindow) { diff --git a/source/Axiom/Axiom/LogConsole.xaml.cs b/source/Axiom/Axiom/LogConsole.xaml.cs index e687feaf..eec82d5c 100644 --- a/source/Axiom/Axiom/LogConsole.xaml.cs +++ b/source/Axiom/Axiom/LogConsole.xaml.cs @@ -28,7 +28,7 @@ Axiom UI namespace Axiom { /// - /// Interaction logic for Console.xaml + /// Interaction logic for Console.xaml /// public partial class LogConsole : Window { @@ -45,7 +45,7 @@ public LogConsole() /// - /// Close + /// Close /// private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { @@ -55,7 +55,7 @@ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs /// - /// Hide Window Instead of Closing + /// Hide Window Instead of Closing /// protected override void OnClosing(CancelEventArgs e) { @@ -68,7 +68,7 @@ protected override void OnClosing(CancelEventArgs e) /// - /// Expand Button + /// Expand Button /// private void btnExpand_Click(object sender, RoutedEventArgs e) { diff --git a/source/Axiom/Axiom/MainWindow.xaml b/source/Axiom/Axiom/MainWindow.xaml index 23f614db..ba15c5e8 100644 --- a/source/Axiom/Axiom/MainWindow.xaml +++ b/source/Axiom/Axiom/MainWindow.xaml @@ -5737,7 +5737,7 @@ Margin="56,0,0,0" > - + diff --git a/source/Axiom/Axiom/MainWindow.xaml.cs b/source/Axiom/Axiom/MainWindow.xaml.cs index 6d68d239..d0122de0 100644 --- a/source/Axiom/Axiom/MainWindow.xaml.cs +++ b/source/Axiom/Axiom/MainWindow.xaml.cs @@ -51,17 +51,17 @@ namespace Axiom public partial class MainWindow : Window { // Axiom Current Version - public static Version currentVersion; + public static Version currentVersion { get; set; } // Axiom GitHub Latest Version - public static Version latestVersion; + public static Version latestVersion { get; set; } // Alpha, Beta, Stable public static string currentBuildPhase = "alpha"; - public static string latestBuildPhase; - public static string[] splitVersionBuildPhase; + public static string latestBuildPhase { get; set; } + public static string[] splitVersionBuildPhase { get; set; } // -------------------------------------------------------------------------------------------------------- /// - /// Global Variables + /// Global Variables /// // -------------------------------------------------------------------------------------------------------- // System @@ -83,25 +83,25 @@ public partial class MainWindow : Window public static string downloadDir = userProfile + @"Downloads\"; // C:\Users\Example\Downloads\ // Programs - public static string youtubedl; // youtube-dl.exe + public static string youtubedl { get; set; } // youtube-dl.exe // Input - public static string inputPreviousPath; - public static string inputDir; // Input File Directory - public static string inputFileName; // (eg. myvideo.mp4 = myvideo) - public static string inputExt; // (eg. .mp4) - public static string input; // Single: Input Path + Filename No Ext + Input Ext (Browse Text Box) /// Batch: Input Path (Browse Text Box) + public static string inputPreviousPath { get; set; } + public static string inputDir { get; set; } // Input File Directory + public static string inputFileName { get; set; } // (eg. myvideo.mp4 = myvideo) + public static string inputExt { get; set; } // (eg. .mp4) + public static string input { get; set; } // Single: Input Path + Filename No Ext + Input Ext (Browse Text Box) /// Batch: Input Path (Browse Text Box) // Output - public static string outputPreviousPath; - public static string outputDir; // Output Path - public static string outputFileName; // Output Directory + Filename (No Extension) - public static string outputExt; // (eg. .webm) - public static string output; // Single: outputDir + outputFileName + outputExt /// Batch: outputDir + %~nf - public static string outputNewFileName; // File Rename if File already exists + public static string outputPreviousPath { get; set; } + public static string outputDir { get; set; } // Output Path + public static string outputFileName { get; set; } // Output Directory + Filename (No Extension) + public static string outputExt { get; set; } // (eg. .webm) + public static string output { get; set; } // Single: outputDir + outputFileName + outputExt /// Batch: outputDir + %~nf + public static string outputNewFileName { get; set; } // File Rename if File already exists // Batch - public static string batchInputAuto; + public static string batchInputAuto { get; set; } // Volume Up Down // Used for Volume Up Down buttons. Integer += 1 for each tick of the timer. @@ -113,37 +113,37 @@ public partial class MainWindow : Window // -------------------------------------------------------------------------------------------------------- /// - /// Other Windows + /// Other Windows /// // -------------------------------------------------------------------------------------------------------- /// - /// Log Console + /// Log Console /// public LogConsole logconsole = new LogConsole(); /// - /// Debug Console + /// Debug Console /// public static DebugConsole debugconsole; /// - /// File Properties Console + /// File Properties Console /// public FilePropertiesWindow filepropwindow; /// - /// Crop Window + /// Crop Window /// public static CropWindow cropwindow; /// - /// Optimize Advanced Window + /// Optimize Advanced Window /// public static InfoWindow infowindow; /// - /// Update Window + /// Update Window /// public static UpdateWindow updatewindow; @@ -151,7 +151,7 @@ public partial class MainWindow : Window // -------------------------------------------------------------------------------------------------------- /// - /// Main Window Initialize + /// Main Window Initialize /// // -------------------------------------------------------------------------------------------------------- public MainWindow() @@ -160,7 +160,7 @@ public MainWindow() // ----------------------------------------------------------------- /// - /// Window & Components + /// Window & Components /// // ----------------------------------------------------------------- // Set Min/Max Width/Height to prevent Tablets maximizing @@ -177,7 +177,7 @@ public MainWindow() // ----------------------------------------------------------------- /// - /// Control Binding Data Context + /// Control Binding Data Context /// // ----------------------------------------------------------------- //VM vm = new VM(); @@ -271,7 +271,7 @@ public MainWindow() /// - /// System Info + /// System Info /// // Shows OS and Hardware information in Log Console SystemInfoDisplay(); @@ -280,7 +280,7 @@ public MainWindow() // ----------------------------------------------------------------- /// - /// Load Saved Settings + /// Load Saved Settings /// // ----------------------------------------------------------------- // Log Console Message ///////// @@ -503,7 +503,7 @@ public MainWindow() /// - /// Window Loaded + /// Window Loaded /// private void Window_Loaded(object sender, RoutedEventArgs e) { @@ -533,7 +533,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e) /// - /// Close / Exit (Method) + /// Close / Exit (Method) /// protected override void OnClosed(EventArgs e) { @@ -652,7 +652,8 @@ void Window_Closing(object sender, CancelEventArgs e) // ------------------------- else { - if (File.Exists(confAppRootPath) || File.Exists(logAppRootPath)) + if (File.Exists(confAppRootPath) || + File.Exists(logAppRootPath)) { MessageBox.Show("Cannot save config/log to Program Files, Axiom does not have Administrator Privileges at this time. \n\nPlease select AppData Local or Roaming instead.", "Notice", @@ -751,7 +752,8 @@ void Window_Closing(object sender, CancelEventArgs e) // ------------------------- else { - if (File.Exists(confAppRootPath) || File.Exists(logAppRootPath)) + if (File.Exists(confAppRootPath) || + File.Exists(logAppRootPath)) { MessageBox.Show("Cannot move config/log from Program Files to AppData Local, Axiom does not have Administrator Privileges at this time. \n\nPlease move the config manually or delete it.", "Notice", @@ -890,7 +892,7 @@ void Window_Closing(object sender, CancelEventArgs e) /// - /// Export Write Config (Method) + /// Export Write Config (Method) /// public void ExportWriteConfig(string path) { @@ -958,7 +960,7 @@ public void ExportWriteConfig(string path) /// - /// Folder Write Access Check (Method) + /// Folder Write Access Check (Method) /// private bool hasWriteAccessToFolder(string path) { @@ -976,7 +978,7 @@ private bool hasWriteAccessToFolder(string path) /// - /// Clear Global Variables (Method) + /// Clear Global Variables (Method) /// public static void ClearGlobalVariables() { @@ -1128,10 +1130,10 @@ public static void ClearGlobalVariables() /// - /// Remove Linebreaks (Method) + /// Remove Linebreaks (Method) /// /// - /// Used for Selected Controls FFmpeg Arguments + /// Used for Selected Controls FFmpeg Arguments /// public static String RemoveLineBreaks(string lines) { @@ -1155,10 +1157,10 @@ public static String RemoveLineBreaks(string lines) /// - /// Replace Linebreaks with Space (Method) + /// Replace Linebreaks with Space (Method) /// /// - /// Used for Script View Custom Edited Script + /// Used for Script View Custom Edited Script /// public static String ReplaceLineBreaksWithSpaces(string lines) { @@ -1182,7 +1184,7 @@ public static String ReplaceLineBreaksWithSpaces(string lines) /// - /// Deny Special Keys + /// Deny Special Keys /// public void DenySpecialKeys(KeyEventArgs e) { @@ -1209,7 +1211,7 @@ public void DenySpecialKeys(KeyEventArgs e) } /// - /// Allow Only Numbers + /// Allow Only Numbers /// public void AllowNumbersOnly(KeyEventArgs e) { @@ -1228,7 +1230,7 @@ public void AllowNumbersOnly(KeyEventArgs e) /// - /// Start Log Console (Method) + /// Start Log Console (Method) /// public void StartLogConsole() { @@ -1243,15 +1245,15 @@ public void StartLogConsole() /// - /// Selected Item + /// Selected Item /// - public static string Video_EncodeSpeed_PreviousItem; - public static string Video_Quality_PreviousItem; - public static string Video_Pass_PreviousItem; - public static string VideoOptimize_PreviousItem; - public static string Audio_Quality_PreviousItem; - public static string Audio_SampleRate_PreviousItem; - public static string Audio_BitDepth_PreviousItem; + public static string Video_EncodeSpeed_PreviousItem { get; set; } + public static string Video_Quality_PreviousItem { get; set; } + public static string Video_Pass_PreviousItem { get; set; } + public static string VideoOptimize_PreviousItem { get; set; } + public static string Audio_Quality_PreviousItem { get; set; } + public static string Audio_SampleRate_PreviousItem { get; set; } + public static string Audio_BitDepth_PreviousItem { get; set; } public static string SelectedItem(List itemsName, string selectedItem ) @@ -1327,7 +1329,7 @@ public static void ConfigDirectoryOpen(string path) /// - /// Config Open Directory - Label Button + /// Config Open Directory - Label Button /// private void lblConfigPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1356,7 +1358,7 @@ private void lblConfigPath_PreviewMouseDown(object sender, MouseButtonEventArgs } /// - /// Config Open Directory - Button + /// Config Open Directory - Button /// private void btnConfigPath_Click(object sender, RoutedEventArgs e) { @@ -1386,7 +1388,7 @@ private void btnConfigPath_Click(object sender, RoutedEventArgs e) /// - /// Config Directory - ComboBox + /// Config Directory - ComboBox /// private void cboConfigPath_SelectionChangedSelectionChangeCommitted(object sender, SelectionChangedEventArgs e) { @@ -1453,7 +1455,7 @@ private void cboConfigPath_SelectionChangedSelectionChangeCommitted(object sende /// - /// Presets Open Directory - Button + /// Presets Open Directory - Button /// private void lblCustomPresetsPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1488,7 +1490,7 @@ private void lblCustomPresetsPath_PreviewMouseDown(object sender, MouseButtonEve } // Open Directory - if (!string.IsNullOrEmpty(VM.ConfigureView.CustomPresetsPath_Text)) + if (IsValidPath(VM.ConfigureView.CustomPresetsPath_Text)) { if (Directory.Exists(VM.ConfigureView.CustomPresetsPath_Text)) { @@ -1498,7 +1500,7 @@ private void lblCustomPresetsPath_PreviewMouseDown(object sender, MouseButtonEve } /// - /// Custom Presets Path - Textbox + /// Custom Presets Path - Textbox /// private void tbxCustomPresetsPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1535,7 +1537,7 @@ private void tbxCustomPresetsPath_PreviewDrop(object sender, DragEventArgs e) } /// - /// CustomPresets Auto Path - Label Button + /// CustomPresets Auto Path - Label Button /// private void btnCustomPresetsAuto_Click(object sender, RoutedEventArgs e) { @@ -1583,7 +1585,7 @@ private void btnCustomPresetsAuto_Click(object sender, RoutedEventArgs e) /// - /// FFmpeg Open Directory - Label Button + /// FFmpeg Open Directory - Label Button /// private void lblFFmpegPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1608,7 +1610,7 @@ private void lblFFmpegPath_PreviewMouseDown(object sender, MouseButtonEventArgs // Get Environment Variable Paths foreach (var path in envar.Split(';')) { - if (!string.IsNullOrEmpty(path)) + if (IsValidPath(path)) { if (Directory.Exists(path)) { @@ -1647,7 +1649,7 @@ private void lblFFmpegPath_PreviewMouseDown(object sender, MouseButtonEventArgs // Open Directory - if (!string.IsNullOrEmpty(ffmpegPath)) + if (IsValidPath(ffmpegPath)) { if (Directory.Exists(ffmpegPath)) { @@ -1657,7 +1659,7 @@ private void lblFFmpegPath_PreviewMouseDown(object sender, MouseButtonEventArgs } /// - /// FFmpeg Path - Textbox + /// FFmpeg Path - Textbox /// private void tbxFFmpegPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1677,7 +1679,7 @@ private void tbxFFmpegPath_PreviewDrop(object sender, DragEventArgs e) } /// - /// FFmpeg Auto Path - Button + /// FFmpeg Auto Path - Button /// private void btnFFmpegAuto_Click(object sender, RoutedEventArgs e) { @@ -1687,7 +1689,7 @@ private void btnFFmpegAuto_Click(object sender, RoutedEventArgs e) /// - /// FFprobe Open Directory - Label Button + /// FFprobe Open Directory - Label Button /// private void lblFFprobePath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1712,7 +1714,7 @@ private void lblFFprobePath_PreviewMouseDown(object sender, MouseButtonEventArgs // Get Environment Variable Paths foreach (var path in envar.Split(';')) { - if (!string.IsNullOrEmpty(path)) + if (IsValidPath(path)) { if (Directory.Exists(path)) { @@ -1750,7 +1752,7 @@ private void lblFFprobePath_PreviewMouseDown(object sender, MouseButtonEventArgs // Open Directory - if (!string.IsNullOrEmpty(ffprobePath)) + if (IsValidPath(ffprobePath)) { if (Directory.Exists(ffprobePath)) { @@ -1760,7 +1762,7 @@ private void lblFFprobePath_PreviewMouseDown(object sender, MouseButtonEventArgs } /// - /// FFprobe Path - Textbox + /// FFprobe Path - Textbox /// private void tbxFFprobePath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1780,7 +1782,7 @@ private void tbxFFprobePath_PreviewDrop(object sender, DragEventArgs e) } /// - /// FFprobe Auto Path - Button + /// FFprobe Auto Path - Button /// private void btnFFprobeAuto_Click(object sender, RoutedEventArgs e) { @@ -1790,7 +1792,7 @@ private void btnFFprobeAuto_Click(object sender, RoutedEventArgs e) /// - /// FFplay Open Directory - Label Button + /// FFplay Open Directory - Label Button /// private void lblFFplayPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1815,7 +1817,7 @@ private void lblFFplayPath_PreviewMouseDown(object sender, MouseButtonEventArgs // Get Environment Variable Paths foreach (var path in envar.Split(';')) { - if (!string.IsNullOrEmpty(path)) + if (IsValidPath(path)) { if (Directory.Exists(path)) { @@ -1853,7 +1855,7 @@ private void lblFFplayPath_PreviewMouseDown(object sender, MouseButtonEventArgs // Open Directory - if (!string.IsNullOrEmpty(ffplayPath)) + if (IsValidPath(ffplayPath)) { if (Directory.Exists(ffplayPath)) { @@ -1863,7 +1865,7 @@ private void lblFFplayPath_PreviewMouseDown(object sender, MouseButtonEventArgs } /// - /// FFplay Path - Textbox + /// FFplay Path - Textbox /// private void tbxFFplayPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1883,7 +1885,7 @@ private void tbxFFplayPath_PreviewDrop(object sender, DragEventArgs e) } /// - /// FFplay Auto Path - Button + /// FFplay Auto Path - Button /// private void btnFFplayAuto_Click(object sender, RoutedEventArgs e) { @@ -1893,7 +1895,7 @@ private void btnFFplayAuto_Click(object sender, RoutedEventArgs e) /// - /// youtube-dl Open Directory - Label Button + /// youtube-dl Open Directory - Label Button /// private void lblyoutubedlPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1918,7 +1920,7 @@ private void lblyoutubedlPath_PreviewMouseDown(object sender, MouseButtonEventAr // Get Environment Variable Paths foreach (var path in envar.Split(';')) { - if (!string.IsNullOrEmpty(path)) + if (IsValidPath(path)) { if (Directory.Exists(path)) { @@ -1956,7 +1958,7 @@ private void lblyoutubedlPath_PreviewMouseDown(object sender, MouseButtonEventAr // Open Directory - if (!string.IsNullOrEmpty(youtubedlPath)) + if (IsValidPath(youtubedlPath)) { if (Directory.Exists(youtubedlPath)) { @@ -1966,7 +1968,7 @@ private void lblyoutubedlPath_PreviewMouseDown(object sender, MouseButtonEventAr } /// - /// youtubedl Path - Textbox + /// youtubedl Path - Textbox /// private void tbxyoutubedlPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -1986,7 +1988,7 @@ private void tbxyoutubedlPath_PreviewDrop(object sender, DragEventArgs e) } /// - /// youtubedl Auto Path - Button + /// youtubedl Auto Path - Button /// private void btnyoutubedlAuto_Click(object sender, RoutedEventArgs e) { @@ -1996,11 +1998,11 @@ private void btnyoutubedlAuto_Click(object sender, RoutedEventArgs e) /// - /// Log Open Directory - Label Button + /// Log Open Directory - Label Button /// private void lblLogPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { - if (!string.IsNullOrEmpty(VM.ConfigureView.LogPath_Text)) + if (IsValidPath(VM.ConfigureView.LogPath_Text)) { if (Directory.Exists(VM.ConfigureView.LogPath_Text)) { @@ -2033,7 +2035,7 @@ private void tbxLogPath_PreviewDrop(object sender, DragEventArgs e) } /// - /// Log Checkbox - Checked + /// Log Checkbox - Checked /// private void cbxLog_Checked(object sender, RoutedEventArgs e) { @@ -2041,7 +2043,7 @@ private void cbxLog_Checked(object sender, RoutedEventArgs e) } /// - /// Log Checkbox - Unchecked + /// Log Checkbox - Unchecked /// private void cbxLog_Unchecked(object sender, RoutedEventArgs e) { @@ -2049,7 +2051,7 @@ private void cbxLog_Unchecked(object sender, RoutedEventArgs e) } /// - /// Log Path - Textbox + /// Log Path - Textbox /// private void tbxLogPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) { @@ -2057,7 +2059,7 @@ private void tbxLogPath_PreviewMouseDown(object sender, MouseButtonEventArgs e) } /// - /// Log Auto Path - Button + /// Log Auto Path - Button /// private void btnLogPathAuto_Click(object sender, RoutedEventArgs e) { @@ -2070,7 +2072,7 @@ private void btnLogPathAuto_Click(object sender, RoutedEventArgs e) /// - /// Threads - ComboBox + /// Threads - ComboBox /// private void threadSelect_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -2107,7 +2109,7 @@ private void threadSelect_KeyDown(object sender, KeyEventArgs e) } /// - /// Theme Select - ComboBox + /// Theme Select - ComboBox /// private void themeSelect_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -2123,7 +2125,7 @@ private void themeSelect_SelectionChanged(object sender, SelectionChangedEventAr /// - /// Updates Auto Check - Checked + /// Updates Auto Check - Checked /// private void tglUpdateAutoCheck_Checked(object sender, RoutedEventArgs e) { @@ -2131,7 +2133,7 @@ private void tglUpdateAutoCheck_Checked(object sender, RoutedEventArgs e) VM.ConfigureView.UpdateAutoCheck_Text = "On"; } /// - /// Updates Auto Check - Unchecked + /// Updates Auto Check - Unchecked /// private void tglUpdateAutoCheck_Unchecked(object sender, RoutedEventArgs e) { @@ -2200,14 +2202,15 @@ private void btnResetConfig_Click(object sender, RoutedEventArgs e) /// - /// Is Valid Windows File Path + /// Is Valid Windows Path /// /// - /// Check for Invalid Characters + /// Check for Invalid Characters /// - public static bool IsValidFilePath(string path) + public static bool IsValidPath(string path) { - if (!string.IsNullOrEmpty(path)) + if (!string.IsNullOrEmpty(path) && + !string.IsNullOrWhiteSpace(path)) { // Not Valid string invalidChars = new string(Path.GetInvalidPathChars()); @@ -2228,10 +2231,10 @@ public static bool IsValidFilePath(string path) /// - /// Is Valid Windows Filename + /// Is Valid Windows Filename /// /// - /// Check for Invalid Characters + /// Check for Invalid Characters /// public static bool IsValidFilename(string filename) { @@ -2248,10 +2251,10 @@ public static bool IsValidFilename(string filename) /// - /// FFcheck (Method) + /// FFcheck (Method) /// /// - /// Check if FFmpeg and FFprobe is on Computer + /// Check if FFmpeg and FFprobe is on Computer /// public static bool FFcheck() { @@ -2306,8 +2309,8 @@ public static bool FFcheck() } } // If User Defined Path - else if (VM.ConfigureView.FFmpegPath_Text != "" && - !string.IsNullOrEmpty(VM.ConfigureView.FFprobePath_Text)) + else if (VM.ConfigureView.FFmpegPath_Text != "" && + IsValidPath(VM.ConfigureView.FFprobePath_Text)) { var dirPath = Path.GetDirectoryName(VM.ConfigureView.FFmpegPath_Text).TrimEnd('\\') + @"\"; var fullPath = Path.Combine(dirPath, "ffmpeg.exe"); @@ -2392,7 +2395,8 @@ public static bool FFcheck() } } // If User Defined Path - else if (VM.ConfigureView.FFprobePath_Text != "" && !string.IsNullOrEmpty(VM.ConfigureView.FFprobePath_Text)) + else if (VM.ConfigureView.FFprobePath_Text != "" && + IsValidPath(VM.ConfigureView.FFprobePath_Text)) { var dirPath = Path.GetDirectoryName(VM.ConfigureView.FFprobePath_Text).TrimEnd('\\') + @"\"; var fullPath = Path.Combine(dirPath, "ffprobe.exe"); @@ -2452,7 +2456,7 @@ public static bool FFcheck() /// - /// FFmpeg Path (Method) + /// FFmpeg Path (Method) /// public static String FFmpegPath() { @@ -2485,7 +2489,7 @@ public static String FFmpegPath() /// - /// FFprobe Path + /// FFprobe Path /// public static void FFprobePath() { @@ -2515,7 +2519,7 @@ public static void FFprobePath() /// - /// FFplay Path + /// FFplay Path /// public static void FFplayPath() { @@ -2545,7 +2549,7 @@ public static void FFplayPath() /// - /// youtube-dl Path + /// youtube-dl Path /// public static void youtubedlPath() { @@ -2583,7 +2587,7 @@ public static void youtubedlPath() /// - /// Thread Detect + /// Thread Detect /// public static String ThreadDetect() { @@ -2627,7 +2631,7 @@ public static String ThreadDetect() /// - /// Is Valid URL + /// Is Valid URL /// //public static bool IsValidURL(string source) //{ @@ -2637,11 +2641,12 @@ public static String ThreadDetect() /// - /// Is Website URL + /// Is Website URL /// public static bool IsWebURL(string input_Text) { - if (!string.IsNullOrEmpty(input_Text)) + if (!string.IsNullOrEmpty(input_Text) && + !string.IsNullOrWhiteSpace(input_Text)) { // URL if ((input_Text.StartsWith("http://") || @@ -2670,11 +2675,12 @@ public static bool IsWebURL(string input_Text) /// - /// Is Website URL + /// Is Website URL /// public static bool IsYouTubeURL(string input_Text) { - if (!string.IsNullOrEmpty(input_Text)) + if (!string.IsNullOrEmpty(input_Text) && + !string.IsNullOrWhiteSpace(input_Text)) { // YouTube if (// youtube (any domain extension) @@ -2713,10 +2719,10 @@ public static bool IsYouTubeURL(string input_Text) /// - /// YouTube Download-Only Mode Check (Method) + /// YouTube Download-Only Mode Check (Method) /// /// - /// If Axiom is in full Codec Copy mode Download the file without converting + /// If Axiom is in full Codec Copy mode Download the file without converting /// public static bool IsWebDownloadOnly(string videoCodec_SelectedItem, string subtitleCodec_SelectedItem, @@ -2772,7 +2778,7 @@ string audioCodec_SelectedItem /// - /// YouTube Download - FFmpeg Path + /// YouTube Download - FFmpeg Path /// public static String YouTubeDL_FFmpegPath() { @@ -2809,7 +2815,7 @@ public static String YouTubeDL_FFmpegPath() /// - /// Convert Button Text Change (Method) + /// Convert Button Text Change (Method) /// public static void ConvertButtonText() { @@ -2834,10 +2840,10 @@ public static void ConvertButtonText() /// - /// YouTube Download Check (Method) + /// YouTube Download Check (Method) /// /// - /// Check if youtube-dl.exe is on Computer + /// Check if youtube-dl.exe is on Computer /// public static bool YouTubeDownloadCheck() { @@ -2851,7 +2857,7 @@ public static bool YouTubeDownloadCheck() /// - /// YouTube Download - URL (Method) + /// YouTube Download - URL (Method) /// public static String YouTubeDownloadURL(string url) { @@ -2865,11 +2871,11 @@ public static String YouTubeDownloadURL(string url) /// - /// YouTube Download - Format (Method) + /// YouTube Download - Format (Method) /// /// - /// For YouTube downloads - use mp4, as most users can play this format on their PC - /// For Other Websites - use mkv for merging format, in case the video+audio codecs can't be merged to mp4 + /// For YouTube downloads - use mp4, as most users can play this format on their PC + /// For Other Websites - use mkv for merging format, in case the video+audio codecs can't be merged to mp4 /// public static String YouTubeDownloadFormat(string youtubedl_SelectedItem, string videoCodec_SelectedItem, @@ -2928,7 +2934,7 @@ string audioCodec_SelectedItem /// - /// YouTube Download - Quality (Method) + /// YouTube Download - Quality (Method) /// public static String YouTubeDownloadQuality(string input_Text, string youtubedl_SelectedItem, @@ -3032,7 +3038,7 @@ string youtubedl_Quality_SelectedItem /// - /// YouTube Method - Selection Changed + /// YouTube Method - Selection Changed /// private void cboYouTube_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -3074,7 +3080,7 @@ private void cboYouTube_SelectionChanged(object sender, SelectionChangedEventArg /// - /// YouTube Download - Merge Output Format + /// YouTube Download - Merge Output Format /// //public static String YouTubeDownload_MergeOutputFormat() //{ @@ -3096,7 +3102,7 @@ private void cboYouTube_SelectionChanged(object sender, SelectionChangedEventArg /// - /// Check if Script has been Edited (Method) + /// Check if Script has been Edited (Method) /// public static bool CheckScriptEdited() { @@ -3105,8 +3111,10 @@ public static bool CheckScriptEdited() // ------------------------- // Check if Script has been modified // ------------------------- - if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text) && - !string.IsNullOrEmpty(FFmpeg.ffmpegArgs)) + if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.ScriptView_Text) && + !string.IsNullOrEmpty(FFmpeg.ffmpegArgs) && + !string.IsNullOrWhiteSpace(FFmpeg.ffmpegArgs)) { //MessageBox.Show(RemoveLineBreaks(ScriptView.GetScriptRichTextBoxContents(mainwindow))); //debug //MessageBox.Show(FFmpeg.ffmpegArgs); //debug @@ -3140,7 +3148,7 @@ public static bool CheckScriptEdited() /// - /// Ready Halts (Method) + /// Ready Halts (Method) /// public static bool ReadyHalts() { @@ -3163,6 +3171,7 @@ public static bool ReadyHalts() if (IsWebURL(VM.MainView.Input_Text) == false) // Ignore Web URL's { if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text) && VM.MainView.Batch_IsChecked == false) { if (!File.Exists(VM.MainView.Input_Text)) @@ -3215,6 +3224,7 @@ public static bool ReadyHalts() // Crop Codec Copy // ------------------------- if (!string.IsNullOrEmpty(CropWindow.crop) && + !string.IsNullOrWhiteSpace(CropWindow.crop) && VM.VideoView.Video_Codec_SelectedItem == "Copy") //null check { // Log Console Message ///////// @@ -3248,7 +3258,8 @@ public static bool ReadyHalts() List errors = new List(); // Bit Rate - if (!string.IsNullOrEmpty(VM.VideoView.Video_BitRate_Text)) + if (!string.IsNullOrEmpty(VM.VideoView.Video_BitRate_Text) && + !string.IsNullOrWhiteSpace(VM.VideoView.Video_BitRate_Text)) { if (VM.VideoView.Video_BitRate_Text.ToUpper()?.Contains("K") != true && VM.VideoView.Video_BitRate_Text.ToUpper()?.Contains("M") != true) @@ -3258,7 +3269,8 @@ public static bool ReadyHalts() } // Min Rate - if (!string.IsNullOrEmpty(VM.VideoView.Video_MinRate_Text)) + if (!string.IsNullOrEmpty(VM.VideoView.Video_MinRate_Text) && + !string.IsNullOrWhiteSpace(VM.VideoView.Video_MinRate_Text)) { if (VM.VideoView.Video_MinRate_Text.ToUpper()?.Contains("K") != true && VM.VideoView.Video_MinRate_Text.ToUpper()?.Contains("M") != true) @@ -3268,7 +3280,8 @@ public static bool ReadyHalts() } // Max Rate - if (!string.IsNullOrEmpty(VM.VideoView.Video_MaxRate_Text)) + if (!string.IsNullOrEmpty(VM.VideoView.Video_MaxRate_Text) && + !string.IsNullOrWhiteSpace(VM.VideoView.Video_MaxRate_Text)) { if (VM.VideoView.Video_MaxRate_Text.ToUpper()?.Contains("K") != true && VM.VideoView.Video_MaxRate_Text.ToUpper()?.Contains("M") != true) @@ -3278,7 +3291,8 @@ public static bool ReadyHalts() } // Buf Size - if (!string.IsNullOrEmpty(VM.VideoView.Video_BufSize_Text)) + if (!string.IsNullOrEmpty(VM.VideoView.Video_BufSize_Text) && + !string.IsNullOrWhiteSpace(VM.VideoView.Video_BufSize_Text)) { if (VM.VideoView.Video_BufSize_Text.ToUpper()?.Contains("K") != true && VM.VideoView.Video_BufSize_Text.ToUpper()?.Contains("M") != true) @@ -3335,7 +3349,8 @@ public static bool ReadyHalts() // Do Not allow Batch Copy to same folder if file extensions are the same (to avoid file overwrite) // ------------------------- if (VM.MainView.Batch_IsChecked == true && - !string.IsNullOrEmpty(VM.MainView.Input_Text)) + !string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { if (string.Equals(inputDir, outputDir, StringComparison.CurrentCultureIgnoreCase) && string.Equals(inputExt, outputExt, StringComparison.CurrentCultureIgnoreCase)) @@ -3369,7 +3384,9 @@ public static bool ReadyHalts() VM.VideoView.Video_Codec_SelectedItem == "VP9") { if (!string.IsNullOrEmpty(VM.VideoView.Video_CRF_Text) && - string.IsNullOrEmpty(VM.VideoView.Video_BitRate_Text)) + !string.IsNullOrWhiteSpace(VM.VideoView.Video_CRF_Text) && + string.IsNullOrEmpty(VM.VideoView.Video_BitRate_Text) && + !string.IsNullOrWhiteSpace(VM.VideoView.Video_BitRate_Text)) { // Log Console Message ///////// Log.logParagraph.Inlines.Add(new LineBreak()); @@ -3396,7 +3413,7 @@ public static bool ReadyHalts() /// - /// System Info + /// System Info /// public void SystemInfoDisplay() { @@ -3405,10 +3422,10 @@ public void SystemInfoDisplay() //{ // ----------------------------------------------------------------- /// - /// System Info + /// System Info /// /// - /// Detect and Display System Hardware + /// Detect and Display System Hardware /// // ----------------------------------------------------------------- // Log Console Message ///////// @@ -3547,7 +3564,7 @@ public void SystemInfoDisplay() /// - /// RAM Type + /// RAM Type /// public class RamInfo { @@ -3615,7 +3632,7 @@ private static string TypeString(int type) /// - /// Normalize Value (Method) + /// Normalize Value (Method) /// public static double NormalizeValue(double val, double valmin, double valmax, double min, double max, double midpoint) { @@ -3637,17 +3654,25 @@ public static double NormalizeValue(double val, double valmin, double valmax, do //} + /// + /// Get Average Value (Method) + /// + //public static double GetAverageValue() + //{ + + //} + // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------- /// - /// CONTROLS + /// CONTROLS /// // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------- /// - /// Info Button + /// Info Button /// private Boolean IsInfoWindowOpened = false; private void btnInfo_Click(object sender, RoutedEventArgs e) @@ -3707,7 +3732,7 @@ private void btnInfo_Click(object sender, RoutedEventArgs e) } /// - /// Website Button + /// Website Button /// private void btbWebsite_Click(object sender, RoutedEventArgs e) { @@ -3717,7 +3742,7 @@ private void btbWebsite_Click(object sender, RoutedEventArgs e) } /// - /// Update Button + /// Update Button /// private Boolean IsUpdateWindowOpened = false; private void btnUpdate_Click(object sender, RoutedEventArgs e) @@ -3760,7 +3785,8 @@ private void btnUpdate_Click(object sender, RoutedEventArgs e) // ------------------------- // Split Version & Build Phase by dash // ------------------------- - if (!string.IsNullOrEmpty(parseLatestVersion)) //null check + if (!string.IsNullOrEmpty(parseLatestVersion) && + !string.IsNullOrWhiteSpace(parseLatestVersion)) //null check { try { @@ -3875,7 +3901,7 @@ private void btnUpdate_Click(object sender, RoutedEventArgs e) } /// - /// Update Available Check + /// Update Available Check /// public static async Task UpdateAvailableCheck() { @@ -3912,7 +3938,8 @@ public static async Task UpdateAvailableCheck() // ------------------------- // Split Version & Build Phase by dash // ------------------------- - if (!string.IsNullOrEmpty(parseLatestVersion)) //null check + if (!string.IsNullOrEmpty(parseLatestVersion) && + !string.IsNullOrWhiteSpace(parseLatestVersion)) //null check { try { @@ -3948,7 +3975,7 @@ public static async Task UpdateAvailableCheck() /// - /// Keep Window - Toggle - Checked + /// Keep Window - Toggle - Checked /// private void tglCMDWindowKeep_Checked(object sender, RoutedEventArgs e) { @@ -3959,7 +3986,7 @@ private void tglCMDWindowKeep_Checked(object sender, RoutedEventArgs e) //Log.logParagraph.Inlines.Add(new Run("On") { Foreground = Log.ConsoleDefault }); } /// - /// Keep Window - Toggle - Unchecked + /// Keep Window - Toggle - Unchecked /// private void tglCMDWindowKeep_Unchecked(object sender, RoutedEventArgs e) { @@ -3971,7 +3998,7 @@ private void tglCMDWindowKeep_Unchecked(object sender, RoutedEventArgs e) } /// - /// Auto Sort Script - Toggle - Checked + /// Auto Sort Script - Toggle - Checked /// private void tglAutoSortScript_Checked(object sender, RoutedEventArgs e) { @@ -3982,7 +4009,7 @@ private void tglAutoSortScript_Checked(object sender, RoutedEventArgs e) //Log.logParagraph.Inlines.Add(new Run("On") { Foreground = Log.ConsoleDefault }); } /// - /// Auto Sort Script - Toggle - Unchecked + /// Auto Sort Script - Toggle - Unchecked /// private void tglAutoSortScript_Unchecked(object sender, RoutedEventArgs e) { @@ -3994,7 +4021,7 @@ private void tglAutoSortScript_Unchecked(object sender, RoutedEventArgs e) } /// - /// Debug Console Window Button + /// Debug Console Window Button /// private Boolean IsDebugConsoleOpened = false; private void btnDebugConsole_Click(object sender, RoutedEventArgs e) @@ -4057,7 +4084,7 @@ private void btnDebugConsole_Click(object sender, RoutedEventArgs e) } /// - /// Log Console Window Button + /// Log Console Window Button /// private void btnLogConsole_Click(object sender, RoutedEventArgs e) { @@ -4092,7 +4119,7 @@ private void btnLogConsole_Click(object sender, RoutedEventArgs e) } /// - /// Log Button + /// Log Button /// private void btnLog_Click(object sender, RoutedEventArgs e) { @@ -4120,7 +4147,7 @@ private void btnLog_Click(object sender, RoutedEventArgs e) } /// - /// CMD Button + /// CMD Button /// private void btnCmd_Click(object sender, RoutedEventArgs e) { @@ -4130,7 +4157,7 @@ private void btnCmd_Click(object sender, RoutedEventArgs e) } /// - /// File Properties Button + /// File Properties Button /// private Boolean IsFilePropertiesOpened = false; private void btnProperties_Click(object sender, RoutedEventArgs e) @@ -4191,7 +4218,7 @@ private void btnProperties_Click(object sender, RoutedEventArgs e) } /// - /// Play File Button + /// Play File Button /// private void btnPlayFile_Click(object sender, RoutedEventArgs e) { @@ -4215,7 +4242,7 @@ private void btnPlayFile_Click(object sender, RoutedEventArgs e) /// - /// Input Button + /// Input Button /// private void btnInput_Click(object sender, RoutedEventArgs e) { @@ -4240,7 +4267,8 @@ private void btnInput_Click(object sender, RoutedEventArgs e) inputPreviousPath = conf.Read("User", "InputPreviousPath"); // Use Previous Path if Not Empty - if (!string.IsNullOrEmpty(inputPreviousPath)) + if (!string.IsNullOrEmpty(inputPreviousPath) && + !string.IsNullOrWhiteSpace(inputPreviousPath)) { selectFile.InitialDirectory = inputPreviousPath; } @@ -4318,7 +4346,7 @@ private void btnInput_Click(object sender, RoutedEventArgs e) // Input Directory //inputDir = Path.GetDirectoryName(VM.MainView.Input_Text.TrimEnd('\\') + @"\"); inputDir = VM.MainView.Input_Text.TrimEnd('\\') + @"\"; // Note: Do not use Path.GetDirectoryName() with Batch Path only - // It will remove the last dir as a file extension + // It will remove the last dir as a file extension } // ------------------------- @@ -4334,7 +4362,7 @@ private void btnInput_Click(object sender, RoutedEventArgs e) /// - /// Input Textbox + /// Input Textbox /// private void tbxInput_TextChanged(object sender, TextChangedEventArgs e) { @@ -4351,7 +4379,8 @@ private void tbxInput_TextChanged(object sender, TextChangedEventArgs e) if (VM.MainView.Batch_IsChecked == false) { // Has Text - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { // Remove stray slash if closed out early if (input == @"\") @@ -4379,7 +4408,8 @@ private void tbxInput_TextChanged(object sender, TextChangedEventArgs e) else { // Has Text - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { // Remove stray slash if closed out early if (input == @"\") @@ -4405,11 +4435,12 @@ private void tbxInput_TextChanged(object sender, TextChangedEventArgs e) // ------------------------- // Enable / Disable "Open Input Location" Button // ------------------------- - if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && - IsValidFilePath(VM.MainView.Input_Text) == true && // Detect Invalid Characters + if (//!string.IsNullOrEmpty(VM.MainView.Input_Text) && + //!string.IsNullOrWhiteSpace(VM.MainView.Input_Text) && + IsValidPath(VM.MainView.Input_Text) == true && // Detect Invalid Characters - Path.IsPathRooted(VM.MainView.Input_Text) == true // TrimEnd('\\') + @"\" is adding a backslash to - // Iput text 'http' until it is detected as Web URL + Path.IsPathRooted(VM.MainView.Input_Text) == true // TrimEnd('\\') + @"\" is adding a backslash to + // Iput text 'http' until it is detected as Web URL ) { bool exists = Directory.Exists(Path.GetDirectoryName(VM.MainView.Input_Text)); @@ -4472,7 +4503,7 @@ private void tbxInput_TextChanged(object sender, TextChangedEventArgs e) } /// - /// Input Textbox - Drag and Drop + /// Input Textbox - Drag and Drop /// private void tbxInput_PreviewDragOver(object sender, DragEventArgs e) { @@ -4497,11 +4528,11 @@ private void tbxInput_PreviewDrop(object sender, DragEventArgs e) } /// - /// Open Input Folder Button + /// Open Input Folder Button /// private void openLocationInput_Click(object sender, RoutedEventArgs e) { - if (!string.IsNullOrEmpty(inputDir)) + if (IsValidPath(inputDir)) { if (Directory.Exists(@inputDir)) { @@ -4513,7 +4544,7 @@ private void openLocationInput_Click(object sender, RoutedEventArgs e) /// - /// Output Button + /// Output Button /// private void btnOutput_Click(object sender, RoutedEventArgs e) { @@ -4599,24 +4630,34 @@ private void btnOutput_Click(object sender, RoutedEventArgs e) // Process Dialog Box if (result == true) { - // Display path and file in Output Textbox - VM.MainView.Output_Text = saveFile.FileName; + if (IsValidPath(saveFile.FileName)) + { + // Display path and file in Output Textbox + VM.MainView.Output_Text = saveFile.FileName; - // Output Path - outputDir = Path.GetDirectoryName(VM.MainView.Output_Text).TrimEnd('\\') + @"\"; + // Output Path + outputDir = Path.GetDirectoryName(VM.MainView.Output_Text).TrimEnd('\\') + @"\"; - // Output Filename (without extension) - outputFileName = Path.GetFileNameWithoutExtension(VM.MainView.Output_Text); + // Output Filename (without extension) + outputFileName = Path.GetFileNameWithoutExtension(VM.MainView.Output_Text); - // Add slash to inputDir path if missing - if (!string.IsNullOrEmpty(outputDir)) - { - if (!outputDir.EndsWith("\\")) - { - outputDir = outputDir.TrimEnd('\\') + @"\"; - } + // Add slash to inputDir path if missing + outputDir = outputDir.TrimEnd('\\') + @"\"; + + // Debug + //MessageBox.Show(VM.MainView.Output_Text); + //MessageBox.Show(outputDir); } + //// Add slash to inputDir path if missing + //if (IsValidPath(outputDir)) + //{ + // if (!outputDir.EndsWith("\\")) + // { + // outputDir = outputDir.TrimEnd('\\') + @"\"; + // } + //} + // Save Previous Path //Settings.Default.OutputDir = outputDir; //Settings.Default.Save(); @@ -4648,23 +4689,29 @@ private void btnOutput_Click(object sender, RoutedEventArgs e) // Process Dialog Box if (result == System.Windows.Forms.DialogResult.OK) { - // Display path and file in Output Textbox - VM.MainView.Output_Text = outputFolder.SelectedPath.TrimEnd('\\') + @"\"; + if (IsValidPath(outputFolder.SelectedPath.TrimEnd('\\') + @"\")) + { + // Display path and file in Output Textbox + VM.MainView.Output_Text = outputFolder.SelectedPath.TrimEnd('\\') + @"\"; - // Remove Double Slash in Root Dir, such as C:\ - VM.MainView.Output_Text = VM.MainView.Output_Text.Replace(@"\\", @"\"); + // Remove Double Slash in Root Dir, such as C:\ + VM.MainView.Output_Text = VM.MainView.Output_Text.Replace(@"\\", @"\"); - // Output Path - outputDir = Path.GetDirectoryName(VM.MainView.Output_Text.TrimEnd('\\') + @"\"); + // Output Path + outputDir = Path.GetDirectoryName(VM.MainView.Output_Text); - // Add slash to inputDir path if missing - if (!string.IsNullOrEmpty(outputDir)) - { - if (!outputDir.EndsWith("\\")) - { - outputDir = outputDir.TrimEnd('\\') + @"\"; - } + // Add slash to inputDir path if missing + outputDir = outputDir.TrimEnd('\\') + @"\"; } + + // Add slash to inputDir path if missing + //if (IsValidPath(outputDir)) + //{ + // if (!outputDir.EndsWith("\\")) + // { + // outputDir = outputDir.TrimEnd('\\') + @"\"; + // } + //} } } @@ -4672,7 +4719,7 @@ private void btnOutput_Click(object sender, RoutedEventArgs e) /// - /// Output Textbox + /// Output Textbox /// private void tbxOutput_TextChanged(object sender, TextChangedEventArgs e) { @@ -4683,7 +4730,11 @@ private void tbxOutput_TextChanged(object sender, TextChangedEventArgs e) } // Enable / Disable "Open Output Location" Buttion - if (!string.IsNullOrEmpty(VM.MainView.Output_Text)) + if (//!string.IsNullOrEmpty(VM.MainView.Output_Text) && + //!string.IsNullOrWhiteSpace(VM.MainView.Output_Text) + IsValidPath(VM.MainView.Output_Text) && // Detect Invalid Characters + Path.IsPathRooted(VM.MainView.Output_Text) == true + ) { bool exists = Directory.Exists(Path.GetDirectoryName(VM.MainView.Output_Text)); @@ -4700,7 +4751,7 @@ private void tbxOutput_TextChanged(object sender, TextChangedEventArgs e) /// - /// Output Textbox - Drag and Drop + /// Output Textbox - Drag and Drop /// private void tbxOutput_PreviewDragOver(object sender, DragEventArgs e) { @@ -4716,11 +4767,11 @@ private void tbxOutput_PreviewDrop(object sender, DragEventArgs e) /// - /// Open Output Folder Button + /// Open Output Folder Button /// private void openLocationOutput_Click(object sender, RoutedEventArgs e) { - if (!string.IsNullOrEmpty(outputDir)) + if (IsValidPath(outputDir)) { if (Directory.Exists(@outputDir)) { @@ -4731,14 +4782,15 @@ private void openLocationOutput_Click(object sender, RoutedEventArgs e) /// - /// Batch Extension Period Check (Method) + /// Batch Extension Period Check (Method) /// public static void BatchExtCheck() { if (VM.MainView.Batch_IsChecked == true) { // Add period to Batch Extension if User did not enter one - if (!string.IsNullOrEmpty(VM.MainView.BatchExtension_Text)) + if (!string.IsNullOrEmpty(VM.MainView.BatchExtension_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.BatchExtension_Text)) { if (VM.MainView.BatchExtension_Text != "extension" && VM.MainView.BatchExtension_Text != "." && @@ -4757,7 +4809,7 @@ public static void BatchExtCheck() /// - /// Batch Toggle + /// Batch Toggle /// // Checked private void tglBatch_Checked(object sender, RoutedEventArgs e) @@ -4770,7 +4822,8 @@ private void tglBatch_Checked(object sender, RoutedEventArgs e) } // Clear Browse Textbox, Input Filename, Dir, Ext - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { VM.MainView.Input_Text = string.Empty; inputFileName = string.Empty; @@ -4779,7 +4832,8 @@ private void tglBatch_Checked(object sender, RoutedEventArgs e) } // Clear Output Textbox, Output Filename, Dir, Ext - if (!string.IsNullOrEmpty(VM.MainView.Output_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Output_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Output_Text)) { VM.MainView.Output_Text = string.Empty; outputFileName = string.Empty; @@ -4799,7 +4853,8 @@ private void tglBatch_Unchecked(object sender, RoutedEventArgs e) } // Clear Browse Textbox, Batch Filename, Dir, Ext - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { VM.MainView.Input_Text = string.Empty; inputFileName = string.Empty; @@ -4808,7 +4863,8 @@ private void tglBatch_Unchecked(object sender, RoutedEventArgs e) } // Clear Output Textbox, Output Filename, Dir, Ext - if (!string.IsNullOrEmpty(VM.MainView.Output_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Output_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Output_Text)) { VM.MainView.Output_Text = string.Empty; outputFileName = string.Empty; @@ -4824,7 +4880,7 @@ private void tglBatch_Unchecked(object sender, RoutedEventArgs e) /// - /// Batch Extension Textbox + /// Batch Extension Textbox /// private void batchExtension_TextChanged(object sender, TextChangedEventArgs e) { @@ -4843,6 +4899,7 @@ private void batchExtension_TextChanged(object sender, TextChangedEventArgs e) // Add period to batchExt if user did not enter (This helps enable Copy) if (!string.IsNullOrEmpty(VM.MainView.BatchExtension_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.BatchExtension_Text) && !inputExt.StartsWith(".") && VM.MainView.BatchExtension_Text != "extension") { @@ -4863,7 +4920,7 @@ private void batchExtension_TextChanged(object sender, TextChangedEventArgs e) /// - /// File Renamer (Method) + /// File Renamer (Method) /// public static String FileRenamer(string filename) { @@ -4893,11 +4950,12 @@ public static String FileRenamer(string filename) /// - /// Input Path + /// Input Path /// public static String InputPath(string pass) { - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) + if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { // ------------------------- // Local File @@ -4911,12 +4969,13 @@ public static String InputPath(string pass) pass != "pass 2") // Ignore Pass 2, use existing input path { // Input Directory - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) - { + //if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + // !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) + //{ inputDir = Path.GetDirectoryName(VM.MainView.Input_Text).TrimEnd('\\') + @"\"; // eg. C:\Input\Path\ inputFileName = Path.GetFileNameWithoutExtension(VM.MainView.Input_Text); inputExt = Path.GetExtension(VM.MainView.Input_Text); - } + //} // Combine Input input = VM.MainView.Input_Text; // eg. C:\Path\To\file.avi @@ -4928,7 +4987,7 @@ public static String InputPath(string pass) else if (VM.MainView.Batch_IsChecked == true) { inputDir = VM.MainView.Input_Text.TrimEnd('\\') + @"\"; // Note: Do not use Path.GetDirectoryName() with Batch Path only - // It will remove the last dir as a file extension + // It will remove the last dir as a file extension // Note: %f is filename, %~f is full path inputFileName = "%~f"; @@ -4976,7 +5035,7 @@ public static String InputPath(string pass) /// - /// Batch Input Directory + /// Batch Input Directory /// // Directory Only, Needed for Batch public static String BatchInputDirectory() @@ -4993,7 +5052,8 @@ public static String BatchInputDirectory() // Empty // ------------------------- // Input Textbox & Output Textbox Both Empty - if (string.IsNullOrEmpty(VM.MainView.Input_Text)) + if (string.IsNullOrEmpty(VM.MainView.Input_Text) || + string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) { inputDir = string.Empty; } @@ -5005,14 +5065,15 @@ public static String BatchInputDirectory() /// - /// Output Path + /// Output Path /// public static String OutputPath() { // Get Output Extension (Method) FormatControls.OutputFormatExt(); - if (!string.IsNullOrEmpty(VM.MainView.Input_Text)) // Check Input + if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text)) // Check Input { // ------------------------- // Local File @@ -5027,7 +5088,9 @@ public static String OutputPath() // Input Not Empty // Output Empty if (!string.IsNullOrEmpty(VM.MainView.Input_Text) && - string.IsNullOrEmpty(VM.MainView.Output_Text)) + !string.IsNullOrWhiteSpace(VM.MainView.Input_Text) && + string.IsNullOrEmpty(VM.MainView.Output_Text) && + string.IsNullOrWhiteSpace(VM.MainView.Output_Text)) { // Default Output Dir to be same as Input Directory outputDir = inputDir; @@ -5170,11 +5233,11 @@ public static String OutputPath() /// - /// Extension Match Check Auto + /// Extension Match Check Auto /// /// - /// Change the Controls to Auto if Input Extension matches Output Extsion - /// This will trigger Auto Codec Copy + /// Change the Controls to Auto if Input Extension matches Output Extsion + /// This will trigger Auto Codec Copy /// public void ExtensionMatchCheckAuto() { @@ -5224,7 +5287,7 @@ public void ExtensionMatchCheckAuto() /// - /// Container - ComboBox + /// Container - ComboBox /// private void cboFormat_Container_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5291,7 +5354,7 @@ private void cboFormat_Container_SelectionChanged(object sender, SelectionChange /// - /// Media Type - Combobox + /// Media Type - Combobox /// private void cboFormat_MediaType_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5300,7 +5363,7 @@ private void cboFormat_MediaType_SelectionChanged(object sender, SelectionChange /// - /// Cut Combobox + /// Cut Combobox /// private void cboFormat_Cut_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5308,7 +5371,7 @@ private void cboFormat_Cut_SelectionChanged(object sender, SelectionChangedEvent } /// - /// Cut Start - Textbox + /// Cut Start - Textbox /// // ------------------------- // Cut Start - Hours - Textbox Change @@ -5329,7 +5392,8 @@ private void tbxCutStartHours_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutStart_Hours_Text = tbxCutStartHours.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Hours_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Hours_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutStart_Hours_Text)) { VM.FormatView.Format_CutStart_Hours_Text = "00"; } @@ -5359,7 +5423,8 @@ private void tbxCutStartMinutes_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutStart_Minutes_Text = tbxCutStartMinutes.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Minutes_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Minutes_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutStart_Minutes_Text)) { VM.FormatView.Format_CutStart_Minutes_Text = "00"; } @@ -5389,7 +5454,8 @@ private void tbxCutStartSeconds_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutStart_Seconds_Text = tbxCutStartSeconds.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Seconds_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Seconds_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutStart_Seconds_Text)) { VM.FormatView.Format_CutStart_Seconds_Text = "00"; } @@ -5419,7 +5485,8 @@ private void tbxCutStartMilliseconds_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutStart_Milliseconds_Text = tbxCutStartMilliseconds.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Milliseconds_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutStart_Milliseconds_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutStart_Milliseconds_Text)) { VM.FormatView.Format_CutStart_Milliseconds_Text = "000"; } @@ -5431,7 +5498,7 @@ private void tbxCutStartMilliseconds_KeyDown(object sender, KeyEventArgs e) } /// - /// Cut End - Textbox + /// Cut End - Textbox /// // ------------------------- // Cut End - Hours - Textbox Change @@ -5452,7 +5519,8 @@ private void tbxCutEndHours_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutEnd_Hours_Text = tbxCutEndHours.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Hours_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Hours_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutEnd_Hours_Text)) { VM.FormatView.Format_CutEnd_Hours_Text = "00"; } @@ -5482,7 +5550,8 @@ private void tbxCutEndMinutes_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutEnd_Minutes_Text = tbxCutEndMinutes.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Minutes_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Minutes_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutEnd_Minutes_Text)) { VM.FormatView.Format_CutEnd_Minutes_Text = "00"; } @@ -5512,7 +5581,8 @@ private void tbxCutEndSeconds_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutEnd_Seconds_Text = tbxCutEndSeconds.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Seconds_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Seconds_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutEnd_Seconds_Text)) { VM.FormatView.Format_CutEnd_Seconds_Text = "00"; } @@ -5542,7 +5612,8 @@ private void tbxCutEndMilliseconds_LostFocus(object sender, RoutedEventArgs e) VM.FormatView.Format_CutEnd_Milliseconds_Text = tbxCutEndMilliseconds.Text; // Change textbox back to "00" if left empty - if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Milliseconds_Text)) + if (string.IsNullOrEmpty(VM.FormatView.Format_CutEnd_Milliseconds_Text) || + string.IsNullOrWhiteSpace(VM.FormatView.Format_CutEnd_Milliseconds_Text)) { VM.FormatView.Format_CutEnd_Milliseconds_Text = "000"; } @@ -5591,7 +5662,7 @@ private void tbxFrameEnd_KeyDown(object sender, KeyEventArgs e) /// - /// Video Codec - ComboBox + /// Video Codec - ComboBox /// private void cboVideo_Codec_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5637,7 +5708,7 @@ private void cboVideo_Codec_SelectionChanged(object sender, SelectionChangedEven /// - /// Pass - ComboBox + /// Pass - ComboBox /// private void cboVideo_Pass_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5667,7 +5738,7 @@ private void cboVideo_Pass_DropDownClosed(object sender, EventArgs e) /// - /// Video Quality - ComboBox + /// Video Quality - ComboBox /// private void cboVideo_Quality_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5715,13 +5786,14 @@ private void cboVideo_Quality_SelectionChanged(object sender, SelectionChangedEv /// - /// Video CRF Custom Number Textbox + /// Video CRF Custom Number Textbox /// // TextBox TextChanged private void tbxVideo_CRF_TextChanged(object sender, TextChangedEventArgs e) { // Update Slider with entered value - if (!string.IsNullOrEmpty(VM.VideoView.Video_CRF_Text)) + if (!string.IsNullOrEmpty(VM.VideoView.Video_CRF_Text) && + !string.IsNullOrWhiteSpace(VM.VideoView.Video_CRF_Text)) { VM.VideoView.Video_CRF_Value = Convert.ToDouble(VM.VideoView.Video_CRF_Text); } @@ -5754,7 +5826,7 @@ private void slVideo_CRF_MouseDoubleClick(object sender, MouseButtonEventArgs e) } /// - /// Video VBR Toggle - Checked + /// Video VBR Toggle - Checked /// private void tglVideo_VBR_Checked(object sender, RoutedEventArgs e) { @@ -5793,7 +5865,7 @@ private void tglVideo_VBR_Checked(object sender, RoutedEventArgs e) } /// - /// Video VBR Toggle - Unchecked + /// Video VBR Toggle - Unchecked /// private void tglVideo_VBR_Unchecked(object sender, RoutedEventArgs e) { @@ -5825,15 +5897,14 @@ private void tglVideo_VBR_Unchecked(object sender, RoutedEventArgs e) // ------------------------- // Display Bit Rate in TextBox // ------------------------- - VideoControls.VideoBitRateDisplay( - VM.VideoView.Video_Quality_Items, + VideoControls.VideoBitRateDisplay(VM.VideoView.Video_Quality_Items, VM.VideoView.Video_Quality_SelectedItem, VM.VideoView.Video_Pass_SelectedItem); } /// - /// Pixel Format + /// Pixel Format /// private void cboVideo_PixelFormat_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5842,7 +5913,7 @@ private void cboVideo_PixelFormat_SelectionChanged(object sender, SelectionChang /// - /// FPS ComboBox + /// FPS ComboBox /// private void cboVideo_FPS_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5898,7 +5969,7 @@ private void cboVideo_FrameRate_KeyDown(object sender, KeyEventArgs e) /// - /// Speed ComboBox + /// Speed ComboBox /// private void cboVideo_Speed_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5941,7 +6012,7 @@ private void cboVideo_Speed_KeyDown(object sender, KeyEventArgs e) /// - /// Presets + /// Presets /// private void cboPreset_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -5949,7 +6020,7 @@ private void cboPreset_SelectionChanged(object sender, SelectionChangedEventArgs } /// - /// Delete Preset - Button + /// Delete Preset - Button /// private void btnDeletePreset_Click(object sender, RoutedEventArgs e) { @@ -6048,11 +6119,16 @@ private void btnDeletePreset_Click(object sender, RoutedEventArgs e) /// - /// Save Preset - Button + /// Save Preset - Button /// private void btnSavePreset_Click(object sender, RoutedEventArgs e) { // Check if Profiles Directory exists + // Check if Custom Presets Path is valid + if (MainWindow.IsValidPath(VM.ConfigureView.CustomPresetsPath_Text) == false) + { + return; + } // If not, create it if (!Directory.Exists(VM.ConfigureView.CustomPresetsPath_Text)) @@ -6176,7 +6252,7 @@ private void btnSavePreset_Click(object sender, RoutedEventArgs e) /// - /// Video Optimize Combobox + /// Video Optimize Combobox /// private void cboVideo_Optimize_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6187,7 +6263,7 @@ private void cboVideo_Optimize_SelectionChanged(object sender, SelectionChangedE } /// - /// Video Optimize Expander + /// Video Optimize Expander /// //// Expanded //private void expVideo_Optimize_Expander_Expanded(object sender, RoutedEventArgs e) @@ -6212,7 +6288,7 @@ private void cboVideo_Optimize_SelectionChanged(object sender, SelectionChangedE /// - /// Video Size Combobox + /// Video Size Combobox /// private void cboVideo_Scale_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6262,11 +6338,11 @@ private void cboVideo_Scale_SelectionChanged(object sender, SelectionChangedEven /// - /// Video Scale Display + /// Video Scale Display /// /// - /// If Input Video is Widescreen (16:9, 16:10, etc) or auto, scale by Width -vf "scale=1920:-2" - /// If Input Video is Full Screen (4:3, 5:4, etc), scale by Height -vf "scale=-2:1080" + /// If Input Video is Widescreen (16:9, 16:10, etc) or auto, scale by Width -vf "scale=1920:-2" + /// If Input Video is Full Screen (4:3, 5:4, etc), scale by Height -vf "scale=-2:1080" /// public static void VideoScaleDisplay() { @@ -6657,7 +6733,7 @@ public static void VideoScaleDisplay() /// - /// Is Aspect Ratio Widescreen + /// Is Aspect Ratio Widescreen /// //public static bool IsAspectRatioWidescreen(string aspectRatio_SelectedItem) //{ @@ -6684,7 +6760,7 @@ public static void VideoScaleDisplay() /// - /// Width Textbox Change + /// Width Textbox Change /// // Got Focus private void tbxVideo_Width_GotFocus(object sender, RoutedEventArgs e) @@ -6702,14 +6778,15 @@ private void tbxVideo_Width_LostFocus(object sender, RoutedEventArgs e) VM.VideoView.Video_Width_Text = tbxVideo_Width.Text; // Change textbox back to "auto" if left empty - if (string.IsNullOrEmpty(VM.VideoView.Video_Width_Text)) + if (string.IsNullOrEmpty(VM.VideoView.Video_Width_Text) || + string.IsNullOrWhiteSpace(VM.VideoView.Video_Width_Text)) { VM.VideoView.Video_Width_Text = "auto"; } } /// - /// Height Textbox Change + /// Height Textbox Change /// // Got Focus private void tbxVideo_Height_GotFocus(object sender, RoutedEventArgs e) @@ -6727,7 +6804,8 @@ private void tbxVideo_Height_LostFocus(object sender, RoutedEventArgs e) VM.VideoView.Video_Height_Text = tbxVideo_Height.Text; // Change textbox back to "height" if left empty - if (string.IsNullOrEmpty(VM.VideoView.Video_Height_Text)) + if (string.IsNullOrEmpty(VM.VideoView.Video_Height_Text) || + string.IsNullOrWhiteSpace(VM.VideoView.Video_Height_Text)) { VM.VideoView.Video_Height_Text = "auto"; } @@ -6735,7 +6813,7 @@ private void tbxVideo_Height_LostFocus(object sender, RoutedEventArgs e) /// - /// Video Screen Format + /// Video Screen Format /// private void cboVideo_ScreenFormat_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6747,7 +6825,7 @@ private void cboVideo_ScreenFormat_SelectionChanged(object sender, SelectionChan /// - /// Video Aspect Ratio + /// Video Aspect Ratio /// private void cboVideo_AspectRatio_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6756,7 +6834,7 @@ private void cboVideo_AspectRatio_SelectionChanged(object sender, SelectionChang /// - /// Video Scaling Algorithm + /// Video Scaling Algorithm /// private void cboVideo_ScalingAlgorithm_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6765,7 +6843,7 @@ private void cboVideo_ScalingAlgorithm_SelectionChanged(object sender, Selection /// - /// Crop Window - Button + /// Crop Window - Button /// private void btnVideo_Crop_Click(object sender, RoutedEventArgs e) { @@ -6790,7 +6868,7 @@ private void btnVideo_Crop_Click(object sender, RoutedEventArgs e) /// - /// Crop Clear Button + /// Crop Clear Button /// private void btnVideo_CropClear_Click(object sender, RoutedEventArgs e) { @@ -6801,7 +6879,7 @@ private void btnVideo_CropClear_Click(object sender, RoutedEventArgs e) /// - /// Subtitle Codec - ComboBox + /// Subtitle Codec - ComboBox /// private void cboSubtitle_Codec_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6818,7 +6896,7 @@ private void cboSubtitle_Codec_SelectionChanged(object sender, SelectionChangedE /// - /// Subtitle Stream - ComboBox + /// Subtitle Stream - ComboBox /// private void cboSubtitle_Stream_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6844,7 +6922,7 @@ private void cboSubtitle_Stream_SelectionChanged(object sender, SelectionChanged } /// - /// Subtitle ListView + /// Subtitle ListView /// private void lstvSubtitles_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -6864,7 +6942,7 @@ private void lstvSubtitles_SelectionChanged(object sender, SelectionChangedEvent /// - /// Subtitle Add + /// Subtitle Add /// private void btnSubtitle_Add_Click(object sender, RoutedEventArgs e) { @@ -7025,7 +7103,7 @@ private void btnSubtitle_SortDown_Click(object sender, RoutedEventArgs e) /// - /// Audio Codec - ComboBox + /// Audio Codec - ComboBox /// private void cboAudio_Codec_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -7047,7 +7125,7 @@ private void cboAudio_Codec_SelectionChanged(object sender, SelectionChangedEven /// - /// Audio Channel - ComboBox + /// Audio Channel - ComboBox /// private void cboAudio_Channel_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -7056,7 +7134,7 @@ private void cboAudio_Channel_SelectionChanged(object sender, SelectionChangedEv /// - /// Audio Quality - ComboBox + /// Audio Quality - ComboBox /// private void cboAudio_Quality_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -7081,7 +7159,7 @@ private void cboAudio_Quality_SelectionChanged(object sender, SelectionChangedEv /// - /// Audio VBR - Toggle + /// Audio VBR - Toggle /// // Checked private void tglAudio_VBR_Checked(object sender, RoutedEventArgs e) @@ -7116,7 +7194,7 @@ private void tglAudio_VBR_Unchecked(object sender, RoutedEventArgs e) /// - /// Audio Custom BitRate kbps - Textbox + /// Audio Custom BitRate kbps - Textbox /// private void tbxAudio_BitRate_KeyDown(object sender, KeyEventArgs e) { @@ -7148,7 +7226,7 @@ private void tbxAudio_BitRate_LostFocus(object sender, RoutedEventArgs e) /// - /// Samplerate ComboBox + /// Samplerate ComboBox /// private void cboAudio_SampleRate_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -7171,7 +7249,7 @@ private void cboAudio_SampleRate_SelectionChanged(object sender, SelectionChange /// - /// Bit Depth ComboBox + /// Bit Depth ComboBox /// private void cboAudio_BitDepth_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -7183,14 +7261,14 @@ private void cboAudio_BitDepth_SelectionChanged(object sender, SelectionChangedE /// - /// Volume TextBox Changed + /// Volume TextBox Changed /// private void tbxAudio_Volume_TextChanged(object sender, TextChangedEventArgs e) { } /// - /// Volume TextBox KeyDown + /// Volume TextBox KeyDown /// private void tbxAudio_Volume_KeyDown(object sender, KeyEventArgs e) { @@ -7199,7 +7277,7 @@ private void tbxAudio_Volume_KeyDown(object sender, KeyEventArgs e) } /// - /// Volume Buttons + /// Volume Buttons /// // ------------------------- // Up @@ -7272,7 +7350,7 @@ private void btnAudio_VolumeDown_PreviewMouseUp(object sender, MouseButtonEventA /// - /// Audio Hard Limiter - Slider + /// Audio Hard Limiter - Slider /// private void slAudio_HardLimiter_MouseDoubleClick(object sender, MouseButtonEventArgs e) { @@ -7299,7 +7377,7 @@ private void tbxAudio_HardLimiter_PreviewKeyUp(object sender, KeyEventArgs e) // -------------------------------------------------------------------------------------------------------- ///// - ///// Filter - Selective SelectiveColorPreview - ComboBox + ///// Filter - Selective SelectiveColorPreview - ComboBox ///// //public static List cboSelectiveColor_Items = new List() //{ @@ -7377,7 +7455,7 @@ private void cboFilterVideo_SelectiveColor_SelectionChanged(object sender, Selec } /// - /// Filter Video - Selective Color Sliders + /// Filter Video - Selective Color Sliders /// // Reds Cyan private void slFilterVideo_SelectiveColor_Reds_Cyan_MouseDoubleClick(object sender, MouseButtonEventArgs e) @@ -7818,7 +7896,7 @@ private void tbxFilterVideo_SelectiveColor_Blacks_Yellow_PreviewKeyUp(object sen /// - /// Filter Video - Selective Color Reset + /// Filter Video - Selective Color Reset /// private void btnFilterVideo_SelectiveColorReset_Click(object sender, RoutedEventArgs e) { @@ -7893,7 +7971,7 @@ private void btnFilterVideo_SelectiveColorReset_Click(object sender, RoutedEvent /// - /// Filter Video - EQ Sliders + /// Filter Video - EQ Sliders /// // Brightness private void slFilterVideo_EQ_Brightness_MouseDoubleClick(object sender, MouseButtonEventArgs e) @@ -8005,7 +8083,7 @@ private void btnFilterVideo_EQ_Reset_Click(object sender, RoutedEventArgs e) /// - /// Filter Video - Deband + /// Filter Video - Deband /// private void cboFilterVideo_Deband_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -8013,7 +8091,7 @@ private void cboFilterVideo_Deband_SelectionChanged(object sender, SelectionChan } /// - /// Filter Video - Deshake + /// Filter Video - Deshake /// private void cboFilterVideo_Deshake_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -8021,7 +8099,7 @@ private void cboFilterVideo_Deshake_SelectionChanged(object sender, SelectionCha } /// - /// Filter Video - Deflicker + /// Filter Video - Deflicker /// private void cboFilterVideo_Deflicker_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -8029,7 +8107,7 @@ private void cboFilterVideo_Deflicker_SelectionChanged(object sender, SelectionC } /// - /// Filter Video - Dejudder + /// Filter Video - Dejudder /// private void cboFilterVideo_Dejudder_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -8037,7 +8115,7 @@ private void cboFilterVideo_Dejudder_SelectionChanged(object sender, SelectionCh } /// - /// Filter Video - Denoise + /// Filter Video - Denoise /// private void cboFilterVideo_Denoise_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -8045,7 +8123,7 @@ private void cboFilterVideo_Denoise_SelectionChanged(object sender, SelectionCha } /// - /// Filter Video - Deinterlace + /// Filter Video - Deinterlace /// private void cboFilterVideo_Deinterlace_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -8055,7 +8133,7 @@ private void cboFilterVideo_Deinterlace_SelectionChanged(object sender, Selectio /// - /// Audio Limiter + /// Audio Limiter /// private void slAudioLimiter_MouseDoubleClick(object sender, MouseButtonEventArgs e) { @@ -8076,7 +8154,7 @@ private void tbxAudioLimiter_PreviewKeyUp(object sender, KeyEventArgs e) } /// - /// Filter Audio - Remove Click + /// Filter Audio - Remove Click /// //private void slFilterAudio_RemoveClick_MouseDoubleClick(object sender, MouseButtonEventArgs e) //{ @@ -8098,7 +8176,7 @@ private void tbxAudioLimiter_PreviewKeyUp(object sender, KeyEventArgs e) /// - /// Filter Audio - Contrast + /// Filter Audio - Contrast /// // Double Click private void slFilterAudio_Contrast_MouseDoubleClick(object sender, MouseButtonEventArgs e) @@ -8125,7 +8203,7 @@ private void slFilterAudio_Contrast_PreviewMouseUp(object sender, MouseButtonEve } /// - /// Filter Audio - Extra Stereo + /// Filter Audio - Extra Stereo /// // Double Click private void slFilterAudio_ExtraStereo_MouseDoubleClick(object sender, MouseButtonEventArgs e) @@ -8152,7 +8230,7 @@ private void slFilterAudio_ExtraStereo_PreviewMouseUp(object sender, MouseButton } /// - /// Filter Audio - Tempo + /// Filter Audio - Tempo /// // Double Click private void slFilterAudio_Tempo_MouseDoubleClick(object sender, MouseButtonEventArgs e) @@ -8181,12 +8259,13 @@ private void slFilterAudio_Tempo_PreviewMouseUp(object sender, MouseButtonEventA /// - /// Sort (Method) + /// Sort (Method) /// public void Sort() { // Only if Script not empty - if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text)) + if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.ScriptView_Text)) { // ------------------------- // Has Not Been Edited @@ -8240,7 +8319,7 @@ public void Sort() /// - /// Start Process + /// Start Process /// //public static async void StartProcess() public static async Task StartProcess() @@ -8313,7 +8392,7 @@ public static async Task StartProcess() /// - /// Script View Copy/Paste + /// Script View Copy/Paste /// //private void OnScriptPaste(object sender, DataObjectPastingEventArgs e) //{ @@ -8325,7 +8404,7 @@ public static async Task StartProcess() /// - /// Script - Button + /// Script - Button /// private void btnScript_Click(object sender, RoutedEventArgs e) { @@ -8432,7 +8511,7 @@ public async void ScriptButtonAsync() /// - /// Save Script + /// Save Script /// private void btnScriptSave_Click(object sender, RoutedEventArgs e) { @@ -8459,11 +8538,12 @@ private void btnScriptSave_Click(object sender, RoutedEventArgs e) /// - /// Copy All Button + /// Copy All Button /// private void btnScriptCopy_Click(object sender, RoutedEventArgs e) { - if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text)) + if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.ScriptView_Text)) { //Clipboard.SetText(ScriptView.GetScriptRichTextBoxContents(this), TextDataFormat.UnicodeText); Clipboard.SetText(VM.MainView.ScriptView_Text, TextDataFormat.UnicodeText); @@ -8472,7 +8552,7 @@ private void btnScriptCopy_Click(object sender, RoutedEventArgs e) /// - /// Clear Button + /// Clear Button /// private void btnScriptClear_Click(object sender, RoutedEventArgs e) { @@ -8481,7 +8561,7 @@ private void btnScriptClear_Click(object sender, RoutedEventArgs e) /// - /// Sort Button + /// Sort Button /// private void btnScriptSort_Click(object sender, RoutedEventArgs e) { @@ -8494,7 +8574,8 @@ private void btnScriptSort_Click(object sender, RoutedEventArgs e) /// private void btnScriptRun_Click(object sender, RoutedEventArgs e) { - if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text)) + if (!string.IsNullOrEmpty(VM.MainView.ScriptView_Text) && + !string.IsNullOrWhiteSpace(VM.MainView.ScriptView_Text)) { // ------------------------- // Use Arguments from Script TextBox @@ -8518,7 +8599,7 @@ private void btnScriptRun_Click(object sender, RoutedEventArgs e) /// -------------------------------------------------------------------------------------------------------- /// - /// Preview Button + /// Preview Button /// /// -------------------------------------------------------------------------------------------------------- private void btnPreview_Click(object sender, RoutedEventArgs e) @@ -8529,7 +8610,7 @@ private void btnPreview_Click(object sender, RoutedEventArgs e) /// -------------------------------------------------------------------------------------------------------- /// - /// Convert Button + /// Convert Button /// /// -------------------------------------------------------------------------------------------------------- private void btnConvert_Click(object sender, RoutedEventArgs e) diff --git a/source/Axiom/Axiom/Presets/Profiles.cs b/source/Axiom/Axiom/Presets/Profiles.cs index c861c7f2..351593db 100644 --- a/source/Axiom/Axiom/Presets/Profiles.cs +++ b/source/Axiom/Axiom/Presets/Profiles.cs @@ -34,18 +34,24 @@ namespace Axiom public class Profiles { /// - /// Global Variables + /// Global Variables /// //public static string presetsDir = MainWindow.appDataLocalDir + @"Axiom UI\presets\"; // Custom User ini presets /// - /// Scan PC Custom Presets + /// Scan PC Custom Presets /// public static List customPresetPathsList = new List(); public static void LoadCustomPresets() { + // Check if Custom Presets Path is valid + if (MainWindow.IsValidPath(VM.ConfigureView.CustomPresetsPath_Text) == false) + { + return; + } + // ------------------------- // User Custom Preset Full Path // ------------------------- @@ -128,7 +134,7 @@ public static void LoadCustomPresets() /// - /// Import Preset + /// Import Preset /// public static void ImportPreset(string profile) { @@ -795,10 +801,16 @@ public static void ImportPreset(string profile) /// - /// Export Prest + /// Export Prest /// public static void ExportPreset(string profile) { + // Check if Custom Presets Path is valid + if (MainWindow.IsValidPath(VM.ConfigureView.CustomPresetsPath_Text) == false) + { + return; + } + // ------------------------- // Check if Preset Directory exists // ------------------------- @@ -1072,7 +1084,7 @@ public static void ExportPreset(string profile) /// - /// Failed Import Window Open + /// Failed Import Window Open /// private static Boolean IsFailedImportWindowOpened = false; public static string failedImportMessage; diff --git a/source/Axiom/Axiom/Properties/AssemblyInfo.cs b/source/Axiom/Axiom/Properties/AssemblyInfo.cs index 688afef8..ed542eab 100644 --- a/source/Axiom/Axiom/Properties/AssemblyInfo.cs +++ b/source/Axiom/Axiom/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.6.0")] -[assembly: AssemblyFileVersion("1.7.6.0")] +[assembly: AssemblyVersion("1.7.7.0")] +[assembly: AssemblyFileVersion("1.7.7.0")] diff --git a/source/Axiom/Axiom/Properties/Resources.Designer.cs b/source/Axiom/Axiom/Properties/Resources.Designer.cs index 3bf69f95..cc8283dc 100644 --- a/source/Axiom/Axiom/Properties/Resources.Designer.cs +++ b/source/Axiom/Axiom/Properties/Resources.Designer.cs @@ -13,7 +13,7 @@ namespace Axiom.Properties /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. @@ -35,7 +35,7 @@ internal Resources() } /// - /// Returns the cached ResourceManager instance used by this class. + /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager @@ -52,8 +52,8 @@ internal Resources() } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture diff --git a/source/Axiom/Axiom/UpdateWindow.xaml.cs b/source/Axiom/Axiom/UpdateWindow.xaml.cs index 4aedd2eb..d906c23c 100644 --- a/source/Axiom/Axiom/UpdateWindow.xaml.cs +++ b/source/Axiom/Axiom/UpdateWindow.xaml.cs @@ -47,10 +47,10 @@ public partial class UpdateWindow : Window public static ManualResetEvent waiter = new ManualResetEvent(false); // Download one at a time // Progress Label Info - public static string progressInfo; + public static string progressInfo { get; set; } // Unzip CMD Arguments - public static string extractArgs; + public static string extractArgs { get; set; } public UpdateWindow() @@ -148,6 +148,19 @@ public void StartDownload() Uri url = new Uri("https://github.com/MattMcManis/Axiom/releases/download/" + "v" + Convert.ToString(MainWindow.latestVersion) + "-" + MainWindow.latestBuildPhase + "/Axiom.zip"); // v1.0.0.0-alpha/Axiom.zip + // Delete old Axiom.zip file if it was left in %temp% + if (File.Exists(Path.Combine(MainWindow.tempDir,"Axiom.zip"))) + { + try + { + File.Delete(Path.Combine(MainWindow.tempDir, "Axiom.zip")); + } + catch + { + + } + } + // Async wc.DownloadProgressChanged += new DownloadProgressChangedEventHandler(wc_DownloadProgressChanged); wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadFileCompleted); diff --git a/source/Axiom/Axiom/ViewModel/AudioViewModel.cs b/source/Axiom/Axiom/ViewModel/AudioViewModel.cs index ac4811f8..7bd43ecd 100644 --- a/source/Axiom/Axiom/ViewModel/AudioViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/AudioViewModel.cs @@ -46,7 +46,7 @@ private void OnPropertyChanged(string prop) /// - /// Audio View Model + /// Audio View Model /// public AudioViewModel() { @@ -55,7 +55,7 @@ public AudioViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -71,7 +71,7 @@ public void LoadControlsDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Audio + /// Audio /// // -------------------------------------------------------------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/ConfigureViewModel.cs b/source/Axiom/Axiom/ViewModel/ConfigureViewModel.cs index 45fbca23..0ad14130 100644 --- a/source/Axiom/Axiom/ViewModel/ConfigureViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/ConfigureViewModel.cs @@ -48,7 +48,7 @@ private void OnPropertyChanged(string prop) /// - /// Configure View Model + /// Configure View Model /// public ConfigureViewModel() { @@ -57,7 +57,7 @@ public ConfigureViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -66,7 +66,7 @@ public void LoadControlsDefaults() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadConfigDefaults() { @@ -86,7 +86,7 @@ public void LoadConfigDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Configure + /// Configure /// // -------------------------------------------------------------------------------------------------------- @@ -686,7 +686,7 @@ public bool UpdateAutoCheck_IsEnabled // -------------------------------------------------------------------------------------------------------- /// - /// App Threads + /// App Threads /// // -------------------------------------------------------------------------------------------------------- public Task youtubedlInputWorker = null; @@ -696,7 +696,7 @@ public bool UpdateAutoCheck_IsEnabled // -------------------------------------------------------------------------------------------------------- /// - /// Tools + /// Tools /// // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/FilterAudioViewModel.cs b/source/Axiom/Axiom/ViewModel/FilterAudioViewModel.cs index a84161d7..04ff36a4 100644 --- a/source/Axiom/Axiom/ViewModel/FilterAudioViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/FilterAudioViewModel.cs @@ -46,7 +46,7 @@ private void OnPropertyChanged(string prop) /// - /// Filter View Model + /// Filter View Model /// public FilterAudioViewModel() { @@ -55,7 +55,7 @@ public FilterAudioViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -64,7 +64,7 @@ public void LoadControlsDefaults() /// - /// Load Filter Video Defaults + /// Load Filter Video Defaults /// public void LoadFilterAudioDefaults() { @@ -76,7 +76,7 @@ public void LoadFilterAudioDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Filter Audio + /// Filter Audio /// // -------------------------------------------------------------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/FilterVideoViewModel.cs b/source/Axiom/Axiom/ViewModel/FilterVideoViewModel.cs index 42c3472d..53e39fd1 100644 --- a/source/Axiom/Axiom/ViewModel/FilterVideoViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/FilterVideoViewModel.cs @@ -47,7 +47,7 @@ private void OnPropertyChanged(string prop) /// - /// Filter View Model + /// Filter View Model /// public FilterVideoViewModel() { @@ -56,7 +56,7 @@ public FilterVideoViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -65,7 +65,7 @@ public void LoadControlsDefaults() /// - /// Load Filter Video Defaults + /// Load Filter Video Defaults /// public void LoadFilterVideoDefaults() { @@ -128,7 +128,7 @@ public void LoadFilterVideoDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Filter Video + /// Filter Video /// // -------------------------------------------------------------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/FormatViewModel.cs b/source/Axiom/Axiom/ViewModel/FormatViewModel.cs index 1c2ee8fa..bae7978b 100644 --- a/source/Axiom/Axiom/ViewModel/FormatViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/FormatViewModel.cs @@ -46,7 +46,7 @@ private void OnPropertyChanged(string prop) /// - /// Format View Model + /// Format View Model /// public FormatViewModel() { @@ -54,7 +54,7 @@ public FormatViewModel() } /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -68,7 +68,7 @@ public void LoadControlsDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Format + /// Format /// // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------- @@ -445,7 +445,7 @@ public string Format_CutStart_Seconds_Text // Cut Start - Milliseconds // -------------------------------------------------- // Text - private string _Format_CutStart_Milliseconds_Text = "000"; + private string _Format_CutStart_Milliseconds_Text; public string Format_CutStart_Milliseconds_Text { get { return _Format_CutStart_Milliseconds_Text; } diff --git a/source/Axiom/Axiom/ViewModel/MainViewModel.cs b/source/Axiom/Axiom/ViewModel/MainViewModel.cs index f71ce638..9c0384c9 100644 --- a/source/Axiom/Axiom/ViewModel/MainViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/MainViewModel.cs @@ -52,7 +52,7 @@ private void OnPropertyChanged(string prop) /// - /// Main View Model + /// Main View Model /// public MainViewModel() { @@ -61,7 +61,7 @@ public MainViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -80,7 +80,7 @@ public void LoadControlsDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Main + /// Main /// // -------------------------------------------------------------------------------------------------------- @@ -372,7 +372,7 @@ public string TitleVersion // -------------------------------------------------------------------------------------------------------- /// - /// Tools + /// Tools /// // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------- @@ -413,7 +413,7 @@ public bool AutoSortScript_IsChecked // -------------------------------------------------------------------------------------------------------- /// - /// Input + /// Input /// // -------------------------------------------------------------------------------------------------------- // -------------------------------------------------- @@ -515,7 +515,7 @@ public bool BatchExtension_IsEnabled // -------------------------------------------------------------------------------------------------------- /// - /// Output + /// Output /// // -------------------------------------------------------------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/SubtitleViewModel.cs b/source/Axiom/Axiom/ViewModel/SubtitleViewModel.cs index 500ee756..b9e048eb 100644 --- a/source/Axiom/Axiom/ViewModel/SubtitleViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/SubtitleViewModel.cs @@ -47,7 +47,7 @@ private void OnPropertyChanged(string prop) /// - /// Subtitle View Model + /// Subtitle View Model /// public SubtitleViewModel() { @@ -56,7 +56,7 @@ public SubtitleViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -67,7 +67,7 @@ public void LoadControlsDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Subtitle + /// Subtitle /// // -------------------------------------------------------------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/VideoViewModel.cs b/source/Axiom/Axiom/ViewModel/VideoViewModel.cs index 8277ed7d..a5591d3e 100644 --- a/source/Axiom/Axiom/ViewModel/VideoViewModel.cs +++ b/source/Axiom/Axiom/ViewModel/VideoViewModel.cs @@ -46,7 +46,7 @@ private void OnPropertyChanged(string prop) /// - /// Video View Model + /// Video View Model /// public VideoViewModel() { @@ -55,7 +55,7 @@ public VideoViewModel() /// - /// Load Controls Defaults + /// Load Controls Defaults /// public void LoadControlsDefaults() { @@ -82,7 +82,7 @@ public void LoadControlsDefaults() // -------------------------------------------------------------------------------------------------------- /// - /// Video + /// Video /// // -------------------------------------------------------------------------------------------------------- diff --git a/source/Axiom/Axiom/ViewModel/ViewModelBase.cs b/source/Axiom/Axiom/ViewModel/ViewModelBase.cs index ddc0a229..aa016b31 100644 --- a/source/Axiom/Axiom/ViewModel/ViewModelBase.cs +++ b/source/Axiom/Axiom/ViewModel/ViewModelBase.cs @@ -42,7 +42,7 @@ private void OnPropertyChanged(string prop) } /// - /// ViewModel Base + /// ViewModel Base /// public VM() {