private void InitIndexTree() { KeyFactorIndexer keyFactorIndexer = new KeyFactorIndexer(); Dictionary <string, string> keyFactors = keyFactorIndexer.KeyFactors; TreeNode compareNode = new TreeNode("重要比值控制"); foreach (var item in keyFactors) { TreeNode node = new TreeNode(item.Key); compareNode.Nodes.Add(node); node.Tag = item.Value; } compareNode.ExpandAll(); tv_keyFactors.Nodes.Add(compareNode); }
private void formatContent() { RichTextBoxEx rtb = this.rtb_Summary.TextPanel; KeyFactorIndexer indexer = new KeyFactorIndexer(); foreach (string item in indexer.KeyFactors.Values) { int index = rtb.Find(item, RichTextBoxFinds.NoHighlight); if (index >= 0) { rtb.Select(index, item.Length); rtb.SelectionColor = Color.Green; } } rtb.DeselectAll(); }