Skip to content

Commit

Permalink
Select a random initial image type
Browse files Browse the repository at this point in the history
  • Loading branch information
Robson committed Jul 23, 2020
1 parent 4b790a6 commit 9355442
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion GlitchGenerator/FrmGenerate.Designer.cs

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

2 changes: 1 addition & 1 deletion GlitchGenerator/FrmGenerate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public FrmGenerate()
}
}

this.CbInitialDesign.SelectedIndex = 0;
this.CbInitialDesign.SelectedIndex = RNG.Random.Next(this.CbInitialDesign.Items.Count);
this.Text = "Generate Image";
ShowPreview();
}
Expand Down
2 changes: 1 addition & 1 deletion GlitchGenerator/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private void CorruptFolderToolStripMenuItem_Click(object sender, EventArgs e)
ofd.FileName = string.Empty;
ofd.ShowDialog();

if (ofd.FileNames.Count() > 0)
if (ofd.FileNames[0] != string.Empty)
{
var newFolder = Path.GetDirectoryName(ofd.FileNames[0]) + Path.DirectorySeparatorChar + "Glitched " + DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
Directory.CreateDirectory(newFolder);
Expand Down
2 changes: 1 addition & 1 deletion GlitchGenerator/InitialImages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public string GetName()

public bool IsPossible()
{
return true;
return false;
}

public Bitmap GenerateImage(int width, int height, bool isPreview)
Expand Down

0 comments on commit 9355442

Please sign in to comment.