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
+44 -44
View File
@@ -1,44 +1,44 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
class MkvWriter
{
public bool WriteMkvMetaData(string commandString)
{
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = commandString
};
if (!CheckFiles())
{
throw new FileNotFoundException("Required files, mkvpropedit.exe and mkvinfo.exe not found.");
}
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
if (process.ExitCode == 0) return true;
var error = File.ReadAllLines("temp.txt");
throw new ApplicationException(error.ToString());
}
public static bool CheckFiles()
{
return File.Exists("mkvpropedit.exe") && File.Exists("mkvinfo.exe");
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MKVTest
{
class MkvWriter
{
public bool WriteMkvMetaData(string commandString)
{
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = "cmd.exe",
Arguments = commandString
};
if (!CheckFiles())
{
throw new FileNotFoundException("Required files, mkvpropedit.exe and mkvinfo.exe not found.");
}
process.StartInfo = startInfo;
process.Start();
while (!process.HasExited)
{
}
if (process.ExitCode == 0) return true;
var error = File.ReadAllLines("temp.txt");
throw new ApplicationException(error.ToString());
}
public static bool CheckFiles()
{
return File.Exists("mkvpropedit.exe") && File.Exists("mkvinfo.exe");
}
}
}