Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » Default

Public general use code classes and xml files that we've compiled and used over the years:

Default UI support class.

   1:  using System;
   2:  using System.Web;
   3:  using System.Xml;
   4:  using System.IO;
   5:  using System.Configuration;
   6:  using System.Text;
   7:  using System.Text.RegularExpressions;
   8:  using System.Data;
   9:  using System.Data.SqlClient;
  10:  using System.Collections;
  11:   
  12:  namespace Ia.Learning.Kanji.Model.Ui
  13:  {
  14:      ////////////////////////////////////////////////////////////////////////////
  15:   
  16:      /// <summary publish="true">
  17:      /// Default UI support class.
  18:      /// </summary>
  19:      /// <value>
  20:      /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
  21:      /// </value>
  22:      /// <remarks> 
  23:      /// Copyright © 2008-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  24:      ///
  25:      /// 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
  26:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  27:      ///
  28:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  29:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  30:      /// 
  31:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  32:      /// 
  33:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  34:      /// </remarks> 
  35:      public abstract class Default
  36:      {
  37:          ////////////////////////////////////////////////////////////////////////////
  38:   
  39:          /// <summary>
  40:          ///
  41:          /// </summary>
  42:          public Default() { }
  43:   
  44:          ////////////////////////////////////////////////////////////////////////////
  45:   
  46:          /// <summary>
  47:          ///
  48:          /// </summary>
  49:          public static void Theme(System.Web.UI.Page page, System.Web.Profile.ProfileBase profile)
  50:          {
  51:              // below: use mobile master pages if this browser is mobile
  52:              if (HttpContext.Current.Request.Browser.IsMobileDevice)
  53:              {
  54:                  page.MasterPageFile = page.MasterPageFile.Replace("/", "/m/");
  55:                  page.Theme = "dark-slate-gray.m";
  56:              }
  57:              else
  58:              {
  59:                  page.Theme = "dark-slate-gray";
  60:              }
  61:          }
  62:   
  63:          ////////////////////////////////////////////////////////////////////////////
  64:   
  65:          /// <summary>
  66:          ///
  67:          /// </summary>
  68:          public static string MailTop()
  69:          {
  70:              return @"
  71:  <!DOCTYPE html>
  72:  <html xmlns=""http://www.w3.org/1999/xhtml"" >
  73:  <head>
  74:  <title>" + ConfigurationManager.AppSettings["site_name"].ToString() + ": " + ConfigurationManager.AppSettings["company_name"].ToString() + @"</title>
  75:  <style>
  76:  html { direction:ltr; }
  77:  body { background:#fff;margin:5px;padding:0px;color:DarkBlue; }
  78:  body,td,th,a,h1,h2,h3,input.button_ia,input,textarea,option,select,pre { font:9pt normal #000066 ""Tahoma"";font-family:Tahoma;text-decoration:none; }
  79:  a:link { color:#0000ff;text-decoration:none; }
  80:  a:visited { color:#0000ff;text-decoration:none; }
  81:  a:hover { color:#ff8888;text-decoration:none; }
  82:  hr { color:rgb(204,204,204); }
  83:  p { line-height:18px;margin-top:9px;margin-bottom:9px; }
  84:  table.form { border:0px solid green;padding:0px;margin-left:0px; }
  85:  table.form td { border:0px solid red;padding:2px;margin:0;vertical-align:middle; }
  86:  </style>
  87:  </head>
  88:  <body>
  89:   
  90:  <p><b>" + ConfigurationManager.AppSettings["site_name"].ToString() + "</b>: <b>" + ConfigurationManager.AppSettings["company_name"].ToString() + @"</b></p>
  91:  ";
  92:          }
  93:   
  94:          ////////////////////////////////////////////////////////////////////////////
  95:   
  96:          /// <summary>
  97:          ///
  98:          /// </summary>
  99:          public static string MailBottom()
 100:          {
 101:              return @"
 102:  </body>
 103:  </html>
 104:  ";
 105:          }
 106:   
 107:          ////////////////////////////////////////////////////////////////////////////
 108:          ////////////////////////////////////////////////////////////////////////////
 109:      }
 110:  }
 111:   
 112:   
 113:   
 114: