forked from pmengal/MailSystem.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguage.cs
More file actions
80 lines (71 loc) · 1.7 KB
/
Language.cs
File metadata and controls
80 lines (71 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public class Language
{
private string _code;
private string _name;
private System.Collections.ArrayList _words;
public string Code
{
get
{
return _code;
}
set
{
_code = value;
}
}
public string Name
{
get
{
return _name;
}
set
{
_name = value;
}
}
public System.Collections.ArrayList Words
{
get
{
return _words;
}
set
{
_words = value;
}
}
public Language()
{
_words = new System.Collections.ArrayList();
}
public static Language Get(string basePath, string code)
{
Language language1 = new Language();
System.Collections.Specialized.ListDictionary listDictionary = new System.Collections.Specialized.ListDictionary();
System.Xml.XmlDocument xmlDocument = new System.Xml.XmlDocument();
xmlDocument.Load(basePath + code + ".xml");
language1.Code = code;
language1.Name = xmlDocument.DocumentElement.Attributes["name"].Value;
foreach (System.Xml.XmlNode xmlNode in xmlDocument.DocumentElement.ChildNodes)
{
language1.Words.Add(xmlNode.InnerText);
}
return language1;
}
public static LanguageCollection GetLanguages(string basePath)
{
// trial
return null;
}
} // class Language