Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Commit

Permalink
Better submission proccess for V2.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Szefo09 committed Jan 10, 2019
1 parent c6f0447 commit 12375c4
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion YgoProPatcher/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,33 @@ private void FormSubmitButton_click(object sender, EventArgs e)
{
try
{
System.Diagnostics.Process.Start(Data.FormLink);
FileInfo config = new FileInfo(Path.Combine(YgoPro2Path.Text, "config", "config.conf"));
if (config.Exists)
{
using (StreamReader text = File.OpenText(config.FullName))
{
string line;
while ((line = text.ReadLine()) != null){
if (line.Contains("name->"))
{
line =line.Remove(0, 6);
int psw = line.IndexOf("$");
if (psw > 0)
{
line = line.Substring(0, psw);
}
System.Diagnostics.Process.Start(Data.FormLink+ "?&name="+line);
break;
}

}
}

}
else
{
System.Diagnostics.Process.Start(Data.FormLink);
}
}
catch
{
Expand Down

0 comments on commit 12375c4

Please sign in to comment.