static FileTemplate()
            {
                FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
                StringCollection   files = fileUtilityService.SearchDirectory(Application.StartupPath +
                                                                              Path.DirectorySeparatorChar + ".." +
                                                                              Path.DirectorySeparatorChar + "data" +
                                                                              Path.DirectorySeparatorChar + "resources" +
                                                                              Path.DirectorySeparatorChar + "templates", "*.xft");

                foreach (string file in files)
                {
                    LoadFileTemplate(file);
                }
            }
        void FillLists()
        {
            string           uPath = Path.Combine(PropertyService.DataDirectory, "modes");
            StringCollection uCol;

            if (Directory.Exists(uPath))
            {
                uCol = FileUtilityService.SearchDirectory(uPath, "*.xshd", true);
            }
            else
            {
                Directory.CreateDirectory(uPath);
                uCol = new StringCollection();
            }

            foreach (string str in uCol)
            {
                XmlTextReader reader = new XmlTextReader(str);
                while (reader.Read())
                {
                    if (reader.NodeType == XmlNodeType.Element)
                    {
                        switch (reader.Name)
                        {
                        case "SyntaxDefinition":
                            string name = reader.GetAttribute("name");
                            if (name != null)
                            {
                                highlightItemNameList.Add(new DictionaryEntry(name, str));
                            }
                            goto exit;

                        default:
                            MessageBox.Show("不可识别的根节点在高亮度显示策略文件中:" + str, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                            goto exit;
                        }
                    }
                }
exit:
                reader.Close();
            }
            userList.Items.Clear();
            userList.DataSource    = highlightItemNameList;
            userList.DisplayMember = "Key";
            userList.ValueMember   = "Value";
        }