// if aclist has one action, action selector not shown. public void Init(string t, string aclist, bool outc, EDDiscovery2.EDDTheme th, JSONFilter j = null) { // outc selects if group outer action can be selected, else its OR theme = th; actionlist = aclist; allowoutercond = outc; hoffset = (actionlist.Split(';').Count()>1) ? (288) : (160); panelwidth = hoffset + 620; result = j; if (result != null) { foreach (JSONFilter.FilterEvent fe in result.filters) { Group g = CreateGroup(fe.eventname, fe.action, fe.innercondition.ToString(), fe.outercondition.ToString()); foreach (JSONFilter.Fields f in fe.fields) { CreateCondition(g, f.itemname, JSONFilter.MatchNames[(int)f.matchtype], f.contentmatch); } } } bool winborder = theme.ApplyToForm(this, SystemFonts.DefaultFont); statusStripCustom.Visible = panelTop.Visible = !winborder; this.Text = label_index.Text = t; }
private void SetPanel(Panel pn, string name, EDDTheme.Settings.CI ex) { toolTip1.SetToolTip(pn, name); // assign tool tips and indicate which color to edit pn.Tag = ex; pn.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panel_theme_Click); }