private void okButton_Clicked(object sender, EventArgs e)
        {
            this.okButton.Enabled    = false;
            this.applyButton.Enabled = false;

            if (this.regexCheckBox.Checked &&
                !FilterHelper.CheckForFilterTextComboBoxErrors(this, new ComboBox[] { recordNameFilterComboBox,
                                                                                      recordValueFilterComboBox }))
            {
                return;
            }

            Filter.RecordName  = recordNameFilterComboBox.Text;
            Filter.RecordValue = recordValueFilterComboBox.Text;

            Filter.TimeAfterActive  = timestampFilterAfterEnabledCheckBox.Checked;
            Filter.TimeBeforeActive = timestampFilterBeforeEnabledCheckBox.Checked;

            Filter.TimeAfter  = timestampAfterDateTimePicker.Value;
            Filter.TimeBefore = timestampBeforeDateTimePicker.Value;

            Filter.UseRegex      = regexCheckBox.Checked;
            Filter.CaseSensitive = caseSensitiveCheckBox.Checked;

            FilterHelper.UpdateDropDownWithFilterText(recordNameFilterComboBox);
            FilterHelper.UpdateDropDownWithFilterText(recordValueFilterComboBox);

            if (FilterUpdated != null)
            {
                FilterUpdated(this, EventArgs.Empty);
            }

            if (sender == this.okButton)
            {
                this.Hide();
            }
        }
Exemplo n.º 2
0
 public bool Passes(CallDataRecord callDataRecord)
 {
     return(FilterHelper.PassesRecordFilter(RecordName, RecordValue, CaseSensitive, UseRegex, callDataRecord) &&
            FilterHelper.PassesTimeFilter(callDataRecord.Timestamp, TimeAfterActive, TimeAfter, TimeBeforeActive, TimeBefore, false));
 }