|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PerformanceSolutions.WinForms
{
public partial class FilterDlg : Form
{
private TraceFilter CurrentTraceFilter = null;
public FilterDlg()
{
InitializeComponent();
}
public TraceFilter Filter
{
get { return CurrentTraceFilter; }
set { CurrentTraceFilter = value; }
}
private void FilterDlg_Load(object sender, EventArgs e)
{
this.chkCritical.Checked = CurrentTraceFilter.Critical;
this.chkError.Checked = CurrentTraceFilter.Error;
this.chkAspDotNet.Checked = CurrentTraceFilter.AspDotNet;
this.chkInformation.Checked = CurrentTraceFilter.Information;
this.chkWarning.Checked = CurrentTraceFilter.Warning;
this.txtKeyword.Text = CurrentTraceFilter.Keywords;
this.cboField.SelectedIndex = (int)CurrentTraceFilter.Field;
}
private void btnOK_Click(object sender, EventArgs e)
{
CurrentTraceFilter.Critical=this.chkCritical.Checked;
CurrentTraceFilter.Error = this.chkError.Checked;
CurrentTraceFilter.AspDotNet = this.chkAspDotNet.Checked;
CurrentTraceFilter.Information = this.chkInformation.Checked;
CurrentTraceFilter.Warning=this.chkWarning.Checked;
CurrentTraceFilter.Keywords = this.txtKeyword.Text;
CurrentTraceFilter.Field=(TraceFilter.TraceField) this.cboField.SelectedIndex;
this.Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void chkAspDotNet_CheckedChanged(object sender, EventArgs e)
{
if (this.chkAspDotNet.Checked)
{
this.chkCritical.Checked = true;
this.chkCritical.Enabled = false;
this.chkError.Checked = true;
this.chkError.Enabled = false;
this.chkInformation.Checked = true;
this.chkInformation.Enabled = false;
this.chkWarning.Checked = true;
this.chkWarning.Enabled = false;
}
else
{
this.chkCritical.Checked = true;
this.chkCritical.Enabled = true;
this.chkError.Checked = true;
this.chkError.Enabled = true;
this.chkInformation.Checked = true;
this.chkInformation.Enabled = true;
this.chkWarning.Checked = true;
this.chkWarning.Enabled = true;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.