Ejemplo n.º 1
0
		public MasterItem(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm)
		{
			m_node = node;
			m_eKind = kind;
			m_term = sTerm;

			m_citations = new List<MasterItemCitation>();

			XmlNode nd = node.SelectSingleNode("abbrev");
			m_abbrevWs = XmlUtils.GetManditoryAttributeValue(nd, "ws");
			m_abbrev = nd.InnerText;

			nd = node.SelectSingleNode("term");
			m_termWs = XmlUtils.GetManditoryAttributeValue(nd, "ws");
			m_term = nd.InnerText;

			nd = node.SelectSingleNode("def");
			if (nd != null)
			{
				m_defWs = XmlUtils.GetManditoryAttributeValue(nd, "ws");
				m_def = nd.InnerText;
			}

			foreach (XmlNode citNode in node.SelectNodes("citation"))
			{
				string sWs = XmlUtils.GetOptionalAttributeValue(citNode, "ws");
				if (sWs == null)
					sWs = "en";
				m_citations.Add(new MasterItemCitation(sWs, citNode.InnerText));
			}
		}
Ejemplo n.º 2
0
        public MasterItem(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm)
        {
            m_node  = node;
            m_eKind = kind;
            m_term  = sTerm;

            m_citations = new List <MasterItemCitation>();

            XmlNode nd = node.SelectSingleNode("abbrev");

            m_abbrevWs = XmlUtils.GetManditoryAttributeValue(nd, "ws");
            m_abbrev   = nd.InnerText;

            nd       = node.SelectSingleNode("term");
            m_termWs = XmlUtils.GetManditoryAttributeValue(nd, "ws");
            m_term   = nd.InnerText;

            nd = node.SelectSingleNode("def");
            if (nd != null)
            {
                m_defWs = XmlUtils.GetManditoryAttributeValue(nd, "ws");
                m_def   = nd.InnerText;
            }

            foreach (XmlNode citNode in node.SelectNodes("citation"))
            {
                string sWs = XmlUtils.GetOptionalAttributeValue(citNode, "ws");
                if (sWs == null)
                {
                    sWs = "en";
                }
                m_citations.Add(new MasterItemCitation(sWs, citNode.InnerText));
            }
        }
Ejemplo n.º 3
0
        protected virtual TreeNode CreateNewNode(XmlNode currentNode, string sType, StringBuilder sbNode, string sTerm)
        {
            TreeNode newNode;

            GlossListTreeView.ImageKind ik = GetImageKind(sType);
            newNode = new TreeNode(TsStringUtils.NormalizeToNFC(sbNode.ToString()), (int)ik, (int)ik);
            MasterInflectionFeature mif = new MasterInflectionFeature(currentNode, ik, sTerm);

            newNode.Tag = (MasterInflectionFeature)mif;
            return(newNode);
        }
Ejemplo n.º 4
0
        protected override TreeNode CreateNewNode(XmlNode currentNode, string sType, StringBuilder sbNode, string sTerm)
        {
            TreeNode newNode;

            // we always use a check box
            GlossListTreeView.ImageKind ik = ImageKind.checkBox;
            newNode = new TreeNode(TsStringUtils.NormalizeToNFC(sbNode.ToString()), (int)ik, (int)ik);
            MasterPhonologicalFeature mpf = new MasterPhonologicalFeature(currentNode, ik, sTerm);

            newNode.Tag = mpf;
            return(newNode);
        }
Ejemplo n.º 5
0
 public MasterInflectionFeature(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm)
     : base(node, kind, sTerm)
 {
 }
Ejemplo n.º 6
0
 public MasterPhonologicalFeature(XmlNode node, GlossListTreeView.ImageKind kind, string sTerm)
     : base(node, kind, sTerm)
 {
 }