Example #1
0
File: Setting.cs Project: zeroyou/X
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
            var web = Runtime.IsWeb;

            if (LogPath.IsNullOrEmpty())
            {
                LogPath = web ? "..\\Log" : "Log";
            }
            if (DataPath.IsNullOrEmpty())
            {
                DataPath = web ? "..\\Data" : "Data";
            }
            if (BackupPath.IsNullOrEmpty())
            {
                BackupPath = web ? "..\\Backup" : "Backup";
            }
            //if (TempPath.IsNullOrEmpty()) TempPath = web ? "..\\Temp" : "Temp";
            if (LogFileFormat.IsNullOrEmpty())
            {
                LogFileFormat = "{0:yyyy_MM_dd}.log";
            }

            if (PluginServer.IsNullOrWhiteSpace())
            {
                PluginServer = "http://x.newlifex.com/";
            }

            base.OnLoaded();
        }
Example #2
0
File: Setting.cs Project: LiveFly/X
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
            if (LogPath.IsNullOrEmpty())
            {
                LogPath = "Log";
            }
            if (DataPath.IsNullOrEmpty())
            {
                DataPath = "Data";
            }
            if (BackupPath.IsNullOrEmpty())
            {
                BackupPath = "Backup";
            }
            if (LogFileFormat.IsNullOrEmpty())
            {
                LogFileFormat = "{0:yyyy_MM_dd}.log";
            }

            if (PluginServer.IsNullOrWhiteSpace())
            {
                PluginServer = "http://x.newlifex.com/";
            }

            base.OnLoaded();
        }
Example #3
0
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
            var web = Runtime.IsWeb;

            if (LogPath.IsNullOrEmpty())
            {
                LogPath = web ? "..\\Log" : "Log";
            }
            if (TempPath.IsNullOrEmpty())
            {
                TempPath = web ? "..\\XTemp" : "XTemp";
            }
            if (LogFileFormat.IsNullOrEmpty())
            {
                LogFileFormat = "{0:yyyy_MM_dd}.log";
            }

#if !__MOBILE__
            if (PluginCache.IsNullOrWhiteSpace())
            {
                // 兼容Linux Mono
                var sys = Environment.SystemDirectory;
                if (sys.IsNullOrEmpty())
                {
                    sys = "/";
                }
                PluginCache = Path.GetPathRoot(sys).CombinePath("X", "Cache");
            }
#endif
            if (PluginServer.IsNullOrWhiteSpace() || PluginServer.StartsWithIgnoreCase("ftp://"))
            {
                PluginServer = "http://x.newlifex.com/";
            }

            base.OnLoaded();
        }
Example #4
0
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
            var web = Runtime.IsWeb;

            if (LogPath.IsNullOrEmpty())
            {
                LogPath = web ? "..\\Log" : "Log";
            }
            if (TempPath.IsNullOrEmpty())
            {
                TempPath = web ? "..\\XTemp" : "XTemp";
            }
            if (LogFileFormat.IsNullOrEmpty())
            {
                LogFileFormat = "{0:yyyy_MM_dd}.log";
            }

            if (PluginServer.IsNullOrWhiteSpace())
            {
                PluginServer = "http://x.haocoding.com/";
            }

            base.OnLoaded();
        }