Exemplo n.º 1
0
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
            if (TempPath.IsNullOrEmpty())
            {
                if (Runtime.IsWeb)
                {
                    TempPath = "..\\XTemp";
                }
                else
                {
                    TempPath = "XTemp";
                }
            }
#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();
        }
Exemplo n.º 2
0
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
#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.EqualIgnoreCase("http://x.newlifex.com/")) PluginServer = "ftp://ftp.newlifex.com/x/";

            base.OnLoaded();
        }
Exemplo n.º 3
0
        /// <summary>加载完成后</summary>
        protected override void OnLoaded()
        {
#if !Android
            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 = "http://www.newlifex.com/showtopic-51.aspx";
            }

            base.OnLoaded();
        }
Exemplo n.º 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 !__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();
        }