)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
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.Web;
    2: using System.Configuration;
    3:  
    4: namespace Ia.Learning.Kanji.Model.Ui
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// Default UI support class.
   10:     /// </summary>
   11:     /// <value>
   12:     /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
   13:     /// </value>
   14:     /// <remarks> 
   15:     /// Copyright © 2008-2020 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     ///
   17:     /// 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
   18:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   19:     ///
   20:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   22:     /// 
   23:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   24:     /// 
   25:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   26:     /// </remarks> 
   27:     public abstract class Default
   28:     {
   29:         ////////////////////////////////////////////////////////////////////////////
   30:  
   31:         /// <summary>
   32:         ///
   33:         /// </summary>
   34:         public Default() { }
   35:  
   36:         ////////////////////////////////////////////////////////////////////////////
   37:  
   38:         /// <summary>
   39:         ///
   40:         /// </summary>
   41:         public static void Theme(System.Web.UI.Page page, System.Web.Profile.ProfileBase profile)
   42:         {
   43:             // below: use mobile master pages if this browser is mobile
   44:             if (HttpContext.Current.Request.Browser.IsMobileDevice)
   45:             {
   46:                 page.MasterPageFile = page.MasterPageFile.Replace("/", "/m/");
   47:                 page.Theme = "red.m";
   48:             }
   49:             else
   50:             {
   51:                 page.Theme = "red";
   52:             }
   53:         }
   54:  
   55:         ////////////////////////////////////////////////////////////////////////////
   56:         ////////////////////////////////////////////////////////////////////////////
   57:     }
   58: }
   59:  
   60:  
   61:  
   62: