示例#1
0
 public ConditionLists(ConditionLists other)
 {
     foreach (Condition c in other.conditionlist)
     {
         conditionlist.Add(new Condition(c));        //copy, not reference
     }
     groupname = new List <string>(other.groupname);
 }
示例#2
0
 private void configureFieldFilterToolStripMenuItem_Click(object sender, EventArgs e)
 {
     BaseUtils.ConditionLists res = FilterHelpers.ShowDialog(FindForm(), fieldfilter, discoveryform, "Summary Panel: Filter out fields".T(EDTx.UserControlSpanel_SPF));
     if (res != null)
     {
         fieldfilter = res;
         PutSetting(dbFieldFilter, fieldfilter.GetJSON());
         Display(current_historylist);
     }
 }
示例#3
0
        private void EditTrigger_Click(object sender, EventArgs e)
        {
            Group g = ((Control)sender).Tag as Group;

            BaseUtils.ConditionLists res = ShowFilterDialog(g.triggercondition, string.Format("Edit Profile {0} Trigger".T(EDTx.ProfileEditor_TrigEdit), g.name.Text));
            if (res != null)
            {
                g.triggercondition         = res;
                disabletriggers            = true;
                g.stdtrigger.SelectedIndex = EDDProfiles.FindTriggerIndex(g.triggercondition, g.backcondition) + 1;
                disabletriggers            = false;
            }
        }
示例#4
0
        private BaseUtils.ConditionLists ShowFilterDialog(BaseUtils.ConditionLists fieldfilter, string title)
        {
            ExtendedConditionsForms.ConditionFilterForm frm = new ExtendedConditionsForms.ConditionFilterForm();
            frm.VariableNames = new List <TypeHelpers.PropertyNameInfo>();
            frm.VariableNames.Add(new TypeHelpers.PropertyNameInfo("TriggerName", "Name of event, either the JournalEntryName, or UI<event>"));
            frm.VariableNames.Add(new TypeHelpers.PropertyNameInfo("TriggerType", "Type of trigger, either UIEvent or JournalEvent"));

            frm.InitCondition(title, Icon, fieldfilter);

            if (frm.ShowDialog(this.FindForm()) == DialogResult.OK)
            {
                return(frm.Result);
            }
            else
            {
                return(null);
            }
        }