Skip to content

Commit

Permalink
added actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDaniel committed Sep 18, 2020
1 parent 5752b1a commit 8773d77
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 13 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Supported functions:


## Checks
**Search Checks**
```
title
Expand Down Expand Up @@ -37,4 +37,19 @@ crowdfunding sites
meme generator sites
facebook links
amazon affiliate links
```

## Actions
**Action**
```
remove
approve
spam
filter
report
```

```
action_reason
report_reason
```
Binary file modified automod-generator/.vs/automod-generator/v16/.suo
Binary file not shown.
13 changes: 13 additions & 0 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.

46 changes: 34 additions & 12 deletions automod-generator/automod-generator/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ private void Form1_Load(object sender, EventArgs e)
public class vars
{
public static string type = "";
public static List<string> conditionData = new List<string>();
public static List<string> actionData = new List<string>();
}

public void compile()
{
output.Text = "test";
List<string> data = new List<string>();
output.Text = vars.type;
void addPosCondition()
{
string addData = "";
Expand Down Expand Up @@ -116,7 +115,7 @@ void addPosCondition()
addData = addData + ":";
}
addData = addData +" " + boxFind.Text;
data.Add(addData);
vars.conditionData.Add(addData);
foreach (string standard in standardList.CheckedItems)
{
if(standardData == "")
Expand All @@ -126,27 +125,41 @@ void addPosCondition()
}
if(standardList.CheckedItems.Count > 0)
{
data.Add("standard: " + standardData);
vars.conditionData.Add("standard: " + standardData);
}
foreach(string useris in userisList.CheckedItems)
{
if(userisData == "")
{
data.Add("author:");
vars.conditionData.Add("author:");
}
userisData = useris;
data.Add(" " + useris+ ": false");
}
addData = addData + userisData;

vars.conditionData.Add(" " + useris+ ": false");
}
}
void addNegCondition()
{

}
void addAction()
{

string actionData = "";
foreach(string action in actionList.CheckedItems)
{
actionData = "action: " + action;
vars.actionData.Add(actionData);
if (checkReason.Checked)
{
if(action != "report")
{
vars.actionData.Add("action_reason: " + boxReason.Text);
}
else
{
vars.actionData.Add("report_reason: " + boxReason.Text);
}
}
}
}

if (vars.type == "addPosCondition")
Expand All @@ -161,8 +174,10 @@ void addAction()
{
addAction();
}
string o = string.Join("\n", data);
string o = string.Join("\n", vars.conditionData);
output.Text = o;
string a = string.Join("\n", vars.actionData);
output.Text = output.Text +"\n"+ a;

}

Expand All @@ -180,7 +195,14 @@ private void ifNotButton_Click(object sender, EventArgs e)

private void actionButton_Click(object sender, EventArgs e)
{
vars.type = "addAction";
compile();
}

private void resetButton_Click(object sender, EventArgs e)
{
vars.conditionData.Clear();
vars.actionData.Clear();
}
}
}
Binary file modified automod-generator/automod-generator/bin/Debug/automod-generator.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified automod-generator/automod-generator/obj/Debug/automod-generator.exe
Binary file not shown.
Binary file not shown.

0 comments on commit 8773d77

Please sign in to comment.