Initial commit

This commit is contained in:
2021-01-21 14:27:11 -06:00
parent 51ab989cb8
commit fe0d9ab0e4
25 changed files with 1971 additions and 1964 deletions
+7 -7
View File
@@ -1,8 +1,8 @@
!*.exe
packages/
MKVTest/bin
MKVTest/obj
*.mkv
*.txt
MKVTest/.vs
!*.exe
packages/
MKVTest/bin
MKVTest/obj
*.mkv
*.txt
MKVTest/.vs
.vs
+25 -25
View File
@@ -1,25 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MKVTest", "MKVTest\MKVTest.csproj", "{A750A634-6881-4083-B909-73EFE4C96802}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A750A634-6881-4083-B909-73EFE4C96802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A750A634-6881-4083-B909-73EFE4C96802}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A750A634-6881-4083-B909-73EFE4C96802}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A750A634-6881-4083-B909-73EFE4C96802}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1DE3F207-A6CC-4FE8-B26A-DFC0A7448E8D}
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MKVTest", "MKVTest\MKVTest.csproj", "{A750A634-6881-4083-B909-73EFE4C96802}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A750A634-6881-4083-B909-73EFE4C96802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A750A634-6881-4083-B909-73EFE4C96802}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A750A634-6881-4083-B909-73EFE4C96802}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A750A634-6881-4083-B909-73EFE4C96802}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1DE3F207-A6CC-4FE8-B26A-DFC0A7448E8D}
EndGlobalSection
EndGlobal
+5 -5
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
+234 -234
View File
@@ -1,234 +1,234 @@
namespace MKVTest
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.selectFolderButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
this.fileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.openFolderFileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.inputFilesListView = new System.Windows.Forms.ListView();
this.detailsGroupBox = new System.Windows.Forms.GroupBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.currentTitleLabel = new System.Windows.Forms.Label();
this.buttonPanel = new System.Windows.Forms.Panel();
this.applyChangesButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.mainMenuStrip.SuspendLayout();
this.detailsGroupBox.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.buttonPanel.SuspendLayout();
this.SuspendLayout();
//
// selectFolderButton
//
this.selectFolderButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.selectFolderButton.Location = new System.Drawing.Point(2, 9);
this.selectFolderButton.Margin = new System.Windows.Forms.Padding(2);
this.selectFolderButton.Name = "selectFolderButton";
this.selectFolderButton.Size = new System.Drawing.Size(80, 29);
this.selectFolderButton.TabIndex = 1;
this.selectFolderButton.Text = "Select Folder";
this.selectFolderButton.UseVisualStyleBackColor = true;
this.selectFolderButton.Click += new System.EventHandler(this.button1_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
this.tableLayoutPanel1.Controls.Add(this.mainMenuStrip, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.inputFilesListView, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.detailsGroupBox, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.buttonPanel, 2, 4);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.08529F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 37.45736F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 37.45736F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(560, 401);
this.tableLayoutPanel1.TabIndex = 2;
//
// mainMenuStrip
//
this.tableLayoutPanel1.SetColumnSpan(this.mainMenuStrip, 3);
this.mainMenuStrip.ImageScalingSize = new System.Drawing.Size(28, 28);
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileMainMenu,
this.debugToolStripMenuItem});
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
this.mainMenuStrip.Name = "mainMenuStrip";
this.mainMenuStrip.Size = new System.Drawing.Size(560, 24);
this.mainMenuStrip.TabIndex = 2;
this.mainMenuStrip.Text = "menuStrip1";
//
// fileMainMenu
//
this.fileMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openFolderFileMainMenu,
this.exitToolStripMenuItem});
this.fileMainMenu.Name = "fileMainMenu";
this.fileMainMenu.Size = new System.Drawing.Size(37, 20);
this.fileMainMenu.Text = "&File";
//
// openFolderFileMainMenu
//
this.openFolderFileMainMenu.Name = "openFolderFileMainMenu";
this.openFolderFileMainMenu.Size = new System.Drawing.Size(139, 22);
this.openFolderFileMainMenu.Text = "&Open Folder";
this.openFolderFileMainMenu.Click += new System.EventHandler(this.openFolderFileMainMenu_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// debugToolStripMenuItem
//
this.debugToolStripMenuItem.Name = "debugToolStripMenuItem";
this.debugToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
this.debugToolStripMenuItem.Text = "Debug";
this.debugToolStripMenuItem.Click += new System.EventHandler(this.debugToolStripMenuItem_Click);
//
// inputFilesListView
//
this.tableLayoutPanel1.SetColumnSpan(this.inputFilesListView, 2);
this.inputFilesListView.Dock = System.Windows.Forms.DockStyle.Fill;
this.inputFilesListView.LabelWrap = false;
this.inputFilesListView.Location = new System.Drawing.Point(3, 33);
this.inputFilesListView.Name = "inputFilesListView";
this.tableLayoutPanel1.SetRowSpan(this.inputFilesListView, 4);
this.inputFilesListView.Size = new System.Drawing.Size(330, 365);
this.inputFilesListView.TabIndex = 3;
this.inputFilesListView.UseCompatibleStateImageBehavior = false;
this.inputFilesListView.View = System.Windows.Forms.View.Details;
//
// detailsGroupBox
//
this.detailsGroupBox.Controls.Add(this.flowLayoutPanel1);
this.detailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.detailsGroupBox.Location = new System.Drawing.Point(339, 33);
this.detailsGroupBox.Name = "detailsGroupBox";
this.tableLayoutPanel1.SetRowSpan(this.detailsGroupBox, 3);
this.detailsGroupBox.Size = new System.Drawing.Size(218, 320);
this.detailsGroupBox.TabIndex = 5;
this.detailsGroupBox.TabStop = false;
this.detailsGroupBox.Text = "Details";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.currentTitleLabel);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 16);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(212, 301);
this.flowLayoutPanel1.TabIndex = 0;
//
// currentTitleLabel
//
this.currentTitleLabel.AutoSize = true;
this.currentTitleLabel.Location = new System.Drawing.Point(2, 0);
this.currentTitleLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.currentTitleLabel.Name = "currentTitleLabel";
this.currentTitleLabel.Size = new System.Drawing.Size(67, 13);
this.currentTitleLabel.TabIndex = 11;
this.currentTitleLabel.Text = "Current Title:";
//
// buttonPanel
//
this.buttonPanel.Controls.Add(this.applyChangesButton);
this.buttonPanel.Controls.Add(this.selectFolderButton);
this.buttonPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonPanel.Location = new System.Drawing.Point(339, 359);
this.buttonPanel.Name = "buttonPanel";
this.buttonPanel.Size = new System.Drawing.Size(218, 39);
this.buttonPanel.TabIndex = 8;
//
// applyChangesButton
//
this.applyChangesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.applyChangesButton.Enabled = false;
this.applyChangesButton.Location = new System.Drawing.Point(112, 7);
this.applyChangesButton.Name = "applyChangesButton";
this.applyChangesButton.Size = new System.Drawing.Size(102, 29);
this.applyChangesButton.TabIndex = 2;
this.applyChangesButton.Text = "Apply Changes";
this.applyChangesButton.UseVisualStyleBackColor = true;
this.applyChangesButton.Click += new System.EventHandler(this.applyChangesButton_Click);
//
// Form1
//
this.AcceptButton = this.selectFolderButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(560, 401);
this.Controls.Add(this.tableLayoutPanel1);
this.MainMenuStrip = this.mainMenuStrip;
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "Form1";
this.Text = "Form1";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.mainMenuStrip.ResumeLayout(false);
this.mainMenuStrip.PerformLayout();
this.detailsGroupBox.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.buttonPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button selectFolderButton;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.MenuStrip mainMenuStrip;
private System.Windows.Forms.ToolStripMenuItem fileMainMenu;
private System.Windows.Forms.ToolStripMenuItem openFolderFileMainMenu;
private System.Windows.Forms.ListView inputFilesListView;
private System.Windows.Forms.GroupBox detailsGroupBox;
private System.Windows.Forms.Panel buttonPanel;
private System.Windows.Forms.Button applyChangesButton;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label currentTitleLabel;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem debugToolStripMenuItem;
}
}
namespace MKVTest
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.selectFolderButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
this.fileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.openFolderFileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.inputFilesListView = new System.Windows.Forms.ListView();
this.detailsGroupBox = new System.Windows.Forms.GroupBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.currentTitleLabel = new System.Windows.Forms.Label();
this.buttonPanel = new System.Windows.Forms.Panel();
this.applyChangesButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.mainMenuStrip.SuspendLayout();
this.detailsGroupBox.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.buttonPanel.SuspendLayout();
this.SuspendLayout();
//
// selectFolderButton
//
this.selectFolderButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.selectFolderButton.Location = new System.Drawing.Point(2, 9);
this.selectFolderButton.Margin = new System.Windows.Forms.Padding(2);
this.selectFolderButton.Name = "selectFolderButton";
this.selectFolderButton.Size = new System.Drawing.Size(80, 29);
this.selectFolderButton.TabIndex = 1;
this.selectFolderButton.Text = "Select Folder";
this.selectFolderButton.UseVisualStyleBackColor = true;
this.selectFolderButton.Click += new System.EventHandler(this.button1_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
this.tableLayoutPanel1.Controls.Add(this.mainMenuStrip, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.inputFilesListView, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.detailsGroupBox, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.buttonPanel, 2, 4);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.08529F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 37.45736F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 37.45736F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(560, 401);
this.tableLayoutPanel1.TabIndex = 2;
//
// mainMenuStrip
//
this.tableLayoutPanel1.SetColumnSpan(this.mainMenuStrip, 3);
this.mainMenuStrip.ImageScalingSize = new System.Drawing.Size(28, 28);
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileMainMenu,
this.debugToolStripMenuItem});
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
this.mainMenuStrip.Name = "mainMenuStrip";
this.mainMenuStrip.Size = new System.Drawing.Size(560, 24);
this.mainMenuStrip.TabIndex = 2;
this.mainMenuStrip.Text = "menuStrip1";
//
// fileMainMenu
//
this.fileMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openFolderFileMainMenu,
this.exitToolStripMenuItem});
this.fileMainMenu.Name = "fileMainMenu";
this.fileMainMenu.Size = new System.Drawing.Size(37, 20);
this.fileMainMenu.Text = "&File";
//
// openFolderFileMainMenu
//
this.openFolderFileMainMenu.Name = "openFolderFileMainMenu";
this.openFolderFileMainMenu.Size = new System.Drawing.Size(139, 22);
this.openFolderFileMainMenu.Text = "&Open Folder";
this.openFolderFileMainMenu.Click += new System.EventHandler(this.openFolderFileMainMenu_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// debugToolStripMenuItem
//
this.debugToolStripMenuItem.Name = "debugToolStripMenuItem";
this.debugToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
this.debugToolStripMenuItem.Text = "Debug";
this.debugToolStripMenuItem.Click += new System.EventHandler(this.debugToolStripMenuItem_Click);
//
// inputFilesListView
//
this.tableLayoutPanel1.SetColumnSpan(this.inputFilesListView, 2);
this.inputFilesListView.Dock = System.Windows.Forms.DockStyle.Fill;
this.inputFilesListView.LabelWrap = false;
this.inputFilesListView.Location = new System.Drawing.Point(3, 33);
this.inputFilesListView.Name = "inputFilesListView";
this.tableLayoutPanel1.SetRowSpan(this.inputFilesListView, 4);
this.inputFilesListView.Size = new System.Drawing.Size(330, 365);
this.inputFilesListView.TabIndex = 3;
this.inputFilesListView.UseCompatibleStateImageBehavior = false;
this.inputFilesListView.View = System.Windows.Forms.View.Details;
//
// detailsGroupBox
//
this.detailsGroupBox.Controls.Add(this.flowLayoutPanel1);
this.detailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.detailsGroupBox.Location = new System.Drawing.Point(339, 33);
this.detailsGroupBox.Name = "detailsGroupBox";
this.tableLayoutPanel1.SetRowSpan(this.detailsGroupBox, 3);
this.detailsGroupBox.Size = new System.Drawing.Size(218, 320);
this.detailsGroupBox.TabIndex = 5;
this.detailsGroupBox.TabStop = false;
this.detailsGroupBox.Text = "Details";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.currentTitleLabel);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 16);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(212, 301);
this.flowLayoutPanel1.TabIndex = 0;
//
// currentTitleLabel
//
this.currentTitleLabel.AutoSize = true;
this.currentTitleLabel.Location = new System.Drawing.Point(2, 0);
this.currentTitleLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.currentTitleLabel.Name = "currentTitleLabel";
this.currentTitleLabel.Size = new System.Drawing.Size(67, 13);
this.currentTitleLabel.TabIndex = 11;
this.currentTitleLabel.Text = "Current Title:";
//
// buttonPanel
//
this.buttonPanel.Controls.Add(this.applyChangesButton);
this.buttonPanel.Controls.Add(this.selectFolderButton);
this.buttonPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonPanel.Location = new System.Drawing.Point(339, 359);
this.buttonPanel.Name = "buttonPanel";
this.buttonPanel.Size = new System.Drawing.Size(218, 39);
this.buttonPanel.TabIndex = 8;
//
// applyChangesButton
//
this.applyChangesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.applyChangesButton.Enabled = false;
this.applyChangesButton.Location = new System.Drawing.Point(112, 7);
this.applyChangesButton.Name = "applyChangesButton";
this.applyChangesButton.Size = new System.Drawing.Size(102, 29);
this.applyChangesButton.TabIndex = 2;
this.applyChangesButton.Text = "Apply Changes";
this.applyChangesButton.UseVisualStyleBackColor = true;
this.applyChangesButton.Click += new System.EventHandler(this.applyChangesButton_Click);
//
// Form1
//
this.AcceptButton = this.selectFolderButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(560, 401);
this.Controls.Add(this.tableLayoutPanel1);
this.MainMenuStrip = this.mainMenuStrip;
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "Form1";
this.Text = "Form1";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.mainMenuStrip.ResumeLayout(false);
this.mainMenuStrip.PerformLayout();
this.detailsGroupBox.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.buttonPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button selectFolderButton;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.MenuStrip mainMenuStrip;
private System.Windows.Forms.ToolStripMenuItem fileMainMenu;
private System.Windows.Forms.ToolStripMenuItem openFolderFileMainMenu;
private System.Windows.Forms.ListView inputFilesListView;
private System.Windows.Forms.GroupBox detailsGroupBox;
private System.Windows.Forms.Panel buttonPanel;
private System.Windows.Forms.Button applyChangesButton;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label currentTitleLabel;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem debugToolStripMenuItem;
}
}
+330 -330
View File
@@ -1,330 +1,330 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
namespace MKVTest
{
/* Call mkvpropedit.exe
* Edit "Title" detail property: --edit info --set "title=%TITLE%" %FILE%
* Edit video track one: --edit track:v1 --set "name(or language)="%VAR%" %FILE%
* Edit audio track one: --edit track:a1 --set "name(or language)="%VAR%" %FILE%
* To add simply replace "--set" with "--add".
*/
public partial class Form1 : Form
{
public static string Language = "eng";
private static readonly ContextMenuStrip menu = new ContextMenuStrip();
public Form1()
{
InitializeComponent();
inputFilesListView.ItemSelectionChanged += UpdateFilePropPrediction;
inputFilesListView.MouseClick += ShowMenu;
Resize += Form1_Resize;
var item = new ToolStripMenuItem
{
Name = "RemoveItem",
Text = @"Remove"
};
menu.Items.Add(item);
var inputColumn = new ColumnHeader
{
Text = @"Files",
Name = @"HeaderColumn",
Width = inputFilesListView.Width - 10
};
inputFilesListView.Columns.Add(inputColumn);
}
private void ShowMenu(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
if (inputFilesListView.FocusedItem.Bounds.Contains(e.Location))
{
menu.Show(Cursor.Position);
}
}
}
private void UpdateFilePropPrediction(object sender, ListViewItemSelectionChangedEventArgs e)
{
var info = new MkvFileInfo();
var file = info.GetAttributes(e.Item.Name);
flowLayoutPanel1.Controls.Clear();
flowLayoutPanel1.Invalidate();
var titleLabel = new Label
{
Parent = flowLayoutPanel1,
Text = @"Current Title: " + file.SegementInformation?.Title,
AutoSize = true
};
flowLayoutPanel1.Container?.Add(titleLabel);
var videoTrackNumber = 1;
var audioTrackNumber = 1;
var subtitleTrackNumber = 1;
foreach (var fileTrack in file.Tracks)
{
if (fileTrack.Type == MkvTrack.TrackType.Video)
{
var nameLabel = new Label
{
AutoSize = true,
Text = @"Track:v" + videoTrackNumber + @" Name: " + fileTrack.Name,
Parent = flowLayoutPanel1
};
var languageLabel = new Label
{
AutoSize = true,
Text = @"Track:v" + videoTrackNumber + @" Language: " + fileTrack.Language,
Parent = flowLayoutPanel1
};
videoTrackNumber++;
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(nameLabel);
flowLayoutPanel1.Container.Add(languageLabel);
}
}
if (fileTrack.Type == MkvTrack.TrackType.Audio)
{
var nameLabel = new Label
{
AutoSize = true,
Text = @"Track:a" + audioTrackNumber + @" Name: " + fileTrack.Name,
Parent = flowLayoutPanel1
};
var languageLabel = new Label
{
AutoSize = true,
Text = @"Track:a" + audioTrackNumber + @" Language: " + fileTrack.Language,
Parent = flowLayoutPanel1
};
audioTrackNumber++;
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(nameLabel);
flowLayoutPanel1.Container.Add(languageLabel);
}
}
if (fileTrack.Type == MkvTrack.TrackType.Subtitle)
{
var nameLabel = new Label
{
AutoSize = true,
Text = @"Track:s" + subtitleTrackNumber + @" Name: " + fileTrack.Name,
Parent = flowLayoutPanel1
};
var languageLabel = new Label
{
AutoSize = true,
Text = @"Track:s" + subtitleTrackNumber + @" Language: " + fileTrack.Language,
Parent = flowLayoutPanel1
};
subtitleTrackNumber++;
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(nameLabel);
flowLayoutPanel1.Container.Add(languageLabel);
}
}
}
}
/// <summary>
///
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
private string GetEpisodeName(string text)
{
var s = new StringBuilder();
var hyphenCount = 0;
var index = 0;
var fileExtensionStartPoint = text.LastIndexOf(".", StringComparison.InvariantCulture);
foreach (var c in text)
{
if (c == '-' && hyphenCount != 2)
{
hyphenCount++;
index++;
continue;
}
if (hyphenCount == 2)
{
if (c == '.' && index == fileExtensionStartPoint)
{
break;
}
s.Append(c);
}
index++;
}
return s.ToString().Trim();
}
private void ListFiles(string folderPath)
{
var dir = new DirectoryInfo(folderPath);
var files = dir.GetFiles("*.mkv", SearchOption.TopDirectoryOnly);
foreach (var file in files)
{
var node = new ListViewItem
{
Tag = true, //Assume the file needs to be updated.
Name = file.FullName,
Text = file.Name
};
inputFilesListView.Items.Add(node);
}
if (inputFilesListView.Items.Count > 0)
{
applyChangesButton.Enabled = true;
}
}
private void button1_Click(object sender, EventArgs e)
{
var d = new FolderBrowserDialog();
if (d.ShowDialog() != DialogResult.OK) return;
ClearForm();
ListFiles(d.SelectedPath);
}
private void Form1_Resize(object sender, EventArgs e)
{
inputFilesListView.Columns[0].Width = inputFilesListView.Width - 10;
}
private void applyChangesButton_Click(object sender, EventArgs e)
{
foreach (ListViewItem node in inputFilesListView.Items)
{
//Check to see if the item has been modified.
if (node.Tag == null || (bool) node.Tag == false) continue;
if (!File.Exists(node.Name)) continue;
var command = "/C mkvpropedit.exe --edit info --set \"title=" + GetEpisodeName(node.Text) +
"\" --edit track:v1 --set \"name=" + GetEpisodeName(node.Text) +
"\" --edit track:v1 --set \"language=eng\" --edit track:a1 --set \"name=English\" --edit track:a1 --set \"language=eng\" \"" + node.Name + "\" > temp.txt";
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = command
};
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
if (process.ExitCode == 0) continue;
var error = File.ReadAllLines("temp.txt");
MessageBox.Show(@"Error on node: " + node.Text + (error.Length > 0 ? Environment.NewLine + error[0] : string.Empty));
break;
}
File.Delete("temp.txt");
}
private void ClearForm()
{
inputFilesListView.Items.Clear();
flowLayoutPanel1.Controls.Clear();
flowLayoutPanel1.Invalidate();
}
private void openFolderFileMainMenu_Click(object sender, EventArgs e)
{
var d = new FolderBrowserDialog();
if (d.ShowDialog() != DialogResult.OK) return;
ClearForm();
ListFiles(d.SelectedPath);
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e) => Application.Exit();
public static bool CheckFiles()
{
return File.Exists("mkvpropedit.exe") && File.Exists("mkvinfo.exe");
}
private void ReadXml(string s)
{
var xReader = new XmlTextReader(new StringReader(s));
var r = new StringBuilder();
ClearForm();
var tags = new List<XmlTag>();
while (xReader.Read())
{
switch (xReader.NodeType)
{
case XmlNodeType.Element:
//inputFilesListView.Items.Add(xReader.Name + ": " + xReader.Value);
var t = new XmlTag
{
Name = xReader.Name
};
tags.Add(t);
break;
case XmlNodeType.Text:
//inputFilesListView.Items.Add(xReader.Value);
tags[tags.Count - 1].Value = xReader.Value;
break;
}
}
foreach (var tag in tags)
{
var label = new Label
{
Text = tag.Name
};
var textBox = new TextBox
{
Text = tag.Value
};
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(label);
flowLayoutPanel1.Container.Add(textBox);
}
//inputFilesListView.Items.Add(tag.Name + ": " + tag.Value);
}
}
private void debugToolStripMenuItem_Click(object sender, EventArgs e)
{
//var xml = new SerializeMkvInfo();
//var x = xml.SerializeFile("info.txt");
//var text = new StringBuilder();
//foreach (var line in x)
//{
// text.Append(line.Trim());
//}
//ReadXml(text.ToString());
var p = new FrmProperties();
p.ShowDialog();
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
namespace MKVTest
{
/* Call mkvpropedit.exe
* Edit "Title" detail property: --edit info --set "title=%TITLE%" %FILE%
* Edit video track one: --edit track:v1 --set "name(or language)="%VAR%" %FILE%
* Edit audio track one: --edit track:a1 --set "name(or language)="%VAR%" %FILE%
* To add simply replace "--set" with "--add".
*/
public partial class Form1 : Form
{
public static string Language = "eng";
private static readonly ContextMenuStrip menu = new ContextMenuStrip();
public Form1()
{
InitializeComponent();
inputFilesListView.ItemSelectionChanged += UpdateFilePropPrediction;
inputFilesListView.MouseClick += ShowMenu;
Resize += Form1_Resize;
var item = new ToolStripMenuItem
{
Name = "RemoveItem",
Text = @"Remove"
};
menu.Items.Add(item);
var inputColumn = new ColumnHeader
{
Text = @"Files",
Name = @"HeaderColumn",
Width = inputFilesListView.Width - 10
};
inputFilesListView.Columns.Add(inputColumn);
}
private void ShowMenu(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
if (inputFilesListView.FocusedItem.Bounds.Contains(e.Location))
{
menu.Show(Cursor.Position);
}
}
}
private void UpdateFilePropPrediction(object sender, ListViewItemSelectionChangedEventArgs e)
{
var info = new MkvFileInfo();
var file = info.GetAttributes(e.Item.Name);
flowLayoutPanel1.Controls.Clear();
flowLayoutPanel1.Invalidate();
var titleLabel = new Label
{
Parent = flowLayoutPanel1,
Text = @"Current Title: " + file.SegementInformation?.Title,
AutoSize = true
};
flowLayoutPanel1.Container?.Add(titleLabel);
var videoTrackNumber = 1;
var audioTrackNumber = 1;
var subtitleTrackNumber = 1;
foreach (var fileTrack in file.Tracks)
{
if (fileTrack.Type == MkvTrack.TrackType.Video)
{
var nameLabel = new Label
{
AutoSize = true,
Text = @"Track:v" + videoTrackNumber + @" Name: " + fileTrack.Name,
Parent = flowLayoutPanel1
};
var languageLabel = new Label
{
AutoSize = true,
Text = @"Track:v" + videoTrackNumber + @" Language: " + fileTrack.Language,
Parent = flowLayoutPanel1
};
videoTrackNumber++;
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(nameLabel);
flowLayoutPanel1.Container.Add(languageLabel);
}
}
if (fileTrack.Type == MkvTrack.TrackType.Audio)
{
var nameLabel = new Label
{
AutoSize = true,
Text = @"Track:a" + audioTrackNumber + @" Name: " + fileTrack.Name,
Parent = flowLayoutPanel1
};
var languageLabel = new Label
{
AutoSize = true,
Text = @"Track:a" + audioTrackNumber + @" Language: " + fileTrack.Language,
Parent = flowLayoutPanel1
};
audioTrackNumber++;
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(nameLabel);
flowLayoutPanel1.Container.Add(languageLabel);
}
}
if (fileTrack.Type == MkvTrack.TrackType.Subtitle)
{
var nameLabel = new Label
{
AutoSize = true,
Text = @"Track:s" + subtitleTrackNumber + @" Name: " + fileTrack.Name,
Parent = flowLayoutPanel1
};
var languageLabel = new Label
{
AutoSize = true,
Text = @"Track:s" + subtitleTrackNumber + @" Language: " + fileTrack.Language,
Parent = flowLayoutPanel1
};
subtitleTrackNumber++;
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(nameLabel);
flowLayoutPanel1.Container.Add(languageLabel);
}
}
}
}
/// <summary>
///
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
private string GetEpisodeName(string text)
{
var s = new StringBuilder();
var hyphenCount = 0;
var index = 0;
var fileExtensionStartPoint = text.LastIndexOf(".", StringComparison.InvariantCulture);
foreach (var c in text)
{
if (c == '-' && hyphenCount != 2)
{
hyphenCount++;
index++;
continue;
}
if (hyphenCount == 2)
{
if (c == '.' && index == fileExtensionStartPoint)
{
break;
}
s.Append(c);
}
index++;
}
return s.ToString().Trim();
}
private void ListFiles(string folderPath)
{
var dir = new DirectoryInfo(folderPath);
var files = dir.GetFiles("*.mkv", SearchOption.TopDirectoryOnly);
foreach (var file in files)
{
var node = new ListViewItem
{
Tag = true, //Assume the file needs to be updated.
Name = file.FullName,
Text = file.Name
};
inputFilesListView.Items.Add(node);
}
if (inputFilesListView.Items.Count > 0)
{
applyChangesButton.Enabled = true;
}
}
private void button1_Click(object sender, EventArgs e)
{
var d = new FolderBrowserDialog();
if (d.ShowDialog() != DialogResult.OK) return;
ClearForm();
ListFiles(d.SelectedPath);
}
private void Form1_Resize(object sender, EventArgs e)
{
inputFilesListView.Columns[0].Width = inputFilesListView.Width - 10;
}
private void applyChangesButton_Click(object sender, EventArgs e)
{
foreach (ListViewItem node in inputFilesListView.Items)
{
//Check to see if the item has been modified.
if (node.Tag == null || (bool) node.Tag == false) continue;
if (!File.Exists(node.Name)) continue;
var command = "/C mkvpropedit.exe --edit info --set \"title=" + GetEpisodeName(node.Text) +
"\" --edit track:v1 --set \"name=" + GetEpisodeName(node.Text) +
"\" --edit track:v1 --set \"language=eng\" --edit track:a1 --set \"name=English\" --edit track:a1 --set \"language=eng\" \"" + node.Name + "\" > temp.txt";
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = command
};
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
if (process.ExitCode == 0) continue;
var error = File.ReadAllLines("temp.txt");
MessageBox.Show(@"Error on node: " + node.Text + (error.Length > 0 ? Environment.NewLine + error[0] : string.Empty));
break;
}
File.Delete("temp.txt");
}
private void ClearForm()
{
inputFilesListView.Items.Clear();
flowLayoutPanel1.Controls.Clear();
flowLayoutPanel1.Invalidate();
}
private void openFolderFileMainMenu_Click(object sender, EventArgs e)
{
var d = new FolderBrowserDialog();
if (d.ShowDialog() != DialogResult.OK) return;
ClearForm();
ListFiles(d.SelectedPath);
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e) => Application.Exit();
public static bool CheckFiles()
{
return File.Exists("mkvpropedit.exe") && File.Exists("mkvinfo.exe");
}
private void ReadXml(string s)
{
var xReader = new XmlTextReader(new StringReader(s));
var r = new StringBuilder();
ClearForm();
var tags = new List<XmlTag>();
while (xReader.Read())
{
switch (xReader.NodeType)
{
case XmlNodeType.Element:
//inputFilesListView.Items.Add(xReader.Name + ": " + xReader.Value);
var t = new XmlTag
{
Name = xReader.Name
};
tags.Add(t);
break;
case XmlNodeType.Text:
//inputFilesListView.Items.Add(xReader.Value);
tags[tags.Count - 1].Value = xReader.Value;
break;
}
}
foreach (var tag in tags)
{
var label = new Label
{
Text = tag.Name
};
var textBox = new TextBox
{
Text = tag.Value
};
if (flowLayoutPanel1.Container != null)
{
flowLayoutPanel1.Container.Add(label);
flowLayoutPanel1.Container.Add(textBox);
}
//inputFilesListView.Items.Add(tag.Name + ": " + tag.Value);
}
}
private void debugToolStripMenuItem_Click(object sender, EventArgs e)
{
//var xml = new SerializeMkvInfo();
//var x = xml.SerializeFile("info.txt");
//var text = new StringBuilder();
//foreach (var line in x)
//{
// text.Append(line.Trim());
//}
//ReadXml(text.ToString());
var p = new FrmProperties();
p.ShowDialog();
}
}
}
+122 -122
View File
@@ -1,123 +1,123 @@
<?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">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mainMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<?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">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mainMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+184 -184
View File
@@ -1,185 +1,185 @@
namespace MKVTest
{
partial class FrmProperties
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.mainLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.mainMenu = new System.Windows.Forms.MenuStrip();
this.fileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.videoTrackGroupBox = new System.Windows.Forms.GroupBox();
this.audioTrackGoupBox = new System.Windows.Forms.GroupBox();
this.subtitleTrackGroupBox = new System.Windows.Forms.GroupBox();
this.chapterTrackGroupBox = new System.Windows.Forms.GroupBox();
this.videoFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.audioFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.subtitleFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.mainLayoutPanel.SuspendLayout();
this.mainMenu.SuspendLayout();
this.videoTrackGroupBox.SuspendLayout();
this.audioTrackGoupBox.SuspendLayout();
this.subtitleTrackGroupBox.SuspendLayout();
this.SuspendLayout();
//
// mainLayoutPanel
//
this.mainLayoutPanel.ColumnCount = 3;
this.mainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.mainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
this.mainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
this.mainLayoutPanel.Controls.Add(this.mainMenu, 0, 0);
this.mainLayoutPanel.Controls.Add(this.videoTrackGroupBox, 0, 1);
this.mainLayoutPanel.Controls.Add(this.audioTrackGoupBox, 1, 1);
this.mainLayoutPanel.Controls.Add(this.subtitleTrackGroupBox, 2, 1);
this.mainLayoutPanel.Controls.Add(this.chapterTrackGroupBox, 0, 2);
this.mainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainLayoutPanel.Location = new System.Drawing.Point(0, 0);
this.mainLayoutPanel.Name = "mainLayoutPanel";
this.mainLayoutPanel.RowCount = 3;
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.mainLayoutPanel.Size = new System.Drawing.Size(515, 406);
this.mainLayoutPanel.TabIndex = 0;
//
// mainMenu
//
this.mainLayoutPanel.SetColumnSpan(this.mainMenu, 3);
this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileMainMenu});
this.mainMenu.Location = new System.Drawing.Point(0, 0);
this.mainMenu.Name = "mainMenu";
this.mainMenu.Size = new System.Drawing.Size(515, 24);
this.mainMenu.TabIndex = 0;
this.mainMenu.Text = "menuStrip1";
//
// fileMainMenu
//
this.fileMainMenu.Name = "fileMainMenu";
this.fileMainMenu.Size = new System.Drawing.Size(37, 20);
this.fileMainMenu.Text = "&File";
//
// videoTrackGroupBox
//
this.videoTrackGroupBox.Controls.Add(this.videoFlowLayoutPanel);
this.videoTrackGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.videoTrackGroupBox.Location = new System.Drawing.Point(3, 28);
this.videoTrackGroupBox.Name = "videoTrackGroupBox";
this.videoTrackGroupBox.Size = new System.Drawing.Size(165, 279);
this.videoTrackGroupBox.TabIndex = 1;
this.videoTrackGroupBox.TabStop = false;
this.videoTrackGroupBox.Text = "Video Track";
//
// audioTrackGoupBox
//
this.audioTrackGoupBox.Controls.Add(this.audioFlowLayoutPanel);
this.audioTrackGoupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.audioTrackGoupBox.Location = new System.Drawing.Point(174, 28);
this.audioTrackGoupBox.Name = "audioTrackGoupBox";
this.audioTrackGoupBox.Size = new System.Drawing.Size(165, 279);
this.audioTrackGoupBox.TabIndex = 2;
this.audioTrackGoupBox.TabStop = false;
this.audioTrackGoupBox.Text = "Audio Tracks";
//
// subtitleTrackGroupBox
//
this.subtitleTrackGroupBox.Controls.Add(this.subtitleFlowLayoutPanel);
this.subtitleTrackGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.subtitleTrackGroupBox.Location = new System.Drawing.Point(345, 28);
this.subtitleTrackGroupBox.Name = "subtitleTrackGroupBox";
this.subtitleTrackGroupBox.Size = new System.Drawing.Size(167, 279);
this.subtitleTrackGroupBox.TabIndex = 3;
this.subtitleTrackGroupBox.TabStop = false;
this.subtitleTrackGroupBox.Text = "Subtitles";
//
// chapterTrackGroupBox
//
this.chapterTrackGroupBox.Location = new System.Drawing.Point(3, 313);
this.chapterTrackGroupBox.Name = "chapterTrackGroupBox";
this.chapterTrackGroupBox.Size = new System.Drawing.Size(165, 90);
this.chapterTrackGroupBox.TabIndex = 4;
this.chapterTrackGroupBox.TabStop = false;
this.chapterTrackGroupBox.Text = "Chapter Markers";
//
// videoFlowLayoutPanel
//
this.videoFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.videoFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.videoFlowLayoutPanel.Name = "videoFlowLayoutPanel";
this.videoFlowLayoutPanel.Size = new System.Drawing.Size(159, 260);
this.videoFlowLayoutPanel.TabIndex = 0;
//
// audioFlowLayoutPanel
//
this.audioFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.audioFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.audioFlowLayoutPanel.Name = "audioFlowLayoutPanel";
this.audioFlowLayoutPanel.Size = new System.Drawing.Size(159, 260);
this.audioFlowLayoutPanel.TabIndex = 0;
//
// subtitleFlowLayoutPanel
//
this.subtitleFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.subtitleFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.subtitleFlowLayoutPanel.Name = "subtitleFlowLayoutPanel";
this.subtitleFlowLayoutPanel.Size = new System.Drawing.Size(161, 260);
this.subtitleFlowLayoutPanel.TabIndex = 0;
//
// FrmProperties
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(515, 406);
this.Controls.Add(this.mainLayoutPanel);
this.MainMenuStrip = this.mainMenu;
this.Name = "FrmProperties";
this.Text = "Properties";
this.mainLayoutPanel.ResumeLayout(false);
this.mainLayoutPanel.PerformLayout();
this.mainMenu.ResumeLayout(false);
this.mainMenu.PerformLayout();
this.videoTrackGroupBox.ResumeLayout(false);
this.audioTrackGoupBox.ResumeLayout(false);
this.subtitleTrackGroupBox.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel mainLayoutPanel;
private System.Windows.Forms.MenuStrip mainMenu;
private System.Windows.Forms.ToolStripMenuItem fileMainMenu;
private System.Windows.Forms.GroupBox videoTrackGroupBox;
private System.Windows.Forms.GroupBox audioTrackGoupBox;
private System.Windows.Forms.GroupBox subtitleTrackGroupBox;
private System.Windows.Forms.GroupBox chapterTrackGroupBox;
private System.Windows.Forms.FlowLayoutPanel videoFlowLayoutPanel;
private System.Windows.Forms.FlowLayoutPanel audioFlowLayoutPanel;
private System.Windows.Forms.FlowLayoutPanel subtitleFlowLayoutPanel;
}
namespace MKVTest
{
partial class FrmProperties
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.mainLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.mainMenu = new System.Windows.Forms.MenuStrip();
this.fileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.videoTrackGroupBox = new System.Windows.Forms.GroupBox();
this.audioTrackGoupBox = new System.Windows.Forms.GroupBox();
this.subtitleTrackGroupBox = new System.Windows.Forms.GroupBox();
this.chapterTrackGroupBox = new System.Windows.Forms.GroupBox();
this.videoFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.audioFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.subtitleFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.mainLayoutPanel.SuspendLayout();
this.mainMenu.SuspendLayout();
this.videoTrackGroupBox.SuspendLayout();
this.audioTrackGoupBox.SuspendLayout();
this.subtitleTrackGroupBox.SuspendLayout();
this.SuspendLayout();
//
// mainLayoutPanel
//
this.mainLayoutPanel.ColumnCount = 3;
this.mainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.mainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
this.mainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
this.mainLayoutPanel.Controls.Add(this.mainMenu, 0, 0);
this.mainLayoutPanel.Controls.Add(this.videoTrackGroupBox, 0, 1);
this.mainLayoutPanel.Controls.Add(this.audioTrackGoupBox, 1, 1);
this.mainLayoutPanel.Controls.Add(this.subtitleTrackGroupBox, 2, 1);
this.mainLayoutPanel.Controls.Add(this.chapterTrackGroupBox, 0, 2);
this.mainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainLayoutPanel.Location = new System.Drawing.Point(0, 0);
this.mainLayoutPanel.Name = "mainLayoutPanel";
this.mainLayoutPanel.RowCount = 3;
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.mainLayoutPanel.Size = new System.Drawing.Size(515, 406);
this.mainLayoutPanel.TabIndex = 0;
//
// mainMenu
//
this.mainLayoutPanel.SetColumnSpan(this.mainMenu, 3);
this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileMainMenu});
this.mainMenu.Location = new System.Drawing.Point(0, 0);
this.mainMenu.Name = "mainMenu";
this.mainMenu.Size = new System.Drawing.Size(515, 24);
this.mainMenu.TabIndex = 0;
this.mainMenu.Text = "menuStrip1";
//
// fileMainMenu
//
this.fileMainMenu.Name = "fileMainMenu";
this.fileMainMenu.Size = new System.Drawing.Size(37, 20);
this.fileMainMenu.Text = "&File";
//
// videoTrackGroupBox
//
this.videoTrackGroupBox.Controls.Add(this.videoFlowLayoutPanel);
this.videoTrackGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.videoTrackGroupBox.Location = new System.Drawing.Point(3, 28);
this.videoTrackGroupBox.Name = "videoTrackGroupBox";
this.videoTrackGroupBox.Size = new System.Drawing.Size(165, 279);
this.videoTrackGroupBox.TabIndex = 1;
this.videoTrackGroupBox.TabStop = false;
this.videoTrackGroupBox.Text = "Video Track";
//
// audioTrackGoupBox
//
this.audioTrackGoupBox.Controls.Add(this.audioFlowLayoutPanel);
this.audioTrackGoupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.audioTrackGoupBox.Location = new System.Drawing.Point(174, 28);
this.audioTrackGoupBox.Name = "audioTrackGoupBox";
this.audioTrackGoupBox.Size = new System.Drawing.Size(165, 279);
this.audioTrackGoupBox.TabIndex = 2;
this.audioTrackGoupBox.TabStop = false;
this.audioTrackGoupBox.Text = "Audio Tracks";
//
// subtitleTrackGroupBox
//
this.subtitleTrackGroupBox.Controls.Add(this.subtitleFlowLayoutPanel);
this.subtitleTrackGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.subtitleTrackGroupBox.Location = new System.Drawing.Point(345, 28);
this.subtitleTrackGroupBox.Name = "subtitleTrackGroupBox";
this.subtitleTrackGroupBox.Size = new System.Drawing.Size(167, 279);
this.subtitleTrackGroupBox.TabIndex = 3;
this.subtitleTrackGroupBox.TabStop = false;
this.subtitleTrackGroupBox.Text = "Subtitles";
//
// chapterTrackGroupBox
//
this.chapterTrackGroupBox.Location = new System.Drawing.Point(3, 313);
this.chapterTrackGroupBox.Name = "chapterTrackGroupBox";
this.chapterTrackGroupBox.Size = new System.Drawing.Size(165, 90);
this.chapterTrackGroupBox.TabIndex = 4;
this.chapterTrackGroupBox.TabStop = false;
this.chapterTrackGroupBox.Text = "Chapter Markers";
//
// videoFlowLayoutPanel
//
this.videoFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.videoFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.videoFlowLayoutPanel.Name = "videoFlowLayoutPanel";
this.videoFlowLayoutPanel.Size = new System.Drawing.Size(159, 260);
this.videoFlowLayoutPanel.TabIndex = 0;
//
// audioFlowLayoutPanel
//
this.audioFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.audioFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.audioFlowLayoutPanel.Name = "audioFlowLayoutPanel";
this.audioFlowLayoutPanel.Size = new System.Drawing.Size(159, 260);
this.audioFlowLayoutPanel.TabIndex = 0;
//
// subtitleFlowLayoutPanel
//
this.subtitleFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.subtitleFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.subtitleFlowLayoutPanel.Name = "subtitleFlowLayoutPanel";
this.subtitleFlowLayoutPanel.Size = new System.Drawing.Size(161, 260);
this.subtitleFlowLayoutPanel.TabIndex = 0;
//
// FrmProperties
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(515, 406);
this.Controls.Add(this.mainLayoutPanel);
this.MainMenuStrip = this.mainMenu;
this.Name = "FrmProperties";
this.Text = "Properties";
this.mainLayoutPanel.ResumeLayout(false);
this.mainLayoutPanel.PerformLayout();
this.mainMenu.ResumeLayout(false);
this.mainMenu.PerformLayout();
this.videoTrackGroupBox.ResumeLayout(false);
this.audioTrackGoupBox.ResumeLayout(false);
this.subtitleTrackGroupBox.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel mainLayoutPanel;
private System.Windows.Forms.MenuStrip mainMenu;
private System.Windows.Forms.ToolStripMenuItem fileMainMenu;
private System.Windows.Forms.GroupBox videoTrackGroupBox;
private System.Windows.Forms.GroupBox audioTrackGoupBox;
private System.Windows.Forms.GroupBox subtitleTrackGroupBox;
private System.Windows.Forms.GroupBox chapterTrackGroupBox;
private System.Windows.Forms.FlowLayoutPanel videoFlowLayoutPanel;
private System.Windows.Forms.FlowLayoutPanel audioFlowLayoutPanel;
private System.Windows.Forms.FlowLayoutPanel subtitleFlowLayoutPanel;
}
}
+114 -114
View File
@@ -1,114 +1,114 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
namespace MKVTest
{
public partial class FrmProperties : Form
{
public FrmProperties()
{
InitializeComponent();
GeneratePropertiesFile(@"C:\Users\glmcc\Desktop\Death Note\Black Lagoon - 1x02 - Mangrove Heaven.mkv");
ReadPropertiesFile();
}
private void GeneratePropertiesFile(string filePath)
{
var command = "/C mkvinfo.exe \"" + filePath + "\" > properties.txt";
var process = new System.Diagnostics.Process();
var startInfo = new System.Diagnostics.ProcessStartInfo
{
WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = command
};
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
}
private void ReadPropertiesFile()
{
var serializer = new SerializeMkvInfo();
var xml = serializer.SerializeFile("properties.txt");
var text = new StringBuilder();
foreach (var line in xml)
{
text.Append(line.Trim());
}
ReadXml(text.ToString());
}
private void ReadXml(string s)
{
var xReader = new XmlTextReader(new StringReader(s));
var r = new StringBuilder();
ClearForm();
var tags = new List<XmlTag>();
var subGroup = new GroupBox();
while (xReader.Read())
{
switch (xReader.NodeType)
{
case XmlNodeType.Element:
var t = new XmlTag
{
Name = xReader.Name
};
tags.Add(t);
break;
case XmlNodeType.Text:
tags[tags.Count - 1].Value = xReader.Value;
break;
case XmlNodeType.EndElement:
tags.Clear();
break;
}
}
//foreach (var tag in tags)
//{
// //Foreach tag create a new row in the table layout panel.
// mainLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30));
// var label = new Label
// {
// Text = tag.Name //Static property name.
// };
// var textBox = new TextBox
// {
// Text = tag.Value //Allows the user to
// };
// mainLayoutPanel.Controls.Add(label, 0, mainLayoutPanel.RowCount - 1);
// mainLayoutPanel.Controls.Add(textBox, 0, mainLayoutPanel.RowCount - 1);
//}
}
private void BuildForm(List<XmlTag> tags)
{
foreach (var tag in tags)
{
}
}
private void ClearForm()
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
namespace MKVTest
{
public partial class FrmProperties : Form
{
public FrmProperties()
{
InitializeComponent();
GeneratePropertiesFile(@"C:\Users\glmcc\Desktop\Death Note\Black Lagoon - 1x02 - Mangrove Heaven.mkv");
ReadPropertiesFile();
}
private void GeneratePropertiesFile(string filePath)
{
var command = "/C mkvinfo.exe \"" + filePath + "\" > properties.txt";
var process = new System.Diagnostics.Process();
var startInfo = new System.Diagnostics.ProcessStartInfo
{
WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = command
};
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
}
private void ReadPropertiesFile()
{
var serializer = new SerializeMkvInfo();
var xml = serializer.SerializeFile("properties.txt");
var text = new StringBuilder();
foreach (var line in xml)
{
text.Append(line.Trim());
}
ReadXml(text.ToString());
}
private void ReadXml(string s)
{
var xReader = new XmlTextReader(new StringReader(s));
var r = new StringBuilder();
ClearForm();
var tags = new List<XmlTag>();
var subGroup = new GroupBox();
while (xReader.Read())
{
switch (xReader.NodeType)
{
case XmlNodeType.Element:
var t = new XmlTag
{
Name = xReader.Name
};
tags.Add(t);
break;
case XmlNodeType.Text:
tags[tags.Count - 1].Value = xReader.Value;
break;
case XmlNodeType.EndElement:
tags.Clear();
break;
}
}
//foreach (var tag in tags)
//{
// //Foreach tag create a new row in the table layout panel.
// mainLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30));
// var label = new Label
// {
// Text = tag.Name //Static property name.
// };
// var textBox = new TextBox
// {
// Text = tag.Value //Allows the user to
// };
// mainLayoutPanel.Controls.Add(label, 0, mainLayoutPanel.RowCount - 1);
// mainLayoutPanel.Controls.Add(textBox, 0, mainLayoutPanel.RowCount - 1);
//}
}
private void BuildForm(List<XmlTag> tags)
{
foreach (var tag in tags)
{
}
}
private void ClearForm()
{
}
}
}
+122 -122
View File
@@ -1,123 +1,123 @@
<?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">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<?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">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+106 -106
View File
@@ -1,107 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A750A634-6881-4083-B909-73EFE4C96802}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>MKVTest</RootNamespace>
<AssemblyName>MKVTest</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FrmProperties.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmProperties.Designer.cs">
<DependentUpon>FrmProperties.cs</DependentUpon>
</Compile>
<Compile Include="MkvAttribute.cs" />
<Compile Include="MkvFile.cs" />
<Compile Include="MkvFileInfo.cs" />
<Compile Include="MkvSegmentInformation.cs" />
<Compile Include="MkvTrack.cs" />
<Compile Include="MkvWriter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerializeMkvInfo.cs" />
<Compile Include="XmlTag.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmProperties.resx">
<DependentUpon>FrmProperties.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="mkvinfo.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="mkvpropedit.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A750A634-6881-4083-B909-73EFE4C96802}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>MKVTest</RootNamespace>
<AssemblyName>MKVTest</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FrmProperties.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmProperties.Designer.cs">
<DependentUpon>FrmProperties.cs</DependentUpon>
</Compile>
<Compile Include="MkvAttribute.cs" />
<Compile Include="MkvFile.cs" />
<Compile Include="MkvFileInfo.cs" />
<Compile Include="MkvSegmentInformation.cs" />
<Compile Include="MkvTrack.cs" />
<Compile Include="MkvWriter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerializeMkvInfo.cs" />
<Compile Include="XmlTag.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmProperties.resx">
<DependentUpon>FrmProperties.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="mkvinfo.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="mkvpropedit.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+14 -14
View File
@@ -1,14 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvAttribute
{
public string Name;
public string Value;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvAttribute
{
public string Name;
public string Value;
}
}
+17 -17
View File
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvFile
{
public List<MkvTrack> Tracks;
public List<MkvAttribute> Attributes;
public MkvSegmentInformation SegementInformation;
public string FullName;
public string FileName;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvFile
{
public List<MkvTrack> Tracks;
public List<MkvAttribute> Attributes;
public MkvSegmentInformation SegementInformation;
public string FullName;
public string FileName;
}
}
+114 -114
View File
@@ -1,114 +1,114 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
class MkvFileInfo
{
public MkvFile GetAttributes(string filePath)
{
var file = new MkvFile { Tracks = GetShit(filePath, out MkvSegmentInformation info), SegementInformation = info };
return file;
}
private static List<MkvTrack> GetShit(string filePath, out MkvSegmentInformation information)
{
var tracks = new List<MkvTrack>();
information = null;
var command = "/C mkvinfo.exe \"" + filePath + "\" > info.txt";
var process = new System.Diagnostics.Process();
var startInfo = new System.Diagnostics.ProcessStartInfo
{
WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = command
};
process.StartInfo = startInfo;
if (!Form1.CheckFiles())
{
MessageBox.Show(@"The two required files, mkvpropedit.exe and mkvinfo.exe are missing from this program's startup folder. These files are required to edit MKV files.", @"Missing Required Files");
}
process.Start();
while (!process.HasExited)
{
}
var info = File.ReadAllLines("info.txt");
var readingSegInfo = false;
var readingTrack = false;
var track = new MkvTrack();
for (var i = 0; i < info.Length; i++)
{
if (info[i] == "|+ Segment information")
{
readingSegInfo = true;
readingTrack = false;
continue;
}
if (info[i] == "| + A track")
{
readingTrack = true;
readingSegInfo = false;
if (track.Name == null && track.Language == null) continue;
tracks.Add(track);
track = new MkvTrack();
}
if (readingSegInfo)
{
if (info[i].Contains("Title:"))
{
var index = info[i].IndexOf(":", StringComparison.Ordinal) + 1;
var seg = new MkvSegmentInformation
{
Title = info[i].Substring(index, info[i].Length - index).Trim()
};
information = seg;
}
}
if (readingTrack)
{
if (info[i].Contains("Name:"))
{
var index = info[i].IndexOf(":", StringComparison.Ordinal) + 1;
track.Name = info[i].Substring(index, (info[i].Length - index)).Trim();
if(track.Type == MkvTrack.TrackType.Subtitle) tracks.Add(track);
}
if (info[i].Contains("Language:"))
{
var index = info[i].IndexOf(":", StringComparison.Ordinal) + 1;
track.Language = info[i].Substring(index, (info[i].Length - index)).Trim();
}
if (info[i].Contains("Video track"))
{
track.Type = MkvTrack.TrackType.Video;
}
if (info[i].Contains("Audio track"))
{
track.Type = MkvTrack.TrackType.Audio;
}
if (info[i].Contains("Track type: subtitles"))
{
track.Type = MkvTrack.TrackType.Subtitle;
}
}
}
if (information == null)
{
information = new MkvSegmentInformation();
}
return tracks;
}
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
class MkvFileInfo
{
public MkvFile GetAttributes(string filePath)
{
var file = new MkvFile { Tracks = GetShit(filePath, out MkvSegmentInformation info), SegementInformation = info };
return file;
}
private static List<MkvTrack> GetShit(string filePath, out MkvSegmentInformation information)
{
var tracks = new List<MkvTrack>();
information = null;
var command = "/C mkvinfo.exe \"" + filePath + "\" > info.txt";
var process = new System.Diagnostics.Process();
var startInfo = new System.Diagnostics.ProcessStartInfo
{
WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = command
};
process.StartInfo = startInfo;
if (!Form1.CheckFiles())
{
MessageBox.Show(@"The two required files, mkvpropedit.exe and mkvinfo.exe are missing from this program's startup folder. These files are required to edit MKV files.", @"Missing Required Files");
}
process.Start();
while (!process.HasExited)
{
}
var info = File.ReadAllLines("info.txt");
var readingSegInfo = false;
var readingTrack = false;
var track = new MkvTrack();
for (var i = 0; i < info.Length; i++)
{
if (info[i] == "|+ Segment information")
{
readingSegInfo = true;
readingTrack = false;
continue;
}
if (info[i] == "| + A track")
{
readingTrack = true;
readingSegInfo = false;
if (track.Name == null && track.Language == null) continue;
tracks.Add(track);
track = new MkvTrack();
}
if (readingSegInfo)
{
if (info[i].Contains("Title:"))
{
var index = info[i].IndexOf(":", StringComparison.Ordinal) + 1;
var seg = new MkvSegmentInformation
{
Title = info[i].Substring(index, info[i].Length - index).Trim()
};
information = seg;
}
}
if (readingTrack)
{
if (info[i].Contains("Name:"))
{
var index = info[i].IndexOf(":", StringComparison.Ordinal) + 1;
track.Name = info[i].Substring(index, (info[i].Length - index)).Trim();
if(track.Type == MkvTrack.TrackType.Subtitle) tracks.Add(track);
}
if (info[i].Contains("Language:"))
{
var index = info[i].IndexOf(":", StringComparison.Ordinal) + 1;
track.Language = info[i].Substring(index, (info[i].Length - index)).Trim();
}
if (info[i].Contains("Video track"))
{
track.Type = MkvTrack.TrackType.Video;
}
if (info[i].Contains("Audio track"))
{
track.Type = MkvTrack.TrackType.Audio;
}
if (info[i].Contains("Track type: subtitles"))
{
track.Type = MkvTrack.TrackType.Subtitle;
}
}
}
if (information == null)
{
information = new MkvSegmentInformation();
}
return tracks;
}
}
}
+13 -13
View File
@@ -1,13 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvSegmentInformation
{
public string Title;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvSegmentInformation
{
public string Title;
}
}
+25 -25
View File
@@ -1,25 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvTrack
{
public string Name;
public string Language;
public TrackType Type;
public enum TrackType
{
Video = 1,
Audio = 2,
Subtitle = 3,
Unkown = 0
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class MkvTrack
{
public string Name;
public string Language;
public TrackType Type;
public enum TrackType
{
Video = 1,
Audio = 2,
Subtitle = 3,
Unkown = 0
}
}
}
+44 -44
View File
@@ -1,44 +1,44 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
class MkvWriter
{
public bool WriteMkvMetaData(string commandString)
{
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = commandString
};
if (!CheckFiles())
{
throw new FileNotFoundException("Required files, mkvpropedit.exe and mkvinfo.exe not found.");
}
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
if (process.ExitCode == 0) return true;
var error = File.ReadAllLines("temp.txt");
throw new ApplicationException(error.ToString());
}
public static bool CheckFiles()
{
return File.Exists("mkvpropedit.exe") && File.Exists("mkvinfo.exe");
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
class MkvWriter
{
public bool WriteMkvMetaData(string commandString)
{
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = commandString
};
if (!CheckFiles())
{
throw new FileNotFoundException("Required files, mkvpropedit.exe and mkvinfo.exe not found.");
}
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
if (process.ExitCode == 0) return true;
var error = File.ReadAllLines("temp.txt");
throw new ApplicationException(error.ToString());
}
public static bool CheckFiles()
{
return File.Exists("mkvpropedit.exe") && File.Exists("mkvinfo.exe");
}
}
}
+22 -22
View File
@@ -1,22 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
+36 -36
View File
@@ -1,36 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MKVTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MKVTest")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a750a634-6881-4083-b909-73efe4c96802")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MKVTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MKVTest")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a750a634-6881-4083-b909-73efe4c96802")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
+71 -71
View File
@@ -1,71 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MKVTest.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MKVTest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MKVTest.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MKVTest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
+116 -116
View File
@@ -1,117 +1,117 @@
<?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.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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<?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.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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+30 -30
View File
@@ -1,30 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MKVTest.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MKVTest.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
+7 -7
View File
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+191 -191
View File
@@ -1,191 +1,191 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace MKVTest
{
internal class SerializeMkvInfo
{
public List<string> SerializeFile(string filePath)
{
var file = File.ReadAllLines(filePath);
if (file.Length == 0) return new List<string>();
var lastDepthLevel = 0;
//var xml = new StringBuilder();
var stack = new Stack<XmlTag>();
var xml = new List<string> {"<File>"};
//Create a root node for the file.
var rootNode = new XmlTag()
{
Name = "File"
};
stack.Push(rootNode);
for (var i = 0; i < file.Length; i++)
{
var depth = GetDepth(file[i]);
var tag = CreateTagFromString(file[i], depth);
var padding = new StringBuilder();
for (var j = tag.Depth - 1; j > 0; j--)
{
padding.Append(" ");
}
if (i == file.Length - 1)
{
var t = stack.Pop();
xml.Insert(xml.Count - 1, padding + "<" + t.Name + ">" + t.Value + "</" + t.Name + ">");
xml[xml.Count - 1] = padding + "<" + tag.Name + ">" + tag.Value + "</" + tag.Name + ">";
//Unwind the stack.
xml.AddRange(stack.Select(s => "</" + s.Name + ">"));
continue;
}
if (depth == lastDepthLevel)
{
if (stack.Count != 0)
{
var t = stack.Pop();
xml[xml.Count - 1] = padding + "<" + t.Name + ">" + t.Value + "</" + t.Name + ">";
}
}
else if (depth < lastDepthLevel)
{
//Moving up
if (stack.Count != 0)
{
var t = stack.Pop();
xml[xml.Count - 1] = padding + "<" + t.Name + ">" + t.Value + "</" + t.Name + ">";
var diff = lastDepthLevel - depth;
var subPadding = new StringBuilder();
for (var j = 0; j < diff; j++)
{
subPadding.Clear();
var subTag = stack.Pop();
for (var k = subTag.Depth - 1; k != 0; k--)
{
subPadding.Append(" ");
}
if (stack.Count != 0)
{
xml.Add(subPadding + "</" + subTag.Name + ">");
}
else
{
break;
}
}
}
}
if(tag.Name != string.Empty) xml.Add(padding + "<" + tag.Name + ">");
stack.Push(tag);
lastDepthLevel = depth;
}
//File.WriteAllLines(@"C:\Users\glmcc\Desktop\Test.info", xml);
return xml;
}
private static XmlTag CreateTagFromString(string text, int tagDepth)
{
var tag = new XmlTag();
var clearingPadding = true;
var foundDelimiter = false;
var insideBraces = false;
var name = new StringBuilder();
var value = new StringBuilder();
//var attributes = new List<MkvAttribute>();
for (var i = 0; i < text.Length; i++)
{
if ((char.IsSymbol(text[i]) || char.IsPunctuation(text[i]) || char.IsWhiteSpace(text[i])) && clearingPadding)
{
continue;
}
if ((text[i].ToString() == ":" || text[i] == ',') && !foundDelimiter)
{
foundDelimiter = true;
continue;
}
clearingPadding = false;
if (foundDelimiter)
{
if (text[i] == '(')
{
insideBraces = true;
continue;
}
if (insideBraces && text[i] == ')')
{
insideBraces = false;
continue;
}
if(!insideBraces) value.Append(text[i]);
}
else
{
if (text[i] == '(')
{
insideBraces = true;
continue;
}
if(text[i] == ')')
{
insideBraces = false;
continue;
}
if(!insideBraces) name.Append(text[i]);
}
}
tag.Name = FormatTagName(name.ToString());
tag.Value = value.ToString().Trim();
tag.Depth = tagDepth;
return tag;
}
private static string FormatTagName(string text)
{
if (text.Length == 0) return string.Empty;
var name = new StringBuilder();
var previousCharWasWhiteSpace = false;
foreach (var c in text)
{
if (!char.IsWhiteSpace(c))
{
name.Append(previousCharWasWhiteSpace ? char.ToUpper(c) : c);
previousCharWasWhiteSpace = false;
}
if (char.IsWhiteSpace(c))
{
previousCharWasWhiteSpace = true;
}
}
return name.ToString();
}
private static int GetDepth(string line)
{
if (line.Length == 0) return -1;
var depth = 0;
for (var i = 0; i < line.Length; i++)
{
if (char.IsPunctuation(line[i]) || char.IsWhiteSpace(line[i]) || char.IsSymbol(line[i]))
{
depth++;
}
else
{
break;
}
}
return depth;
}
}
}
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace MKVTest
{
internal class SerializeMkvInfo
{
public List<string> SerializeFile(string filePath)
{
var file = File.ReadAllLines(filePath);
if (file.Length == 0) return new List<string>();
var lastDepthLevel = 0;
//var xml = new StringBuilder();
var stack = new Stack<XmlTag>();
var xml = new List<string> {"<File>"};
//Create a root node for the file.
var rootNode = new XmlTag()
{
Name = "File"
};
stack.Push(rootNode);
for (var i = 0; i < file.Length; i++)
{
var depth = GetDepth(file[i]);
var tag = CreateTagFromString(file[i], depth);
var padding = new StringBuilder();
for (var j = tag.Depth - 1; j > 0; j--)
{
padding.Append(" ");
}
if (i == file.Length - 1)
{
var t = stack.Pop();
xml.Insert(xml.Count - 1, padding + "<" + t.Name + ">" + t.Value + "</" + t.Name + ">");
xml[xml.Count - 1] = padding + "<" + tag.Name + ">" + tag.Value + "</" + tag.Name + ">";
//Unwind the stack.
xml.AddRange(stack.Select(s => "</" + s.Name + ">"));
continue;
}
if (depth == lastDepthLevel)
{
if (stack.Count != 0)
{
var t = stack.Pop();
xml[xml.Count - 1] = padding + "<" + t.Name + ">" + t.Value + "</" + t.Name + ">";
}
}
else if (depth < lastDepthLevel)
{
//Moving up
if (stack.Count != 0)
{
var t = stack.Pop();
xml[xml.Count - 1] = padding + "<" + t.Name + ">" + t.Value + "</" + t.Name + ">";
var diff = lastDepthLevel - depth;
var subPadding = new StringBuilder();
for (var j = 0; j < diff; j++)
{
subPadding.Clear();
var subTag = stack.Pop();
for (var k = subTag.Depth - 1; k != 0; k--)
{
subPadding.Append(" ");
}
if (stack.Count != 0)
{
xml.Add(subPadding + "</" + subTag.Name + ">");
}
else
{
break;
}
}
}
}
if(tag.Name != string.Empty) xml.Add(padding + "<" + tag.Name + ">");
stack.Push(tag);
lastDepthLevel = depth;
}
//File.WriteAllLines(@"C:\Users\glmcc\Desktop\Test.info", xml);
return xml;
}
private static XmlTag CreateTagFromString(string text, int tagDepth)
{
var tag = new XmlTag();
var clearingPadding = true;
var foundDelimiter = false;
var insideBraces = false;
var name = new StringBuilder();
var value = new StringBuilder();
//var attributes = new List<MkvAttribute>();
for (var i = 0; i < text.Length; i++)
{
if ((char.IsSymbol(text[i]) || char.IsPunctuation(text[i]) || char.IsWhiteSpace(text[i])) && clearingPadding)
{
continue;
}
if ((text[i].ToString() == ":" || text[i] == ',') && !foundDelimiter)
{
foundDelimiter = true;
continue;
}
clearingPadding = false;
if (foundDelimiter)
{
if (text[i] == '(')
{
insideBraces = true;
continue;
}
if (insideBraces && text[i] == ')')
{
insideBraces = false;
continue;
}
if(!insideBraces) value.Append(text[i]);
}
else
{
if (text[i] == '(')
{
insideBraces = true;
continue;
}
if(text[i] == ')')
{
insideBraces = false;
continue;
}
if(!insideBraces) name.Append(text[i]);
}
}
tag.Name = FormatTagName(name.ToString());
tag.Value = value.ToString().Trim();
tag.Depth = tagDepth;
return tag;
}
private static string FormatTagName(string text)
{
if (text.Length == 0) return string.Empty;
var name = new StringBuilder();
var previousCharWasWhiteSpace = false;
foreach (var c in text)
{
if (!char.IsWhiteSpace(c))
{
name.Append(previousCharWasWhiteSpace ? char.ToUpper(c) : c);
previousCharWasWhiteSpace = false;
}
if (char.IsWhiteSpace(c))
{
previousCharWasWhiteSpace = true;
}
}
return name.ToString();
}
private static int GetDepth(string line)
{
if (line.Length == 0) return -1;
var depth = 0;
for (var i = 0; i < line.Length; i++)
{
if (char.IsPunctuation(line[i]) || char.IsWhiteSpace(line[i]) || char.IsSymbol(line[i]))
{
depth++;
}
else
{
break;
}
}
return depth;
}
}
}
+15 -15
View File
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class XmlTag
{
public string Name;
public string Value;
public int Depth;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MKVTest
{
class XmlTag
{
public string Name;
public string Value;
public int Depth;
}
}
+7
View File
@@ -0,0 +1,7 @@
A program I slapped together to see if I could perform or automate batch operations on MKV meta-data.
Nothing to complex, all this really is is a 'GUI' for the MKVTools. Keeping this only as a reference
if I decide to revisit this, unlikely as that may be. Again this repo is just for me to preserve some
of my old projects that are now inactive.
Originally this repo existed in BitBucket.