Allow overriding file extension in video converter tool

This commit is contained in:
Jaex 2023-05-06 11:24:11 +03:00
parent f9cab94ac3
commit 99791f7af4
2 changed files with 13 additions and 5 deletions

View file

@ -39,14 +39,20 @@ public string OutputFilePath
{
get
{
if (string.IsNullOrEmpty(OutputFolderPath) || string.IsNullOrEmpty(OutputFileName))
string path = "";
if (!string.IsNullOrEmpty(OutputFolderPath) && !string.IsNullOrEmpty(OutputFileName))
{
return "";
path = Path.Combine(OutputFolderPath, OutputFileName);
if (!Path.HasExtension(OutputFileName))
{
string extension = GetFileExtension();
path = Path.ChangeExtension(path, extension);
}
}
string path = Path.Combine(OutputFolderPath, OutputFileName);
string extension = GetFileExtension();
return Path.ChangeExtension(path, extension);
return path;
}
}

View file

@ -143,6 +143,8 @@ private PinToScreenForm(PinToScreenOptions options)
ImageOpacity = Options.InitialOpacity;
InitializeComponent();
// TODO: Add options form
tsbOptions.Visible = false;
ShareXResources.ApplyTheme(this);
TopMost = Options.TopMost;
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);