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