// opens rules window when an instance is created public RuleList(string type) { if (type == "Open") { RuleList rulesWindow = new RuleList(); rulesWindow.Show(); } }
private void showRules_Click(object sender, EventArgs e) { // makes new instance of RuleList and opens up window. RuleList r = new RuleList("Open"); }