public ValueFilterTypeItemControl(ValueFilterTypes type) { m_Type = type; Text = type.ToString(); switch (type) { case ValueFilterTypes.Equal: Icon = UriResources.Images.Equal16; Text = Localization.ValueFilter_Equal; break; case ValueFilterTypes.NotEqual: Icon = UriResources.Images.NotEqual16; Text = Localization.ValueFilter_NotEqual; break; case ValueFilterTypes.Less: Icon = UriResources.Images.Less16; Text = Localization.ValueFilter_Less; break; case ValueFilterTypes.LessOrEqual: Icon = UriResources.Images.LessOrEqual16; Text = Localization.ValueFilter_LessOrEqual; break; case ValueFilterTypes.Greater: Icon = UriResources.Images.Greater16; Text = Localization.ValueFilter_Greater; break; case ValueFilterTypes.GreaterOrEqual: Icon = UriResources.Images.GreaterOrEqual16; Text = Localization.ValueFilter_GreaterOrEqual; break; case ValueFilterTypes.Between: Icon = UriResources.Images.Between16; Text = Localization.ValueFilter_Between; break; case ValueFilterTypes.NotBetween: Icon = UriResources.Images.NotBetween16; Text = Localization.ValueFilter_NotBetween; break; } }
public void SelectItem(ValueFilterTypes type) { if (comboBox.Items.Count > 0) comboBox.SelectedIndex = 0; else comboBox.SelectedIndex = -1; int i = 0; foreach (ValueFilterTypeItemControl item in comboBox.Items) { if (item.Type == type) { comboBox.SelectedIndex = i; break; } i++; } }
public ValueFilterTypeItemControl(ValueFilterTypes type) { m_Type = type; Text = type.ToString(); switch (type) { case ValueFilterTypes.Equal: Icon = UriResources.Images.Equal16; Text = Localization.ValueFilter_Equal; break; case ValueFilterTypes.NotEqual: Icon = UriResources.Images.NotEqual16; Text = Localization.ValueFilter_NotEqual; break; case ValueFilterTypes.Less: Icon = UriResources.Images.Less16; Text = Localization.ValueFilter_Less; break; case ValueFilterTypes.LessOrEqual: Icon = UriResources.Images.LessOrEqual16; Text = Localization.ValueFilter_LessOrEqual; break; case ValueFilterTypes.Greater: Icon = UriResources.Images.Greater16; Text = Localization.ValueFilter_Greater; break; case ValueFilterTypes.GreaterOrEqual: Icon = UriResources.Images.GreaterOrEqual16; Text = Localization.ValueFilter_GreaterOrEqual; break; case ValueFilterTypes.Between: Icon = UriResources.Images.Between16; Text = Localization.ValueFilter_Between; break; case ValueFilterTypes.NotBetween: Icon = UriResources.Images.NotBetween16; Text = Localization.ValueFilter_NotBetween; break; } }
public void SelectItem(ValueFilterTypes type) { if (comboBox.Items.Count > 0) { comboBox.SelectedIndex = 0; } else { comboBox.SelectedIndex = -1; } int i = 0; foreach (ValueFilterTypeItemControl item in comboBox.Items) { if (item.Type == type) { comboBox.SelectedIndex = i; break; } i++; } }