mirror of https://github.com/bmgjet/Ruyi-GUI.git
Add Some Error Checking
This commit is contained in:
parent
9c2a7994a4
commit
48984f7be8
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,326 +1,398 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Ruyi_GUI
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public static List<string> LogMessages = new List<string>();
|
||||
public string PythonCode;
|
||||
public bool DoingJobs = false;
|
||||
public bool Not100 = true;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
PythonCode = Encoding.UTF8.GetString(Convert.FromBase64String(Decompress(Convert.FromBase64String("xRprb+M28nuA/AeeroClrqrdpO0eEEAf0tjZGhdvgiS3/ZAzBMaibG5kUadHNmng/34zJCVRD9vpXoAL0CbivIfD4cxw+ToVWUFEfnjA1Z+FyBarw4MoE2tyNb0genm6pkuml0MeRWXOsrwC2pMyZtmY54uMFexmsWIhLrhErp8mC5YXGY37COOr2Y2IH1k2K+OC5wVLDeKrz+OZ8TkeT5tPR6si1mxJFyKJKlUuceEMFjQCyE3ySGRrQ92zi+mVtOcqE6BaLoA7rn3hORfJTIQs/oMXK4B+ZYsCljSvnEagfQL4uSfdVDGMBQ2Di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47Jj6Q7yoPLjTzB5vdmu3dAOp9LODIZwPBgPbedjdJCZByCDxz/jYd4KOrvlZr2+KROdncf5p6yA7oCODN1uls6aFrMIXqk/QMZcelIUiWzmjzjiktac2iQ15tN2x2d3J7SEi33t3lUH4eKWhJh+sWUhC4++uiAi48+Nl41NZy3orDLpNneTubwevEZRDFddoPZKFW8FQ9DqNAWFEqTKhR6U8nhM7GPzQetXWdYirOt8dXs3btquJUIONqBWTfueHbpFXDDZe2oZjeSJ3pYDfn8s12N4Vejt9eAnO7RYfsL1Zsqgw9a2zVpPXe9qVzsJHYEg9lnfJfcOmJNth1BGKtLBi01hRKtqtM+VQu2miE73pomJeQAnMrb+D+0yqxQ32qqLEtHaDi1IokIlhneNtpLrWcYHy9ku7X0/n1zTKFt8dY84cE9LaDLqPrbH/dhOKS+STTXv/nkSGXbI33ZJ/VzkWt+qDGS0Xtozww+ZjX52tXlJvxhyvXND3z6qpOsb7dSo1MX/JhUg/q2dPXf+jEBcu2fPLXlpS1HsPrlAgr5u7njEgOg72IFcczGoKn4muc8Y5u3CdfXgi46pSXGpN3oRqEvW6fF4FS3N9ycuz26XSPdrfPOAT7DY92BoedeHbbz6E0KTV71zHCXQ7rz0F0Mdnpm26x0v0Y98/qT09drtZ3ZTl91skLr2DRYK+NJza9qiwasiowKrIqdBlqnSAmtv0yMkocU7itIrVQG9yJamoaX64AnEcuYxJFvnljvwe+uJaTWwswzRi+BHqgw/X7+GRqhSczmsxozOZ56S/9/5A/zHwS8LoPUD/XqtgMe1awFLhC8Ve3eQ75qndtkkM5HI60TMFjTBwb0ud3Cgpz8BBVYIB587MeAT/efHtgqjbmkJ9QlUZr7x784/wU="))));
|
||||
if (File.Exists("Config.cfg")) { LoadSettings(File.ReadAllText("Config.cfg")); }
|
||||
else
|
||||
{
|
||||
FrameRate.SelectedIndex = 0;
|
||||
AspectRatio.SelectedIndex = 0;
|
||||
Resolution.SelectedIndex = 0;
|
||||
Direction.SelectedIndex = 0;
|
||||
Motion.SelectedIndex = 0;
|
||||
Scheduler.SelectedIndex = 0;
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private string SettingsString() { return Img1.Text + "|" + Img2.Text + "|" + VideoOut.Text + "|" + FrameRate.SelectedIndex + "|" + AspectRatio.SelectedIndex + "|" + Resolution.SelectedIndex + "|" + Direction.SelectedIndex + "|" + Motion.SelectedIndex + "|" + GPUOffload.Text + "|" + LowMemoryMode.Checked + "|" + Steps.Text + "|" + Cfg.Text + "|" + Seed.Text + "|" + Scheduler.SelectedIndex; }
|
||||
|
||||
private void SaveSettings() { File.WriteAllText("Config.cfg", SettingsString()); }
|
||||
|
||||
private void LoadSettings(string Settings)
|
||||
{
|
||||
string[] SSettings = Settings.Split('|');
|
||||
Img1.Text = SSettings[0];
|
||||
Img2.Text = SSettings[1];
|
||||
VideoOut.Text = SSettings[2];
|
||||
FrameRate.SelectedIndex = int.Parse(SSettings[3]);
|
||||
AspectRatio.SelectedIndex = int.Parse(SSettings[4]);
|
||||
Resolution.SelectedIndex = int.Parse(SSettings[5]);
|
||||
Direction.SelectedIndex = int.Parse(SSettings[6]);
|
||||
Motion.SelectedIndex = int.Parse(SSettings[7]);
|
||||
GPUOffload.Text = SSettings[8];
|
||||
LowMemoryMode.Checked = bool.Parse(SSettings[9]);
|
||||
Steps.Text = SSettings[10];
|
||||
Cfg.Text = SSettings[11];
|
||||
Seed.Text = SSettings[12];
|
||||
Scheduler.SelectedIndex = int.Parse(SSettings[13]);
|
||||
if (File.Exists(Img1.Text)) { pictureBox1.BackgroundImage = new Bitmap(Img1.Text); }
|
||||
if (File.Exists(Img2.Text)) { pictureBox2.BackgroundImage = new Bitmap(Img2.Text); }
|
||||
else { pictureBox2.BackgroundImage = null; }
|
||||
}
|
||||
|
||||
private string GetTimestamp()
|
||||
{
|
||||
DateTime currentTime = DateTime.UtcNow;
|
||||
long unixTime = ((DateTimeOffset)currentTime).ToUnixTimeSeconds();
|
||||
return unixTime.ToString();
|
||||
}
|
||||
|
||||
private void AppendTextBox(string value)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
this.Invoke(new Action<string>(AppendTextBox), new object[] { value });
|
||||
return;
|
||||
}
|
||||
this.Text = "Ruyi-GUI " + value;
|
||||
}
|
||||
|
||||
private string AssemblyDirectory()
|
||||
{
|
||||
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
|
||||
UriBuilder uri = new UriBuilder(codeBase);
|
||||
string path = Uri.UnescapeDataString(uri.Path);
|
||||
return Path.GetDirectoryName(path);
|
||||
}
|
||||
|
||||
public byte[] GetHash(string inputString)
|
||||
{
|
||||
using (HashAlgorithm algorithm = SHA256.Create()) { return algorithm.ComputeHash(Encoding.UTF8.GetBytes(inputString)); }
|
||||
}
|
||||
|
||||
public string GetHashString(string inputString)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (byte b in GetHash(inputString)) { sb.Append(b.ToString("X2")); }
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void LogFiltered(string message)
|
||||
{
|
||||
if (string.IsNullOrEmpty(message)) { return; }
|
||||
LogMessages.Add(message);
|
||||
if (message.Contains("%")) { AppendTextBox(message); }
|
||||
if (message.Contains("100%") && Not100) { Not100 = false; return; }
|
||||
if (message.Contains("100%"))
|
||||
{
|
||||
Not100 = true;
|
||||
AppendTextBox("Saving Mp4...");
|
||||
GenerateButton.BeginInvoke(new Action(() => { GenerateButton.Enabled = true; }));
|
||||
panel1.BeginInvoke(new Action(() => { panel1.Enabled = true; }));
|
||||
if (DoingJobs)
|
||||
{
|
||||
while (!File.Exists(VideoOut.Text)) { Thread.Sleep(1000); }
|
||||
DoingJobs = false;
|
||||
string Job = Path.Combine("Jobs", JobList.Items[0].ToString());
|
||||
if (File.Exists(Job)) { File.Delete(Job); }
|
||||
JobList.Items.RemoveAt(0);
|
||||
return;
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (!File.Exists(VideoOut.Text)) { Thread.Sleep(1000); }
|
||||
AppendTextBox("");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static string Decompress(byte[] data)
|
||||
{
|
||||
MemoryStream input = new MemoryStream(data);
|
||||
MemoryStream output = new MemoryStream();
|
||||
using (DeflateStream dstream = new DeflateStream(input, CompressionMode.Decompress))
|
||||
{
|
||||
dstream.CopyTo(output);
|
||||
}
|
||||
return Convert.ToBase64String(output.ToArray());
|
||||
}
|
||||
|
||||
private void GenerateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(VideoOut.Text)) { MessageBox.Show("You Must Select A Video Output", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
|
||||
if (string.IsNullOrEmpty(Img1.Text)) { MessageBox.Show("You Must Select A Input Image", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
|
||||
ExecuteCommand();
|
||||
}
|
||||
|
||||
private void ExecuteCommand()
|
||||
{
|
||||
string Image2 = string.IsNullOrEmpty(Img2.Text) ? "None" : @"""" + Img2.Text.Replace(@"\", @"\\") + @"""";
|
||||
string CallCode = PythonCode.Replace("{$IMAGE1}", Img1.Text.Replace(@"\", @"\\")).Replace("{$IMAGE2}", Image2).Replace("{$VIDEO}", VideoOut.Text.Replace(@"\", @"\\")).Replace("{$FRAMES}", FrameRate.Text).Replace("{$RES}", Resolution.Text).Replace("{$ASPECT}", AspectRatio.Text).Replace("{$MOTION}", Motion.Text).Replace("{$DIRECTION}", Direction.Text).Replace("{$STEPS}", Steps.Text).Replace("{$CFG}", Cfg.Text).Replace("{$SCHEDULER}", Scheduler.Text).Replace("{$LOWMEM}", LowMemoryMode.Checked.ToString()).Replace("{$OFFLOAD}", GPUOffload.Text).Replace("{$SEED}", Seed.Text);
|
||||
File.WriteAllText(Path.Combine("Ruyi-Models", "i2v.py"), CallCode);
|
||||
if (File.Exists(VideoOut.Text)) { File.Move(VideoOut.Text, VideoOut.Text.Replace(".mp4", "-" + GetTimestamp() + ".mp4")); }
|
||||
Task.Run(() =>
|
||||
{
|
||||
GenerateButton.BeginInvoke(new Action(() => { GenerateButton.Enabled = false; }));
|
||||
panel1.BeginInvoke(new Action(() => { panel1.Enabled = false; }));
|
||||
AppendTextBox("Loading AI Please Wait...");
|
||||
var processInfo = new ProcessStartInfo("cmd.exe", "/c call " + Path.Combine(AssemblyDirectory(), "environment.bat") + " && cd " + Path.Combine(AssemblyDirectory(), "Ruyi-Models") + " && python i2v.py %*");
|
||||
processInfo.CreateNoWindow = true;
|
||||
processInfo.UseShellExecute = false;
|
||||
processInfo.RedirectStandardError = true;
|
||||
processInfo.RedirectStandardOutput = true;
|
||||
var process = Process.Start(processInfo);
|
||||
process.OutputDataReceived += (object sender, DataReceivedEventArgs e) => LogFiltered(e.Data);
|
||||
process.BeginOutputReadLine();
|
||||
process.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => LogFiltered(e.Data);
|
||||
process.BeginErrorReadLine();
|
||||
process.WaitForExit();
|
||||
process.Close();
|
||||
});
|
||||
}
|
||||
|
||||
private string SelectImageButton()
|
||||
{
|
||||
string path = "";
|
||||
var dialog = new OpenFileDialog();
|
||||
dialog.Title = "Open Image";
|
||||
dialog.Filter = "Image Files (*.jpg;*.jpeg,*.png)|*.JPG;*.JPEG;*.PNG";
|
||||
if (dialog.ShowDialog() == DialogResult.OK) { path = dialog.FileName; }
|
||||
dialog.Dispose();
|
||||
return path;
|
||||
}
|
||||
|
||||
private void SelectImg1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Img1.Text = SelectImageButton();
|
||||
if (string.IsNullOrEmpty(Img1.Text))
|
||||
{
|
||||
pictureBox1.BackgroundImage = null;
|
||||
return;
|
||||
}
|
||||
pictureBox1.BackgroundImage = new Bitmap(Img1.Text);
|
||||
}
|
||||
|
||||
private void SelectImg2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Img2.Text = SelectImageButton();
|
||||
if (string.IsNullOrEmpty(Img2.Text))
|
||||
{
|
||||
pictureBox2.BackgroundImage = null;
|
||||
return;
|
||||
}
|
||||
pictureBox2.BackgroundImage = new Bitmap(Img2.Text);
|
||||
}
|
||||
|
||||
private void SelectVideoOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
|
||||
saveFileDialog1.Filter = "Video Output|*.mp4";
|
||||
saveFileDialog1.Title = "Save an Video File";
|
||||
saveFileDialog1.ShowDialog();
|
||||
VideoOut.Text = saveFileDialog1.FileName;
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { SaveSettings(); }
|
||||
|
||||
private void PlayVideo_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(VideoOut.Text))
|
||||
{
|
||||
System.Diagnostics.Process.Start(VideoOut.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(VideoOut.Text)) { PlayVideo.Enabled = true; }
|
||||
else { PlayVideo.Enabled = false; }
|
||||
if (LogMessages.Count > 0)
|
||||
{
|
||||
File.AppendAllLines("log.txt", LogMessages);
|
||||
LogMessages.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddJob_Click(object sender, EventArgs e)
|
||||
{
|
||||
string Settings = SettingsString();
|
||||
string Job = GetHashString(Settings);
|
||||
if (JobList.Items.Contains(Job)) { return; }
|
||||
if (!Directory.Exists("Jobs")) { Directory.CreateDirectory("Jobs"); }
|
||||
File.WriteAllText(Path.Combine("Jobs", Job), Settings);
|
||||
JobList.Items.Add(Job);
|
||||
}
|
||||
|
||||
private void RemoveJob_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (JobList.SelectedIndex == -1) return;
|
||||
string Job = Path.Combine("Jobs", JobList.Items[JobList.SelectedIndex].ToString());
|
||||
if (File.Exists(Job)) { File.Delete(Job); }
|
||||
JobList.Items.RemoveAt(JobList.SelectedIndex);
|
||||
}
|
||||
|
||||
private void RunJobs_Click(object sender, EventArgs e)
|
||||
{
|
||||
timer2.Enabled = true;
|
||||
RunJobs.Enabled = false;
|
||||
JobList.Enabled = false;
|
||||
AddJob.Enabled = false;
|
||||
RemoveJob.Enabled = false;
|
||||
JobList.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
private void timer2_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (DoingJobs) { return; }
|
||||
if (JobList.Items.Count > 0)
|
||||
{
|
||||
DoingJobs = true;
|
||||
UpdateJobList(true);
|
||||
this.Update();
|
||||
ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
AppendTextBox("");
|
||||
RunJobs.Enabled = true;
|
||||
JobList.Enabled = true;
|
||||
AddJob.Enabled = true;
|
||||
RemoveJob.Enabled = true;
|
||||
timer2.Enabled = false;
|
||||
DoingJobs = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateJobList(bool Force = false)
|
||||
{
|
||||
if (JobList.SelectedIndex == -1 && !Force) { return; }
|
||||
int index = (JobList.SelectedIndex == -1) ? 0 : JobList.SelectedIndex;
|
||||
if (File.Exists(Path.Combine("Jobs", JobList.Items[index].ToString())))
|
||||
{
|
||||
LoadSettings(File.ReadAllText(Path.Combine("Jobs", JobList.Items[index].ToString())));
|
||||
}
|
||||
}
|
||||
|
||||
private void JobList_SelectedIndexChanged(object sender, EventArgs e) { UpdateJobList(); }
|
||||
|
||||
private void Batch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Width == 810) { this.Width = 575; JobList.Items.Clear(); }
|
||||
else
|
||||
{
|
||||
if (Directory.Exists("Jobs"))
|
||||
{
|
||||
DirectoryInfo d = new DirectoryInfo("Jobs");
|
||||
FileInfo[] Files = d.GetFiles("*"); //Getting Text files
|
||||
foreach (FileInfo file in Files)
|
||||
{
|
||||
if (file.Name.Length == 64)
|
||||
{
|
||||
if (!JobList.Items.Contains(file.Name))
|
||||
{
|
||||
JobList.Items.Add(file.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.Width = 810;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Ruyi_GUI
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public static List<string> LogMessages = new List<string>();
|
||||
public string PythonCode;
|
||||
public bool DoingJobs = false;
|
||||
public bool Not100 = true;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
PythonCode = Encoding.UTF8.GetString(Convert.FromBase64String(Decompress(Convert.FromBase64String("xRprb+M28nuA/AeeroClrqrdpO0eEEAf0tjZGhdvgiS3/ZAzBMaibG5kUadHNmng/34zJCVRD9vpXoAL0CbivIfD4cxw+ToVWUFEfnjA1Z+FyBarw4MoE2tyNb0genm6pkuml0MeRWXOsrwC2pMyZtmY54uMFexmsWIhLrhErp8mC5YXGY37COOr2Y2IH1k2K+OC5wVLDeKrz+OZ8TkeT5tPR6si1mxJFyKJKlUuceEMFjQCyE3ySGRrQ92zi+mVtOcqE6BaLoA7rn3hORfJTIQs/oMXK4B+ZYsCljSvnEagfQL4uSfdVDGMBQ2DiMeM0Fx9GKiaeFUulzxZRnTBglV5X5HmCU3zlSiCUHxLkFSjZ+Uz90JaUO++XDywAjiuUzC8oju9uZqc3QbXp7fTy+DXo2OXLAFpEYscfB1kFNQ2Oa3RqNyjZSFYsoCPLAAHPPKi5tdA/nkxk6ABesObP4cV6e9l8lzS5NaAjaUTTQYpT1nME1b/EeBywJOU8qTW4hrWpmrpSuOZTMqCgxKxyGgg/6zIQOSSBbjukjJpvvq0LTL0GMc4CAoRPPKQiSCmsGuFC1v9yNRSHiwzDruSFzSr0FNarAj8+MR6+WE6O/00OdpYhwcsCTsIiKIxjjeHB6Is0r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tLBi01hRKtqtM+VQu2miE73pomJeQAnMrb+D+0yqxQ32qqLEtHaDi1IokIlhneNtpLrWcYHy9ku7X0/n1zTKFt8dY84cE9LaDLqPrbH/dhOKS+STTXv/nkSGXbI33ZJ/VzkWt+qDGS0Xtozww+ZjX52tXlJvxhyvXND3z6qpOsb7dSo1MX/JhUg/q2dPXf+jEBcu2fPLXlpS1HsPrlAgr5u7njEgOg72IFcczGoKn4muc8Y5u3CdfXgi46pSXGpN3oRqEvW6fF4FS3N9ycuz26XSPdrfPOAT7DY92BoedeHbbz6E0KTV71zHCXQ7rz0F0Mdnpm26x0v0Y98/qT09drtZ3ZTl91skLr2DRYK+NJza9qiwasiowKrIqdBlqnSAmtv0yMkocU7itIrVQG9yJamoaX64AnEcuYxJFvnljvwe+uJaTWwswzRi+BHqgw/X7+GRqhSczmsxozOZ56S/9/5A/zHwS8LoPUD/XqtgMe1awFLhC8Ve3eQ75qndtkkM5HI60TMFjTBwb0ud3Cgpz8BBVYIB587MeAT/efHtgqjbmkJ9QlUZr7x784/wU="))));
|
||||
if (File.Exists("Config.cfg")) { LoadSettings(File.ReadAllText("Config.cfg")); }
|
||||
else { SaveSettings(); }
|
||||
if(!File.Exists("environment.bat"))
|
||||
{
|
||||
MessageBox.Show("environment.bat file missing, Is this exe being ran from Forge Install folder?","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private string SettingsString() { return Img1.Text + "|" + Img2.Text + "|" + VideoOut.Text + "|" + FrameRate.Text + "|" + AspectRatio.Text + "|" + Resolution.Text + "|" + Direction.Text + "|" + Motion.Text + "|" + GPUOffload.Text + "|" + LowMemoryMode.Checked + "|" + Steps.Text + "|" + Cfg.Text + "|" + Seed.Text + "|" + Scheduler.Text + "|" + VideoRes.Text + "|" + Loratxt.Text + "|" + Weighttxt.Text; }
|
||||
|
||||
private void SaveSettings() { File.WriteAllText("Config.cfg", SettingsString()); }
|
||||
|
||||
private void LoadSettings(string Settings)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] SSettings = Settings.Split('|');
|
||||
Img1.Text = SSettings[0];
|
||||
Img2.Text = SSettings[1];
|
||||
VideoOut.Text = SSettings[2];
|
||||
FrameRate.Text = SSettings[3];
|
||||
AspectRatio.Text = SSettings[4];
|
||||
Resolution.Text = SSettings[5];
|
||||
Direction.Text = SSettings[6];
|
||||
Motion.Text = SSettings[7];
|
||||
GPUOffload.Text = SSettings[8];
|
||||
LowMemoryMode.Checked = bool.Parse(SSettings[9]);
|
||||
Steps.Text = SSettings[10];
|
||||
Cfg.Text = SSettings[11];
|
||||
Seed.Text = SSettings[12];
|
||||
Scheduler.Text = SSettings[13];
|
||||
VideoRes.Text = SSettings[14];
|
||||
Loratxt.Text = SSettings[15];
|
||||
Weighttxt.Text = SSettings[16];
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Fault loading Config.cfg, Maybe Try Delete it so it can regenerate.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
if (File.Exists(Img1.Text)) { pictureBox1.BackgroundImage = new Bitmap(Img1.Text); }
|
||||
if (File.Exists(Img2.Text)) { pictureBox2.BackgroundImage = new Bitmap(Img2.Text); }
|
||||
else { pictureBox2.BackgroundImage = null; }
|
||||
}
|
||||
|
||||
private string GetTimestamp()
|
||||
{
|
||||
DateTime currentTime = DateTime.UtcNow;
|
||||
long unixTime = ((DateTimeOffset)currentTime).ToUnixTimeSeconds();
|
||||
return unixTime.ToString();
|
||||
}
|
||||
|
||||
private void AppendTextBox(string value)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
this.Invoke(new Action<string>(AppendTextBox), new object[] { value });
|
||||
return;
|
||||
}
|
||||
this.Text = "Ruyi-GUI " + value;
|
||||
}
|
||||
|
||||
private string AssemblyDirectory()
|
||||
{
|
||||
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
|
||||
UriBuilder uri = new UriBuilder(codeBase);
|
||||
string path = Uri.UnescapeDataString(uri.Path);
|
||||
return Path.GetDirectoryName(path);
|
||||
}
|
||||
|
||||
public byte[] GetHash(string inputString)
|
||||
{
|
||||
using (HashAlgorithm algorithm = SHA256.Create()) { return algorithm.ComputeHash(Encoding.UTF8.GetBytes(inputString)); }
|
||||
}
|
||||
|
||||
public string GetHashString(string inputString)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (byte b in GetHash(inputString)) { sb.Append(b.ToString("X2")); }
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void LogFiltered(string message)
|
||||
{
|
||||
if (string.IsNullOrEmpty(message)) { return; }
|
||||
LogMessages.Add(message);
|
||||
if (message.Contains("%")) { AppendTextBox(message); }
|
||||
if (message.Contains("100%") && Not100) { Not100 = false; return; }
|
||||
if (message.Contains("100%"))
|
||||
{
|
||||
Not100 = true;
|
||||
AppendTextBox("Saving Mp4...");
|
||||
GenerateButton.BeginInvoke(new Action(() => { GenerateButton.Enabled = true; }));
|
||||
panel1.BeginInvoke(new Action(() => { panel1.Enabled = true; }));
|
||||
if (DoingJobs)
|
||||
{
|
||||
while (!File.Exists(VideoOut.Text)) { Thread.Sleep(1000); }
|
||||
DoingJobs = false;
|
||||
string Job = Path.Combine("Jobs", JobList.Items[0].ToString());
|
||||
if (File.Exists(Job)) { File.Delete(Job); }
|
||||
JobList.Items.RemoveAt(0);
|
||||
return;
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (!File.Exists(VideoOut.Text)) { Thread.Sleep(1000); }
|
||||
AppendTextBox("");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static string Decompress(byte[] data)
|
||||
{
|
||||
MemoryStream input = new MemoryStream(data);
|
||||
MemoryStream output = new MemoryStream();
|
||||
using (DeflateStream dstream = new DeflateStream(input, CompressionMode.Decompress))
|
||||
{
|
||||
dstream.CopyTo(output);
|
||||
}
|
||||
return Convert.ToBase64String(output.ToArray());
|
||||
}
|
||||
|
||||
private void GenerateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ValidateInOut())
|
||||
{
|
||||
if (this.Width == 810) { this.Width = 575; JobList.Items.Clear(); }
|
||||
ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecuteCommand()
|
||||
{
|
||||
if (!Directory.Exists("Ruyi-Models"))
|
||||
{
|
||||
MessageBox.Show("Missing Ruyi-Models Folder", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
string Image2 = string.IsNullOrEmpty(Img2.Text) ? "None" : @"""" + Img2.Text.Replace(@"\", @"\\") + @"""";
|
||||
string Lora = string.IsNullOrEmpty(Loratxt.Text) ? "None" : @"""" + Loratxt.Text.Replace(@"\", @"\\") + @"""";
|
||||
string CallCode = PythonCode.Replace("{$IMAGE1}", Img1.Text.Replace(@"\", @"\\")).Replace("{$IMAGE2}", Image2).Replace("{$VIDEO}", VideoOut.Text.Replace(@"\", @"\\")).Replace("{$FRAMES}", FrameRate.Text).Replace("{$RES}", Resolution.Text).Replace("{$ASPECT}", AspectRatio.Text).Replace("{$MOTION}", Motion.Text).Replace("{$DIRECTION}", Direction.Text).Replace("{$STEPS}", Steps.Text).Replace("{$CFG}", Cfg.Text).Replace("{$SCHEDULER}", Scheduler.Text).Replace("{$LOWMEM}", LowMemoryMode.Checked.ToString()).Replace("{$OFFLOAD}", GPUOffload.Text).Replace("{$SEED}", Seed.Text).Replace("video_size = None", "video_size = " + VideoRes.Text.Replace("auto","None")).Replace("lora_path = None", "lora_path = " + Lora).Replace("lora_weight = 1.0", "lora_weight = " + Weighttxt.Text);
|
||||
File.WriteAllText(Path.Combine("Ruyi-Models", "i2v.py"), CallCode);
|
||||
if (File.Exists(VideoOut.Text)) { File.Move(VideoOut.Text, VideoOut.Text.Replace(".mp4", "-" + GetTimestamp() + ".mp4")); }
|
||||
Task.Run(() =>
|
||||
{
|
||||
GenerateButton.BeginInvoke(new Action(() => { GenerateButton.Enabled = false; }));
|
||||
panel1.BeginInvoke(new Action(() => { panel1.Enabled = false; }));
|
||||
AppendTextBox("Loading AI Please Wait...");
|
||||
var processInfo = new ProcessStartInfo("cmd.exe", "/c call " + Path.Combine(AssemblyDirectory(), "environment.bat") + " && cd " + Path.Combine(AssemblyDirectory(), "Ruyi-Models") + " && python i2v.py %*");
|
||||
processInfo.CreateNoWindow = true;
|
||||
processInfo.UseShellExecute = false;
|
||||
processInfo.RedirectStandardError = true;
|
||||
processInfo.RedirectStandardOutput = true;
|
||||
var process = Process.Start(processInfo);
|
||||
process.OutputDataReceived += (object sender, DataReceivedEventArgs e) => LogFiltered(e.Data);
|
||||
process.BeginOutputReadLine();
|
||||
process.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => LogFiltered(e.Data);
|
||||
process.BeginErrorReadLine();
|
||||
process.WaitForExit();
|
||||
process.Close();
|
||||
});
|
||||
}
|
||||
|
||||
private string SelectImageButton()
|
||||
{
|
||||
string path = "";
|
||||
var dialog = new OpenFileDialog();
|
||||
dialog.Title = "Open Image";
|
||||
dialog.Filter = "Image Files (*.jpg;*.jpeg,*.png)|*.JPG;*.JPEG;*.PNG";
|
||||
if (dialog.ShowDialog() == DialogResult.OK) { path = dialog.FileName; }
|
||||
dialog.Dispose();
|
||||
return path;
|
||||
}
|
||||
|
||||
private void SelectImg1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Img1.Text = SelectImageButton();
|
||||
if (string.IsNullOrEmpty(Img1.Text))
|
||||
{
|
||||
pictureBox1.BackgroundImage = null;
|
||||
return;
|
||||
}
|
||||
pictureBox1.BackgroundImage = new Bitmap(Img1.Text);
|
||||
}
|
||||
|
||||
private void SelectImg2_Click(object sender, EventArgs e)
|
||||
{
|
||||
Img2.Text = SelectImageButton();
|
||||
if (string.IsNullOrEmpty(Img2.Text))
|
||||
{
|
||||
pictureBox2.BackgroundImage = null;
|
||||
return;
|
||||
}
|
||||
pictureBox2.BackgroundImage = new Bitmap(Img2.Text);
|
||||
}
|
||||
|
||||
private void SelectVideoOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
|
||||
saveFileDialog1.Filter = "Video Output|*.mp4";
|
||||
saveFileDialog1.Title = "Save an Video File";
|
||||
saveFileDialog1.ShowDialog();
|
||||
VideoOut.Text = saveFileDialog1.FileName;
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { SaveSettings(); }
|
||||
|
||||
private void PlayVideo_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(VideoOut.Text))
|
||||
{
|
||||
System.Diagnostics.Process.Start(VideoOut.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(VideoOut.Text)) { PlayVideo.Enabled = true; }
|
||||
else { PlayVideo.Enabled = false; }
|
||||
if (LogMessages.Count > 0)
|
||||
{
|
||||
File.AppendAllLines("log.txt", LogMessages);
|
||||
LogMessages.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private bool ValidateInOut()
|
||||
{
|
||||
if (string.IsNullOrEmpty(VideoOut.Text)) { MessageBox.Show("You Must Select A Video Output", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Img1.Text)) { MessageBox.Show("You Must Select A Input Image", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(FrameRate.Text)) { MessageBox.Show("Frame Rate Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(AspectRatio.Text)) { MessageBox.Show("Aspect Ratio Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Resolution.Text)) { MessageBox.Show("Resolution Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Direction.Text)) { MessageBox.Show("Direction Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Motion.Text)) { MessageBox.Show("Motion Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(VideoRes.Text)) { MessageBox.Show("Mp4 Resolution Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(GPUOffload.Text)) { MessageBox.Show("GPU Offload Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Steps.Text)) { MessageBox.Show("Steps Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Cfg.Text)) { MessageBox.Show("Cfg Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Seed.Text)) { MessageBox.Show("Seed Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Scheduler.Text)) { MessageBox.Show("Scheduler Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (string.IsNullOrEmpty(Weighttxt.Text)) { MessageBox.Show("Lora Weight Can't Be Null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if(!AspectRatio.Text.Contains(":")){ MessageBox.Show("Aspect Ratio Not Valid Format", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
if (!VideoRes.Text.Contains(", ") && !VideoRes.Text.Contains("None")) { MessageBox.Show("Mp4 Resolution Not Valid Format", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
private void AddJob_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ValidateInOut())
|
||||
{
|
||||
string Settings = SettingsString();
|
||||
string Job = GetHashString(Settings);
|
||||
if (JobList.Items.Contains(Job)) { return; }
|
||||
if (!Directory.Exists("Jobs")) { Directory.CreateDirectory("Jobs"); }
|
||||
File.WriteAllText(Path.Combine("Jobs", Job), Settings);
|
||||
JobList.Items.Add(Job);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveJob_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (JobList.SelectedIndex == -1) return;
|
||||
string Job = Path.Combine("Jobs", JobList.Items[JobList.SelectedIndex].ToString());
|
||||
if (File.Exists(Job)) { File.Delete(Job); }
|
||||
JobList.Items.RemoveAt(JobList.SelectedIndex);
|
||||
}
|
||||
|
||||
private void RunJobs_Click(object sender, EventArgs e)
|
||||
{
|
||||
timer2.Enabled = true;
|
||||
RunJobs.Enabled = false;
|
||||
JobList.Enabled = false;
|
||||
AddJob.Enabled = false;
|
||||
RemoveJob.Enabled = false;
|
||||
JobList.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
private void timer2_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (DoingJobs) { return; }
|
||||
if (JobList.Items.Count > 0)
|
||||
{
|
||||
DoingJobs = true;
|
||||
UpdateJobList(true);
|
||||
this.Update();
|
||||
ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
AppendTextBox("");
|
||||
RunJobs.Enabled = true;
|
||||
JobList.Enabled = true;
|
||||
AddJob.Enabled = true;
|
||||
RemoveJob.Enabled = true;
|
||||
timer2.Enabled = false;
|
||||
DoingJobs = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateJobList(bool Force = false)
|
||||
{
|
||||
if (JobList.SelectedIndex == -1 && !Force) { return; }
|
||||
int index = (JobList.SelectedIndex == -1) ? 0 : JobList.SelectedIndex;
|
||||
if (File.Exists(Path.Combine("Jobs", JobList.Items[index].ToString())))
|
||||
{
|
||||
LoadSettings(File.ReadAllText(Path.Combine("Jobs", JobList.Items[index].ToString())));
|
||||
}
|
||||
}
|
||||
|
||||
private void JobList_SelectedIndexChanged(object sender, EventArgs e) { UpdateJobList(); }
|
||||
|
||||
private void Batch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Width == 810) { this.Width = 575; JobList.Items.Clear(); GenerateButton.Enabled = true; }
|
||||
else
|
||||
{
|
||||
GenerateButton.Enabled = false;
|
||||
if (Directory.Exists("Jobs"))
|
||||
{
|
||||
DirectoryInfo d = new DirectoryInfo("Jobs");
|
||||
FileInfo[] Files = d.GetFiles("*"); //Getting Text files
|
||||
foreach (FileInfo file in Files)
|
||||
{
|
||||
if (file.Name.Length == 64)
|
||||
{
|
||||
if (!JobList.Items.Contains(file.Name))
|
||||
{
|
||||
JobList.Items.Add(file.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.Width = 810;
|
||||
}
|
||||
}
|
||||
|
||||
private void AspectRatio_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar) && e.KeyChar != ':';
|
||||
}
|
||||
|
||||
private void NumberOnly(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
|
||||
}
|
||||
|
||||
private void Cfg_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar) && e.KeyChar != '.';
|
||||
}
|
||||
|
||||
private void NumberAndAuto(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar) && e.KeyChar != 'a' && e.KeyChar != 'u' && e.KeyChar != 't' && e.KeyChar != 'o';
|
||||
}
|
||||
|
||||
private void VideoRes_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar) && e.KeyChar != ',' && e.KeyChar != ' ' && e.KeyChar != 'N' && e.KeyChar != 'o' && e.KeyChar != 'n' && e.KeyChar != 'e' && e.KeyChar != 'a' && e.KeyChar != 'u' && e.KeyChar != 't';
|
||||
}
|
||||
|
||||
private void LoraButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog();
|
||||
dialog.Title = "Select Lora File";
|
||||
dialog.Filter = "safetensors (*.safetensors)|*.safetensors";
|
||||
if (dialog.ShowDialog() == DialogResult.OK) { Loratxt.Text = dialog.FileName; }
|
||||
dialog.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,203 +1,203 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>105, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVEgwAaVVVADEp
|
||||
JQg2LSoXNi4sGjQtKxozKykbMSknHC4nJR4tJSMfLCQhHi0kIB0tJCAeLCMgHywjHx0qIh4d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||||
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB/AA
|
||||
AA/wAAAP+AAAH/wAAH////////////////8=
|
||||
</value>
|
||||
</data>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>105, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVEgwAaVVVADEp
|
||||
JQg2LSoXNi4sGjQtKxozKykbMSknHC4nJR4tJSMfLCQhHi0kIB0tJCAeLCMgHywjHx0qIh4dJx8bFyAb
|
||||
FwZCNjMACAcDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtKSIAQzc1ADsy
|
||||
LRg+NDFrQDYytj41MtY7MzDaOjEw2zkwLts5Ly3cNy0r3TUrKd4zKSfeMygl3TMoJN4yJyTfMick3jEn
|
||||
JN0xJy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