Skip to content

Commit

Permalink
form: Changed log location to match settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathanwoodburn committed Jun 7, 2023
1 parent 50bab1e commit 9b34b84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions BidderGUI/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions BidderGUI/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,15 +615,15 @@ public bool Checkerrors(string log, string[] domains)
{
if (skiperrorscheck.Checked)
{
StreamWriter streamWriter = new StreamWriter(Environment.CurrentDirectory + "\\log.txt", true);
StreamWriter streamWriter = new StreamWriter(dir + "log.txt", true);
foreach (string domain in domains)
{
domainslistBox.Items.Remove(domain);
streamWriter.WriteLine(domain);
}
streamWriter.Close();
streamWriter.Dispose();
addlog("Added log at: " + Environment.CurrentDirectory + "\\log.txt");
addlog("Added log at: " + dir + "log.txt");
}
else
{
Expand Down Expand Up @@ -1200,6 +1200,10 @@ internal static class User32
}
#endregion
#region Settings
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
SaveSettings();
}
private void GetSettings()
{
if (!File.Exists(dir + "settings.txt"))
Expand Down Expand Up @@ -1263,7 +1267,8 @@ private void GetSettings()
}
break;
}
if (setting.Key.Contains("domain")){
if (setting.Key.Contains("domain"))
{
if (setting.Value.Trim() != "")
{
domainslistBox.Items.Add(setting.Value.Trim());
Expand All @@ -1290,7 +1295,7 @@ private void SaveSettings()
string dns = "";
foreach (string domain in dnslistBox.Items)
{
dns += domain.Replace(":","?") + "\\";
dns += domain.Replace(":", "?") + "\\";
}
sw.WriteLine("dns: " + dns);
int domaincount = 0;
Expand All @@ -1304,9 +1309,5 @@ private void SaveSettings()
}
#endregion

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
SaveSettings();
}
}
}

0 comments on commit 9b34b84

Please sign in to comment.