Skip to content

Commit

Permalink
changed many things
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDaniel committed Sep 18, 2020
1 parent 8773d77 commit 8fc59d2
Show file tree
Hide file tree
Showing 9 changed files with 237 additions and 27 deletions.
Binary file modified automod-generator/.vs/automod-generator/v16/.suo
Binary file not shown.
192 changes: 168 additions & 24 deletions automod-generator/automod-generator/Form1.Designer.cs

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

72 changes: 69 additions & 3 deletions automod-generator/automod-generator/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,25 @@ public class vars
public static string type = "";
public static List<string> conditionData = new List<string>();
public static List<string> actionData = new List<string>();
public static List<string> modifierData = new List<string>();
public static List<string> typeData = new List<string>();
}

public void compile()
{
string types = "";
foreach(string te in listType.CheckedItems)
{
if(types == "")
{
types = te;
}
else
{
types = types + "+" + te;
}
}
vars.typeData.Add("type: "+types);
void addPosCondition()
{
string addData = "";
Expand Down Expand Up @@ -160,8 +175,21 @@ void addAction()
}
}
}
foreach(string action in moreactionList.CheckedItems)
{
vars.actionData.Add(action+": true");
}
}
void addModifier()
{
foreach(string modifier in addList.CheckedItems)
{
if(modifier == "moderators_exempt")
{
vars.modifierData.Add(modifier + ": false");
}
}
}

if (vars.type == "addPosCondition")
{
addPosCondition();
Expand All @@ -174,8 +202,16 @@ void addAction()
{
addAction();
}
if (vars.type == "addModifier")
{
addModifier();
}
string t = string.Join("\n", vars.typeData);
output.Text = output.Text + t;
string o = string.Join("\n", vars.conditionData);
output.Text = o;
output.Text = output.Text + "\n" + o;
string m = string.Join("\n", vars.modifierData);
output.Text = output.Text + "\n" + m;
string a = string.Join("\n", vars.actionData);
output.Text = output.Text +"\n"+ a;

Expand All @@ -198,11 +234,41 @@ private void actionButton_Click(object sender, EventArgs e)
vars.type = "addAction";
compile();
}

private void modifierButton_Click(object sender, EventArgs e)
{
vars.type = "addModifier";
compile();
}
private void resetButton_Click(object sender, EventArgs e)
{
vars.conditionData.Clear();
vars.actionData.Clear();
vars.modifierData.Clear();
vars.typeData.Clear();
}

private void hideButton_Click(object sender, EventArgs e)
{
infoPanel.Visible = false;
}

private void contactButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://www.reddit.com/message/compose?to=/r/mirandaniel");
}

private void feedbackButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/MiranDaniel/automod-generator/issues/new");

}

private void repoButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/MiranDaniel/automod-generator");

}


}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 8fc59d2

Please sign in to comment.