ドキュメント内のフレーズを検索してカウントするツールがあります。これらのフレーズはxmlにあります。これにはハッシュテーブルの概念を使用しています。毎回、xml に追加するフレーズが増え続けています。そのため、実行時にxmlにフレーズを追加するときにコントロールを作成したいと考えています。私のUIには、フレーズごとにチェックボックスがあり、必要なフレーズをチェックできます。これに関連する例は見つかりません。これは、フレーズを使用するコードの一部です。
Hashtable _optionTable = null;
Hashtable _optionOccuranceTable = null;
if (optionBox.Checked == true)
ProcessNode(usrXmldoc, "Option", out _optionTable, out _optionOccuranceTable, oWord, oDoc);
Hashtable _QualityPhraseTable = null;
Hashtable _QualityPhraseOccuranceTable = null;
if (qualityBox.Checked == true)
ProcessNode(usrXmldoc, "QualityPhrase", out _QualityPhraseTable, out _QualityPhraseOccuranceTable, oWord, oDoc);
Hashtable _DirectiveTable = null;
Hashtable _DirectiveOccuranceTable = null;
if (directiveBox.Checked == true)
ProcessNode(usrXmldoc, "Directive", out _DirectiveTable, out _DirectiveOccuranceTable, oWord, oDoc);
Hashtable _ContinuanceTable = null;
Hashtable _ContinuanceOccuranceTable = null;
if (continuanceBox.Checked == true)
ProcessNode(usrXmldoc, "Continuance", out _ContinuanceTable, out _ContinuanceOccuranceTable, oWord, oDoc);
This is the XML part
string usrXmlConfigFile = CurrentDirectory + "\\Dictionary.xml";
FileStream usrFs = new FileStream(usrXmlConfigFile, FileMode.Open, FileAccess.Read,
FileShare.ReadWrite);
XmlDocument usrXmldoc = new XmlDocument();
usrXmldoc.Load(usrFs);