private static ListViewItem GetQuickColorizerItem(QuickColorizer colorizer) { ListViewItem item = new ListViewItem(colorizer.Active.ToString()); item.SubItems.Add(colorizer.IgnoreCase.ToString()); item.SubItems.Add(colorizer.WholeText.ToString()); item.SubItems.Add(colorizer.ColorSet != null ? colorizer.ColorSet.ToString() : string.Empty); item.SubItems.Add(colorizer.Text); item.Tag = colorizer; return item; }
public QuickColorizerEdit(QuickColorizer colorizer) { if (colorizer == null) { colorizer = new QuickColorizer(); } QuickColorizer = colorizer; InitializeComponent(); textBoxDefinition.Text = colorizer.Text; textBoxColor.Text = colorizer.ColorSet != null ? colorizer.ColorSet.ToString() : string.Empty; textBoxColor.Tag = colorizer.ColorSet; checkBoxIgnoreCase.Checked = colorizer.IgnoreCase; checkBoxWholeText.Checked = colorizer.WholeText; checkBoxActive.Checked = colorizer.Active; UpdateControls(); }
private QuickColorizer GetExistingQuickColorizer(QuickColorizer colorizer) { return AllQuickColorizers.FirstOrDefault(c => c.Equals(colorizer)); }