Compare commits

..

No commits in common. "master" and "release/0.1.2.007" have entirely different histories.

21 changed files with 270 additions and 239 deletions

125
MainForm.Designer.cs generated
View File

@ -53,14 +53,12 @@ namespace VideoPreview
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadNextFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewHelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
@ -73,6 +71,8 @@ namespace VideoPreview
this.label1.TabIndex = 3;
this.label1.Text = "File Name";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label1.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.label1.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver);
//
// label2
//
@ -83,21 +83,24 @@ namespace VideoPreview
this.label2.TabIndex = 5;
this.label2.Text = "-";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.label2.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver);
//
// button1
//
this.button1.ActiveImage = null;
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.BackColor = System.Drawing.Color.Transparent;
this.button1.HoverImage = null;
this.button1.IdleImage = null;
this.button1.DefaultImage = null;
this.button1.DownImage = null;
this.button1.IsSelected = false;
this.button1.LabelText = "&Close";
this.button1.Location = new System.Drawing.Point(296, 705);
this.button1.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
this.button1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 10);
this.button1.Name = "button1";
this.button1.OverImage = null;
this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button1.Size = new System.Drawing.Size(149, 37);
this.button1.TabIndex = 5;
this.button1.TabIndex = 8;
this.button1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button1_MouseClick);
//
// tHorizontalSeparator1
@ -115,7 +118,8 @@ namespace VideoPreview
this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.tHorizontalSeparator1.Size = new System.Drawing.Size(454, 22);
this.tHorizontalSeparator1.TabIndex = 9;
this.tHorizontalSeparator1.TabStop = false;
this.tHorizontalSeparator1.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.tHorizontalSeparator1.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver);
//
// tHorizontalSeparator3
//
@ -132,7 +136,6 @@ namespace VideoPreview
this.tHorizontalSeparator3.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.tHorizontalSeparator3.Size = new System.Drawing.Size(454, 22);
this.tHorizontalSeparator3.TabIndex = 13;
this.tHorizontalSeparator3.TabStop = false;
//
// flowLayoutPanel1
//
@ -144,8 +147,10 @@ namespace VideoPreview
this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 130);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(433, 540);
this.flowLayoutPanel1.TabIndex = 1;
this.flowLayoutPanel1.TabIndex = 14;
this.flowLayoutPanel1.WrapContents = false;
this.flowLayoutPanel1.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.flowLayoutPanel1.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver);
//
// pictureBox1
//
@ -161,69 +166,64 @@ namespace VideoPreview
//
// textBox1
//
this.textBox1.AcceptButton = null;
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.FileDialog = null;
this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.textBox1.HighlightImage = null;
this.textBox1.Location = new System.Drawing.Point(111, 9);
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
this.textBox1.Name = "textBox1";
this.textBox1.NormalImage = null;
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 9, 9, 9);
this.textBox1.Size = new System.Drawing.Size(334, 34);
this.textBox1.TabIndex = 0;
this.textBox1.SubmitButton = null;
this.textBox1.TabIndex = 16;
this.textBox1.UseSystemPasswordChar = false;
//
// button2
//
this.button2.ActiveImage = null;
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button2.BackColor = System.Drawing.Color.Transparent;
this.button2.HoverImage = null;
this.button2.IdleImage = null;
this.button2.IsSelected = false;
this.button2.LabelText = "";
this.button2.Location = new System.Drawing.Point(12, 705);
this.button2.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
this.button2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 10);
this.button2.Name = "button2";
this.button2.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button2.Size = new System.Drawing.Size(37, 37);
this.button2.TabIndex = 2;
this.button2.TabIndex = 17;
this.toolTip1.SetToolTip(this.button2, "Options");
this.button2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button2_MouseClick);
//
// button3
//
this.button3.ActiveImage = null;
this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button3.BackColor = System.Drawing.Color.Transparent;
this.button3.HoverImage = null;
this.button3.IdleImage = null;
this.button3.IsSelected = false;
this.button3.LabelText = "";
this.button3.Location = new System.Drawing.Point(53, 705);
this.button3.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
this.button3.Margin = new System.Windows.Forms.Padding(10, 0, 10, 10);
this.button3.Name = "button3";
this.button3.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button3.Size = new System.Drawing.Size(35, 37);
this.button3.TabIndex = 3;
this.button3.TabIndex = 23;
this.toolTip1.SetToolTip(this.button3, "Refresh");
this.button3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button3_MouseClick);
//
// button4
//
this.button4.ActiveImage = null;
this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button4.BackColor = System.Drawing.Color.Transparent;
this.button4.HoverImage = null;
this.button4.IdleImage = null;
this.button4.IsSelected = false;
this.button4.LabelText = "";
this.button4.Location = new System.Drawing.Point(94, 705);
this.button4.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
this.button4.Margin = new System.Windows.Forms.Padding(10, 0, 10, 10);
this.button4.Name = "button4";
this.button4.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button4.Size = new System.Drawing.Size(37, 37);
this.button4.TabIndex = 4;
this.button4.TabIndex = 24;
this.toolTip1.SetToolTip(this.button4, "Next");
this.button4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button4_MouseClick);
//
// label4
//
@ -299,9 +299,7 @@ namespace VideoPreview
//
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.refreshToolStripMenuItem,
this.loadNextFileToolStripMenuItem,
this.toolStripSeparator1,
this.toolStripMenuItem3});
this.loadNextFileToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
this.editToolStripMenuItem.Text = "&Edit";
@ -310,7 +308,7 @@ namespace VideoPreview
//
this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem";
this.refreshToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.refreshToolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.refreshToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.refreshToolStripMenuItem.Text = "&Refresh";
this.refreshToolStripMenuItem.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click);
//
@ -318,39 +316,10 @@ namespace VideoPreview
//
this.loadNextFileToolStripMenuItem.Name = "loadNextFileToolStripMenuItem";
this.loadNextFileToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.loadNextFileToolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.loadNextFileToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.loadNextFileToolStripMenuItem.Text = "&Load Next File";
this.loadNextFileToolStripMenuItem.Click += new System.EventHandler(this.loadNextFileToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(206, 6);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F11)));
this.toolStripMenuItem3.Size = new System.Drawing.Size(209, 22);
this.toolStripMenuItem3.Text = "&Always On Top";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.optionsToolStripMenuItem});
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(46, 20);
this.toolStripMenuItem2.Text = "&Tools";
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12)));
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.optionsToolStripMenuItem.Text = "&Options";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -365,22 +334,38 @@ namespace VideoPreview
//
this.viewHelpToolStripMenuItem.Name = "viewHelpToolStripMenuItem";
this.viewHelpToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.viewHelpToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.viewHelpToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.viewHelpToolStripMenuItem.Text = "&View Help";
this.viewHelpToolStripMenuItem.Click += new System.EventHandler(this.viewHelpToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(143, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(177, 6);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.optionsToolStripMenuItem});
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(46, 20);
this.toolStripMenuItem2.Text = "&Tools";
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12)));
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.optionsToolStripMenuItem.Text = "&Options";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
//
// MainForm
//
this.AllowDrop = true;
@ -409,6 +394,8 @@ namespace VideoPreview
this.MainMenuStrip = this.menuStrip1;
this.Name = "MainForm";
this.Text = "Video Preview";
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
@ -446,8 +433,6 @@ namespace VideoPreview
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
}
}

View File

@ -27,19 +27,20 @@ namespace VideoPreview
{
InitializeComponent();
button3.Click += delegate { refreshToolStripMenuItem_Click(null, null); };
button4.Click += delegate { loadNextFileToolStripMenuItem_Click(null, null); };
button2.Click += delegate { optionsToolStripMenuItem_Click(null, null); };
button2.SetIcon("settings");
button3.SetIcon("refresh-cw");
button4.SetIcon("arrow-right-circle");
textBox1.NormalImage = UIcon.GetIcon("file", 16, UIcon.IconState.Idle);
textBox1.HighlightImage = UIcon.GetIcon("file", 16, UIcon.IconState.Hover);
button2.DefaultImage = button2.DownImage = UIcon.GetIcon("settings", 16, UIcon.IconState.Idle);
button2.OverImage = UIcon.GetIcon("settings", 16, UIcon.IconState.Hover);
button3.DefaultImage = button3.DownImage = UIcon.GetIcon("refresh-cw", 16, UIcon.IconState.Idle);
button3.OverImage = UIcon.GetIcon("refresh-cw", 16, UIcon.IconState.Hover);
button4.DefaultImage = button4.DownImage = UIcon.GetIcon("arrow-right-circle", 16, UIcon.IconState.Idle);
button4.OverImage = UIcon.GetIcon("arrow-right-circle", 16, UIcon.IconState.Hover);
randy = new Random();
textBox1.TextBox.ReadOnly = true;
textBox1.TextBox.BackColor = Color.White;
textBox1.TextBox.TextChanged += textBox1_TextChanged;
textBox1.InnerTextBox.ReadOnly = true;
textBox1.InnerTextBox.BackColor = Color.White;
textBox1.InnerTextBox.TextChanged += textBox1_TextChanged;
}
protected override void OnLoad(EventArgs e)
@ -49,6 +50,7 @@ namespace VideoPreview
textBox1_TextChanged(null, null);
}
protected override void OnFormClosing(FormClosingEventArgs e)
{
if (this.IsBusy)
@ -60,17 +62,31 @@ namespace VideoPreview
base.OnFormClosing(e);
}
protected override void OnDragOver(DragEventArgs e)
{
base.OnDragOver(e);
public bool IsBusy
{
get => isBusy;
set
{
isBusy = value;
ThreadControl.SetValue(pictureBox1, (isBusy ? UIcon.GetImage("loading_block") : null));
ThreadControl.SetEnable(textBox1, !isBusy);
ThreadControl.SetEnable(button1, !isBusy);
ThreadControl.SetEnable(button2, !isBusy);
ThreadControl.SetEnable(button3, !isBusy);
ThreadControl.SetEnable(button4, !isBusy);
}
}
private void Form1_DragOver(object sender, DragEventArgs e)
{
e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None);
}
protected override async void OnDragDrop(DragEventArgs e)
private async void Form1_DragDrop(object sender, DragEventArgs e)
{
base.OnDragDrop(e);
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
if (fileList == null)
{
@ -100,101 +116,31 @@ namespace VideoPreview
}
public bool IsBusy
{
get => isBusy;
set
{
isBusy = value;
ThreadControl.SetValue(pictureBox1, (isBusy ? UIcon.GetImage("loading_block") : null));
ThreadControl.SetEnable(textBox1, !isBusy);
ThreadControl.SetEnable(button1, !isBusy);
ThreadControl.SetEnable(button2, !isBusy);
ThreadControl.SetEnable(button3, !isBusy);
ThreadControl.SetEnable(button4, !isBusy);
}
}
public AppSession CurrentSession { get; set; } = new AppSession();
#region main menu
/// <summary>
/// Refresh
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void refreshToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.IsBusy)
{
return;
}
if (string.IsNullOrWhiteSpace(textBox1.Text))
{
return;
}
await ReadVideoFile(textBox1.Text);
}
private void refreshToolStripMenuItem_Click(object sender, EventArgs e) => button3_MouseClick(null, null);
/// <summary>
/// Load next file
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void loadNextFileToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.IsBusy)
{
return;
}
if (string.IsNullOrWhiteSpace(textBox1.Text))
{
return;
}
await Task.Run(() =>
{
string path = AccessibleDirectory.GetNextFile(textBox1.Text, "*.avi;*.mkv;*.mp4;*.ogm;*.mov;*.mpg;*.mpeg");
if (string.IsNullOrWhiteSpace(path)) return;
textBox1.Text = path;
});
}
private void loadNextFileToolStripMenuItem_Click(object sender, EventArgs e) => button4_MouseClick(null, null);
/// <summary>
/// Options
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.IsBusy)
{
return;
}
if (optionsForm == null) optionsForm = new OptionsForm(this.CurrentSession);
if (optionsForm.ShowDialog() == DialogResult.OK)
{
this.CurrentSession = optionsForm.Session;
this.TopMost = this.CurrentSession.AlwaysOnTop;
}
}
/// <summary>
/// Always-On-Top
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
this.TopMost = this.CurrentSession.AlwaysOnTop = !this.TopMost;
}
private void optionsToolStripMenuItem_Click(object sender, EventArgs e) => button2_MouseClick(null, null);
/// <summary>
/// View help
@ -227,6 +173,61 @@ namespace VideoPreview
MessageBox.Show(Application.ProductName + " v" + Application.ProductVersion, "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
#endregion
/// <summary>
/// Refresh
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void button3_MouseClick(object sender, MouseEventArgs e)
{
if (this.IsBusy) return;
if (string.IsNullOrWhiteSpace(textBox1.Text)) return;
await ReadVideoFile(textBox1.Text);
}
/// <summary>
/// Options
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_MouseClick(object sender, MouseEventArgs e)
{
if (this.IsBusy)
{
return;
}
if (optionsForm == null) optionsForm = new OptionsForm(this.CurrentSession);
if (optionsForm.ShowDialog() == DialogResult.OK)
{
this.CurrentSession = optionsForm.Session;
this.TopMost = this.CurrentSession.AlwaysOnTop;
}
}
/// <summary>
/// Next file
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void button4_MouseClick(object sender, MouseEventArgs e)
{
await Task.Run(() =>
{
if (this.IsBusy) return;
if (string.IsNullOrWhiteSpace(textBox1.Text)) return;
string path = AccessibleDirectory.GetNextFile(textBox1.Text, "*.avi;*.mkv;*.mp4;*.ogm;*.mov;*.mpg;*.mpeg");
if (string.IsNullOrWhiteSpace(path)) return;
textBox1.Text = path;
});
}
/// <summary>
/// Close
/// </summary>
@ -278,7 +279,7 @@ namespace VideoPreview
Padding = new Padding(0),
SizeMode = PictureBoxSizeMode.Zoom,
Width = width,
Height = height
Height = height,
};
imageBox.Load(filename);
@ -334,13 +335,10 @@ namespace VideoPreview
protected async Task ReadVideoFile(string filename)
{
if (this.IsBusy)
{
return;
}
await Task.Run(() =>
{
if (this.IsBusy) return;
this.IsBusy = true;
Clear();

View File

@ -1,4 +1,64 @@
<root>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
@ -57,12 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<assembly alias="System.Drawing.Primitives" name="System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing.Primitives">
<value>17, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
</data>
<data name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing.Primitives">
<value>114, 17</value>
</metadata>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -35,23 +35,23 @@ namespace VideoPreview
//
// button1
//
this.button1.ActiveImage = null;
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.BackColor = System.Drawing.Color.Transparent;
this.button1.HoverImage = null;
this.button1.IdleImage = null;
this.button1.DefaultImage = null;
this.button1.DownImage = null;
this.button1.IsSelected = false;
this.button1.LabelText = "&Save";
this.button1.Location = new System.Drawing.Point(241, 469);
this.button1.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
this.button1.Margin = new System.Windows.Forms.Padding(10);
this.button1.Name = "button1";
this.button1.OverImage = null;
this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button1.Size = new System.Drawing.Size(128, 32);
this.button1.TabIndex = 2;
this.button1.TabIndex = 173;
this.button1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button1_MouseClick);
//
// pickerBox1
//
this.pickerBox1.AcceptButton = null;
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
this.pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -59,8 +59,9 @@ namespace VideoPreview
this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
this.pickerBox1.Name = "pickerBox1";
this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
this.pickerBox1.Size = new System.Drawing.Size(84, 35);
this.pickerBox1.TabIndex = 0;
this.pickerBox1.Size = new System.Drawing.Size(84, 34);
this.pickerBox1.SubmitButton = null;
this.pickerBox1.TabIndex = 183;
this.pickerBox1.Value = true;
//
// label6
@ -99,14 +100,13 @@ namespace VideoPreview
this.tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
this.tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
this.tHorizontalSeparator1.Location = new System.Drawing.Point(10, 437);
this.tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 10);
this.tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
this.tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
this.tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
this.tHorizontalSeparator1.Name = "tHorizontalSeparator1";
this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22);
this.tHorizontalSeparator1.TabIndex = 188;
this.tHorizontalSeparator1.TabStop = false;
//
// tHorizontalSeparator2
//
@ -116,18 +116,16 @@ namespace VideoPreview
this.tHorizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
this.tHorizontalSeparator2.BackColor = System.Drawing.Color.Transparent;
this.tHorizontalSeparator2.Location = new System.Drawing.Point(10, 59);
this.tHorizontalSeparator2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 10);
this.tHorizontalSeparator2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
this.tHorizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
this.tHorizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22);
this.tHorizontalSeparator2.Name = "tHorizontalSeparator2";
this.tHorizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.tHorizontalSeparator2.Size = new System.Drawing.Size(364, 22);
this.tHorizontalSeparator2.TabIndex = 190;
this.tHorizontalSeparator2.TabStop = false;
//
// pickerBox2
//
this.pickerBox2.AcceptButton = null;
this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox2.BackColor = System.Drawing.Color.Transparent;
this.pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -135,8 +133,9 @@ namespace VideoPreview
this.pickerBox2.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
this.pickerBox2.Name = "pickerBox2";
this.pickerBox2.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
this.pickerBox2.Size = new System.Drawing.Size(84, 35);
this.pickerBox2.TabIndex = 1;
this.pickerBox2.Size = new System.Drawing.Size(84, 34);
this.pickerBox2.SubmitButton = null;
this.pickerBox2.TabIndex = 193;
this.pickerBox2.Value = 0;
//
// OptionsForm

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 694 B

12
UIResource.Designer.cs generated
View File

@ -73,9 +73,9 @@ namespace VideoPreview {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap arrow_right_circle_3 {
public static System.Drawing.Bitmap arrow_right_circle_2 {
get {
object obj = ResourceManager.GetObject("arrow_right_circle_3", resourceCulture);
object obj = ResourceManager.GetObject("arrow_right_circle_2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@ -123,9 +123,9 @@ namespace VideoPreview {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap refresh_cw_3 {
public static System.Drawing.Bitmap refresh_cw_2 {
get {
object obj = ResourceManager.GetObject("refresh_cw_3", resourceCulture);
object obj = ResourceManager.GetObject("refresh_cw_2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@ -143,9 +143,9 @@ namespace VideoPreview {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap settings_3 {
public static System.Drawing.Bitmap settings_2 {
get {
object obj = ResourceManager.GetObject("settings_3", resourceCulture);
object obj = ResourceManager.GetObject("settings_2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}

View File

@ -121,8 +121,8 @@
<data name="arrow_right_circle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\arrow-right-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow_right_circle_3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\arrow-right-circle-3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="arrow_right_circle_2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\arrow-right-circle-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="file" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -136,13 +136,13 @@
<data name="refresh_cw" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\refresh-cw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="refresh_cw_3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\refresh-cw-3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="refresh_cw_2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\refresh-cw-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="settings_3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\settings-3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="settings_2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\settings-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows8.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>videopreview</AssemblyName>
<Authors>Ray Lam</Authors>
@ -11,7 +11,7 @@
<Copyright>Ray Lam</Copyright>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<NoWin32Manifest>true</NoWin32Manifest>
<Version>0.1.3.010</Version>
<Version>0.1.2.007</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@ -40,18 +40,6 @@
<None Remove="build.bat" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\settings-3.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\refresh-cw-3.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\arrow-right-circle-3.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\settings-2.png" />
</ItemGroup>
@ -92,12 +80,6 @@
<PackageReference Include="MediaToolkit" Version="1.1.0.1" />
</ItemGroup>
<ItemGroup>
<Reference Include="RyzStudio3">
<HintPath>References\RyzStudio3.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Update="AppResource.Designer.cs">
<DesignTime>True</DesignTime>
@ -122,4 +104,10 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="RyzStudio3">
<HintPath>References\RyzStudio3.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@ -1,5 +1,5 @@
rmdir /s /q "bin\Release\64\"
dotnet publish skye.sln -r win-x64 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\Release\64\"
##rmdir /s /q "bin\Release\86\"
##dotnet publish skye.sln -r win-x86 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\Release\86\"
rmdir /s /q "bin\Release\86\"
dotnet publish skye.sln -r win-x86 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\Release\86\"