private void btnOk_Click(object sender, EventArgs e) { ProcessNewParamsArgs args = new ProcessNewParamsArgs(); args.searchString = new ArrayList(); if (cbString0.Text.Length > 0) { args.searchString.Add(cbString0.Text); } if (cbString1.Text.Length > 0) { args.searchString.Add(cbString1.Text); } if (cbString2.Text.Length > 0) { args.searchString.Add(cbString2.Text); } if (cbString3.Text.Length > 0) { args.searchString.Add(cbString3.Text); } if (cbString4.Text.Length > 0) { args.searchString.Add(cbString4.Text); } OnProcessNewParams(args); this.Hide(); }
protected virtual void OnProcessNewParams(ProcessNewParamsArgs e) { EventHandler <ProcessNewParamsArgs> handler = ProcessNewParams; if (handler != null) { handler(this, e); } }
private void FilterOutput(object sender, ProcessNewParamsArgs e) { ArrayList al = e.searchString; filterStrings.Clear(); for (int i = 0; i < al.Count; i++) { filterStrings.Add(al[i]); } DisplayBuffer(); if (al.Count > 0) { btnFilter.BackColor = Color.Red; } else { btnFilter.BackColor = Color.Transparent; } for (int i = 0; i < al.Count; i++) { UpdateSearchedTexts(Convert.ToString(al[i])); } }