mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Allow overriding file extension in video converter tool
This commit is contained in:
parent
f9cab94ac3
commit
99791f7af4
2 changed files with 13 additions and 5 deletions
|
@ -39,14 +39,20 @@ public string OutputFilePath
|
||||||
{
|
{
|
||||||
get
|
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);
|
return path;
|
||||||
string extension = GetFileExtension();
|
|
||||||
return Path.ChangeExtension(path, extension);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,8 @@ private PinToScreenForm(PinToScreenOptions options)
|
||||||
ImageOpacity = Options.InitialOpacity;
|
ImageOpacity = Options.InitialOpacity;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
// TODO: Add options form
|
||||||
|
tsbOptions.Visible = false;
|
||||||
ShareXResources.ApplyTheme(this);
|
ShareXResources.ApplyTheme(this);
|
||||||
TopMost = Options.TopMost;
|
TopMost = Options.TopMost;
|
||||||
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);
|
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);
|
||||||
|
|
Loading…
Reference in a new issue