40 lines
881 B
C#
40 lines
881 B
C#
using System.Windows.Forms;
|
|
|
|
namespace ResultsBrowser.Filters
|
|
{
|
|
public partial class ProtocolFilterUI : UserControl
|
|
{
|
|
ProtocolFilter data;
|
|
|
|
/// <summary> Used only by Designer </summary>
|
|
public ProtocolFilterUI()
|
|
{
|
|
InitializeComponent();
|
|
Localize();
|
|
}
|
|
|
|
/// <summary> Used to create the control aby a filter </summary>
|
|
public ProtocolFilterUI(ProtocolFilter data)
|
|
{
|
|
this.data = data;
|
|
InitializeComponent();
|
|
Localize();
|
|
}
|
|
|
|
void Localize()
|
|
{
|
|
groupBox1.Text = ProtocolFilter.GetFilterName();
|
|
}
|
|
|
|
public void Data2UI()
|
|
{
|
|
protocolTextBox.Text = (data.Protocol != null) ? data.Protocol : string.Empty;
|
|
}
|
|
|
|
public void UI2Data()
|
|
{
|
|
data.Protocol = protocolTextBox.Text;
|
|
}
|
|
}
|
|
}
|