Added: filename in title
This commit is contained in:
parent
d127549a5f
commit
b6fc9beb86
9
AppResource.Designer.cs
generated
9
AppResource.Designer.cs
generated
@ -60,6 +60,15 @@ namespace VideoPreview {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Video Preview.
|
||||||
|
/// </summary>
|
||||||
|
internal static string AppName {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AppName", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -117,6 +117,9 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="AppName" xml:space="preserve">
|
||||||
|
<value>Video Preview</value>
|
||||||
|
</data>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="loading_block" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="loading_block" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>Resources\loading-block.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>Resources\loading-block.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
@ -99,6 +99,9 @@ namespace VideoPreview
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private async void button3_MouseClick(object sender, MouseEventArgs e)
|
private async void button3_MouseClick(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (this.IsBusy) return;
|
||||||
|
if (string.IsNullOrWhiteSpace(textBox1.Text)) return;
|
||||||
|
|
||||||
await ReadVideoFile(textBox1.Text);
|
await ReadVideoFile(textBox1.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,6 +169,7 @@ namespace VideoPreview
|
|||||||
videoFilename = null;
|
videoFilename = null;
|
||||||
videoDuration = TimeSpan.FromSeconds(0);
|
videoDuration = TimeSpan.FromSeconds(0);
|
||||||
|
|
||||||
|
ThreadControl.SetText(this, AppResource.AppName);
|
||||||
textBox1.Text = string.Empty;
|
textBox1.Text = string.Empty;
|
||||||
ThreadControl.SetText(label5, "-");
|
ThreadControl.SetText(label5, "-");
|
||||||
ThreadControl.SetText(label7, "-");
|
ThreadControl.SetText(label7, "-");
|
||||||
@ -279,6 +283,8 @@ namespace VideoPreview
|
|||||||
videoFilename = filename;
|
videoFilename = filename;
|
||||||
videoDuration = inputFile.Metadata.Duration;
|
videoDuration = inputFile.Metadata.Duration;
|
||||||
|
|
||||||
|
ThreadControl.SetText(this, Path.GetFileName(filename) + " - " + AppResource.AppName);
|
||||||
|
|
||||||
textBox1.Text = videoFilename;
|
textBox1.Text = videoFilename;
|
||||||
ThreadControl.SetText(label5, inputFile.Metadata.VideoData.Format ?? string.Empty);
|
ThreadControl.SetText(label5, inputFile.Metadata.VideoData.Format ?? string.Empty);
|
||||||
ThreadControl.SetText(label7, (inputFile.Metadata.VideoData.FrameSize ?? string.Empty) + " @ " + inputFile.Metadata.VideoData.Fps.ToString() + "FPS");
|
ThreadControl.SetText(label7, (inputFile.Metadata.VideoData.FrameSize ?? string.Empty) + " @ " + inputFile.Metadata.VideoData.Fps.ToString() + "FPS");
|
||||||
|
Loading…
Reference in New Issue
Block a user