/// ------------------------------------------------------------------------------------ private void HandleCharChecked(CharPicker picker, ToolStripButton item) { var chk = picker.Tag as CheckBox; if (chk != null) { chk.CheckState = picker.GetRelevantCheckState(); } }
/// ------------------------------------------------------------------------------------ private void SetPickersCheckStateBasedOnItsCheckedItems(CharPicker picker) { var symbolTypeHeading = picker.Parent as ExplorerBarItem; if (symbolTypeHeading != null) { symbolTypeHeading.CheckedBoxState = picker.GetRelevantCheckState(); } }
/// ------------------------------------------------------------------------------------ private static void SetIgnoredChars(CheckBox chk, CharPicker picker, IEnumerable <string> ignoredCharacters) { var ignoreList = ignoredCharacters.ToList(); foreach (var item in picker.GetItems()) { // Remove the dotted circle (if there is one) from the button's text, then // check the button's text to see if it's found in the ignore list. var chr = item.Text.Replace(App.DottedCircle, string.Empty); item.Checked = (ignoreList.Contains(chr)); item.Tag = item.Checked; } chk.CheckState = picker.GetRelevantCheckState(); }