)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Default (Ia.TentPlay.Cl.Models.Business)

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

Support class for TentPlay business model

    1: using System;
    2: using System.Linq;
    3: using System.Collections.Generic;
    4: using System.IO;
    5:  
    6: namespace Ia.TentPlay.Cl.Models.Business
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     /// Support class for TentPlay business model
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright © 2012-2018 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 class Default
   28:     {
   29:         ////////////////////////////////////////////////////////////////////////////
   30:  
   31:         /// <summary>
   32:         ///
   33:         /// </summary>
   34:         public Default()
   35:         {
   36:         }
   37:  
   38:         ////////////////////////////////////////////////////////////////////////////
   39:  
   40:         /// <summary>
   41:         /// The Version Code used in AndroidManifest.xml will be generated as the number of hours passed from 2018-01-01 00:00
   42:         /// </summary>
   43:         public static int VersionCode
   44:         {
   45:             get
   46:             {
   47:                 DateTime start, now;
   48:                 TimeSpan timeSpan;
   49:  
   50:                 start = DateTime.Parse("2018-01-01");
   51:                 now = DateTime.UtcNow.AddHours(3);
   52:  
   53:                 timeSpan = now - start;
   54:  
   55:                 return (int)Math.Floor(timeSpan.TotalHours);
   56:             }
   57:         }
   58:  
   59:         ////////////////////////////////////////////////////////////////////////////
   60:         ////////////////////////////////////////////////////////////////////////////
   61:     }
   62:  
   63:     ////////////////////////////////////////////////////////////////////////////
   64:     ////////////////////////////////////////////////////////////////////////////
   65: }