Skip to content

Instantly share code, notes, and snippets.

@ImranCS ImranCS/QGenLite.cs
Created Jul 9, 2014

Embed
What would you like to do?
static void Main()
{
start:
var ofd = new OpenFileDialog { InitialDirectory = path };
if (ofd.ShowDialog() == DialogResult.Cancel)
{
MessageBox.Show("Nothing selected. exiting");
return;
}
var fmt = File.ReadAllText(ofd.FileName);
var lines = File.ReadAllLines(Path.Combine(path, "fields.txt"));
var op = string.Empty;
foreach (var line in lines)
{
op += string.Format(fmt, line.Split(' ')).Replace("<<", "{").Replace(">>", "}");
}
var file = Path.ChangeExtension(ofd.FileName, "gen.txt");
File.WriteAllText(file, op);
System.Diagnostics.Process.Start(file);
if (MessageBox.Show("Again?", "Cselian Ivy AIO Lite", MessageBoxButtons.YesNo) == DialogResult.Yes)
goto start;
}
@ImranCS

This comment has been minimized.

Copy link
Owner Author

commented Jul 9, 2014

See screenshots here
http://ivy.cselian.com/aio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.