)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
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.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Xml.Linq;
   6:  using System.Configuration;
   7:   
   8:  ////////////////////////////////////////////////////////////////////////////
   9:   
  10:  /// <summary>
  11:  ///
  12:  /// </summary>
  13:  namespace Ia.Learning.Manhaj.Model.UI
  14:  {
  15:      ////////////////////////////////////////////////////////////////////////////
  16:   
  17:      /// <summary publish="true">
  18:      /// Default UI support class.
  19:      /// </summary>
  20:      /// <value>
  21:      /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
  22:      /// </value>
  23:      /// <remarks> 
  24:      /// Copyright © 2008-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  25:      ///
  26:      /// 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
  27:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  28:      ///
  29:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  30:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  31:      /// 
  32:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  33:      /// 
  34:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  35:      /// </remarks> 
  36:      public static class Default
  37:      {
  38:          ////////////////////////////////////////////////////////////////////////////
  39:   
  40:          /// <summary>
  41:          ///
  42:          /// </summary>
  43:          public static string MailTop()
  44:          {
  45:              return @"
  46:  <!DOCTYPE html>
  47:  <html xmlns=""http://www.w3.org/1999/xhtml"" >
  48:  <head>
  49:  <title>" + ConfigurationManager.AppSettings["site_name"].ToString() + ": " + ConfigurationManager.AppSettings["company_name"].ToString() + @"</title>
  50:  <style>
  51:  html { direction:ltr; }
  52:  body { background:#fff;margin:5px;padding:0px;color:DarkBlue; }
  53:  body,td,th,a,input.button_ia,input,textarea,option,select,pre { font:9pt normal #000066 ""Tahoma"";font-family:Tahoma;text-decoration:none; }
  54:  a:link { color:#0000ff;text-decoration:none; }
  55:  a:visited { color:#0000ff;text-decoration:none; }
  56:  a:hover { color:#ff8888;text-decoration:none; }
  57:  hr { color:rgb(204,204,204); }
  58:  p { line-height:18px;margin-top:9px;margin-bottom:9px; }
  59:  table.form { }
  60:  table.form td { }
  61:  </style>
  62:  </head>
  63:  <body>
  64:   
  65:  <p><b>" + ConfigurationManager.AppSettings["site_name"].ToString() + "</b>: <b>" + ConfigurationManager.AppSettings["company_name"].ToString() + @"</b></p>
  66:  ";
  67:          }
  68:   
  69:          ////////////////////////////////////////////////////////////////////////////
  70:   
  71:          /// <summary>
  72:          ///
  73:          /// </summary>
  74:          public static string MailBottom()
  75:          {
  76:              return @"
  77:  </body>
  78:  </html>
  79:  ";
  80:          }
  81:   
  82:          ////////////////////////////////////////////////////////////////////////////
  83:   
  84:          /// <summary>
  85:          /// Generate a pseudo-random theme to assign to page
  86:          /// </summary>
  87:          public static void Theme(System.Web.UI.Page p, System.Web.Profile.ProfileBase profile)
  88:          {
  89:              /*
  90:              int i;
  91:              string[] sp = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" };
  92:              DateTime now;
  93:  
  94:              now = DateTime.UtcNow.AddHours(3);
  95:  
  96:              i = (now.DayOfYear * 24 + now.Hour) % sp.Length + 1;
  97:  
  98:              return i.ToString();
  99:              */
 100:   
 101:              p.Theme = "red";
 102:          }
 103:   
 104:          ////////////////////////////////////////////////////////////////////////////
 105:          ////////////////////////////////////////////////////////////////////////////
 106:      }
 107:   
 108:      ////////////////////////////////////////////////////////////////////////////
 109:      ////////////////////////////////////////////////////////////////////////////
 110:  }