1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4: using System.Web;
5: using System.Web.UI;
6: using System.Data;
7: using System.Data.SqlClient;
8: using System.Collections;
9: using System.Xml;
10: using System.Xml.Linq;
11: using System.Text;
12: using System.Text.RegularExpressions;
13: using System.IO;
14: using Ionic.Zip;
15: using System.Drawing;
16: using System.Drawing.Imaging;
17:
18: namespace Ia.TentPlay.Cl.Model.Ui.Trek
19: {
20: ////////////////////////////////////////////////////////////////////////////
21:
22: /// <summary publish="true">
23: /// Default class for TentPlay Trek UI model
24: /// </summary>
25: ///
26: /// <remarks>
27: /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
28: ///
29: /// 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
30: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
31: ///
32: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
33: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
34: ///
35: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
36: ///
37: /// Copyright notice: This notice may not be removed or altered from any source distribution.
38: /// </remarks>
39: public static class Default
40: {
41: ////////////////////////////////////////////////////////////////////////////
42:
43: /// <summary>
44: ///
45: /// </summary>
46: public static string WebSitemapSiteMapNodeListOfAllCountriesInStringFormat()
47: {
48: string s;
49: StringBuilder stringBuilder;
50:
51: stringBuilder = new StringBuilder();
52:
53: foreach (var country in Ia.Cl.Model.Country.List)
54: {
55: stringBuilder.AppendLine(@"<siteMapNode title=""" + country.Name + @""" description="""" url=""~/trek/country/" + country.Iso2.ToLower() + @"/default.aspx"">");
56: stringBuilder.AppendLine(@" <siteMapNode title=""Feature"" description="""" url=""~/trek/country/" + country.Iso2.ToLower() + @"/feature.aspx""/>");
57: stringBuilder.AppendLine(@"</siteMapNode>");
58: }
59:
60: s = stringBuilder.ToString();
61:
62: s = s.Replace("'", "'"); // use ' instead of ' to work
63: s = s.Replace("<", "<");
64: s = s.Replace(">", ">");
65: s = s.Replace(" & ", " &amp; ");
66:
67: s = "<pre>" + s + "</pre>";
68:
69: return s;
70: }
71:
72: ////////////////////////////////////////////////////////////////////////////
73:
74: /// <summary>
75: ///
76: /// </summary>
77: public static string ApplicationNameAndPlayStoreUrlLinkListStringFormat()
78: {
79: string s;
80: StringBuilder stringBuilder;
81:
82: stringBuilder = new StringBuilder();
83:
84: foreach (Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.Country country in Ia.TentPlay.Cl.Model.Data.Trek.ApplicationInformation.CountryList)
85: {
86: stringBuilder.AppendLine(@" <a href=""" + country.ApplicationUrl + @"""/>" + country.Name + "</a> ");
87: }
88:
89: return stringBuilder.ToString();
90: }
91:
92: ////////////////////////////////////////////////////////////////////////////
93: }
94: }