1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4: using System.Web;
5: using System.Xml.Linq;
6: using System.Data;
7: using System.Text;
8: using System.Text.RegularExpressions;
9: using System.Collections;
10:
11: namespace Ia.Islamic.Koran.Wfa.Model.Data
12: {
13: ////////////////////////////////////////////////////////////////////////////
14:
15: /// <summary publish="true">
16: /// Koran Reference Network Windows Form support functions: Data model
17: /// </summary>
18: /// <value>
19: /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
20: /// </value>
21: /// <remarks>
22: /// Copyright © 2001-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
23: ///
24: /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
25: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
26: ///
27: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
28: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
29: ///
30: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
31: ///
32: /// Copyright notice: This notice may not be removed or altered from any source distribution.
33: /// </remarks>
34: public class Default
35: {
36: private XDocument jza;
37: private Ia.Cl.Model.Language lang;
38:
39: ////////////////////////////////////////////////////////////////////////////
40:
41: /// <summary>
42: ///
43: /// </summary>
44: public Default(string _language)
45: {
46: lang = new Ia.Cl.Model.Language();
47:
48: jza = XDocument.Load(Ia.Cl.Model.Default.AbsolutePath() + @"data\jza.xml");
49: }
50:
51: ////////////////////////////////////////////////////////////////////////////
52:
53: /// <summary>
54: ///
55: /// </summary>
56: public XDocument Jza
57: {
58: get { return jza; }
59: }
60:
61: ////////////////////////////////////////////////////////////////////////////
62:
63: /// <summary>
64: /// Return Koran version according to parameter language
65: /// </summary>
66: public static XDocument ReturnKoranByLanguage(Ia.Cl.Model.Language language)
67: {
68: return XDocument.Load(Ia.Cl.Model.Default.AbsolutePath() + "data\\" + language.Symbol + ".xml");
69: }
70:
71: ////////////////////////////////////////////////////////////////////////////
72:
73: /// <summary>
74: ///
75: /// </summary>
76: public static XDocument ReadFile(string fileName)
77: {
78: return XDocument.Load(Ia.Cl.Model.Default.AbsolutePath() + fileName);
79: }
80:
81: ////////////////////////////////////////////////////////////////////////////
82: ////////////////////////////////////////////////////////////////////////////
83: }
84:
85: ////////////////////////////////////////////////////////////////////////////
86: ////////////////////////////////////////////////////////////////////////////
87: }