示例#1
0
        private void _tagger_LoadTagset(object sender, TaggerEventArgs e)
        {
            _service.CheckTagset();
            if (_service.TagsetSet)
            {
                _service.ProjectTagset = File.ReadAllText(ProjectInfo.TagsetPath);
                string   line  = File.ReadAllText(ProjectInfo.TagCountsPath);
                string[] lines = line.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var item in lines)
                {
                    var temp = item.Split(' ');
                    SituationIndex.TagsetCounter.Add(temp[0], int.Parse(temp[1]));
                }

                _tagger.DisplayTagset(TagsetIndex.Index[_service.ProjectTagset]);
                _main.SetTagsetLabel(_service.ProjectTagset);
                _tagger.DisplayTagsetColors(TagsetIndex.ColorIndex[_service.ProjectTagset]);
            }
        }