Compare commits

...

3 Commits
v2.3 ... v2.4

Author SHA1 Message Date
Harry Fn Potter
3d19cab51c updater wont work with 3 digits or HF for some reason. 2021-07-18 20:18:54 -04:00
Harry Fn Potter
e8a3f5e34e 2.3HF1 2021-07-18 20:13:44 -04:00
Harry Fn Potter
e1ed9af1d7 Added check for nouns.txt 2021-07-18 20:09:00 -04:00
3 changed files with 20 additions and 20 deletions

View File

@@ -51,23 +51,23 @@ namespace AndroidSideloader
{
if (s.EndsWith(".txt") || s.Contains("debuglog.txt"))
File.Delete(s);
Random r = new Random();
int x = r.Next(6806);
int y = r.Next(6806);
string[] lines = File.ReadAllLines($"{Properties.Settings.Default.MainDir}\\notes\\nouns.txt");
if (!File.Exists($"{Properties.Settings.Default.MainDir}\\notes\\nouns.txt"))
File.WriteAllText("NOUNS.TXT MISSING", $"{ Properties.Settings.Default.MainDir}\\notes\\nouns.txt");
string randomnoun = lines[new Random(x).Next(lines.Length)];
string randomnoun2 = lines[new Random(y).Next(lines.Length)];
Properties.Settings.Default.CurrentLogTitle = Properties.Settings.Default.MainDir + "\\" + randomnoun + "-" + randomnoun2 + ".txt";
Properties.Settings.Default.CurrentLogName = Properties.Settings.Default.CurrentLogName.Replace(Properties.Settings.Default.MainDir, "");
Properties.Settings.Default.Save();
}
Random r = new Random();
int x = r.Next(6806);
int y = r.Next(6806);
string[] lines = File.ReadAllLines($"{Properties.Settings.Default.MainDir}\\notes\\nouns.txt");
if (!File.Exists($"{Properties.Settings.Default.MainDir}\\notes\\nouns.txt"))
File.WriteAllText("NOUNS.TXT MISSING", $"{ Properties.Settings.Default.MainDir}\\notes\\nouns.txt");
string randomnoun = lines[new Random(x).Next(lines.Length)];
string randomnoun2 = lines[new Random(y).Next(lines.Length)];
Properties.Settings.Default.CurrentLogTitle = Properties.Settings.Default.MainDir + "\\" + randomnoun + "-" + randomnoun2 + ".txt";
Properties.Settings.Default.CurrentLogName = Properties.Settings.Default.CurrentLogName.Replace(Properties.Settings.Default.MainDir, "");
Properties.Settings.Default.Save();
}
else
@@ -139,8 +139,8 @@ namespace AndroidSideloader
{
DialogResult dialogResult = FlexibleMessageBox.Show(this, $"Sideloader crashed during your last use.\nPress OK to send your crashlog.", "Crash Detected", MessageBoxButtons.OKCancel);
if (dialogResult == DialogResult.OK)
if (File.Exists($"{Environment.CurrentDirectory}\\crashlog.txt"))
{
if (File.Exists($"{Environment.CurrentDirectory}\\crashlog.txt") && File.Exists($"{Properties.Settings.Default.MainDir}\\notes\\nouns.txt"))
{
Random r = new Random();
int x = r.Next(6806);
int y = r.Next(6806);

View File

@@ -17,7 +17,7 @@ namespace AndroidSideloader
private static string RawGitHubUrl;
private static string GitHubUrl;
static readonly public string LocalVersion = "2.3";
static readonly public string LocalVersion = "2.4";
public static string currentVersion = string.Empty;
public static string changelog = string.Empty;

View File

@@ -1 +1 @@
2.3
2.4