您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->MyWebPages51aspx汉化最终版>>App-Code/FCKEditor/FileWorkerBase.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:MyWebPages51aspx汉化最终版
当前文件:文件类型 MyWebPagesStarterKit/App_Code/FCKEditor/FileWorkerBase.cs打开代码结构图
普通视图
		            
1/* 2 * FCKeditor - The text editor for internet 3 * Copyright (C) 2003-2005 Frederico Caldeira Knabben 4 * 5 * Licensed under the terms of the GNU Lesser General Public License: 6 * http://www.opensource.org/licenses/lgpl-license.php 7 * 8 * For further information visit: 9 * http://www.fckeditor.net/ 10 * 11 * "Support Open Source software. What about a donation today?" 12 * 13 * File Name: FileWorkerBase.cs 14 * Base class used by the FileBrowserConnector and Uploader. 15 * 16 * File Authors: 17 * Frederico Caldeira Knabben (fredck@fckeditor.net) 18 */ 19 20using System; 21 22namespace FredCK.FCKeditorV2 23{ 24 public abstract class FileWorkerBase : System.Web.UI.Page 25 { 26 private const string DEFAULT_USER_FILES_PATH = "~/App_Data/UserImages/"; 27 28 private string sUserFilesPath ; 29 private string sUserFilesDirectory ; 30 31 protected string UserFilesPath 32 { 33 get 34 { 35 if ( sUserFilesPath == null ) 36 { 37 // Try to get from the "Application". 38 sUserFilesPath = (string)Application["FCKeditor:UserFilesPath"] ; 39 40 // Try to get from the "Session". 41 if ( sUserFilesPath == null || sUserFilesPath.Length == 0 ) 42 { 43 sUserFilesPath = (string)Session["FCKeditor:UserFilesPath"] ; 44 45 // Try to get from the Web.config file. 46 if ( sUserFilesPath == null || sUserFilesPath.Length == 0 ) 47 { 48 sUserFilesPath = System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"] ; 49 50 // Otherwise use the default value. 51 if ( sUserFilesPath == null || sUserFilesPath.Length == 0 ) 52 sUserFilesPath = DEFAULT_USER_FILES_PATH ; 53 54 // Try to get from the URL. 55 if ( sUserFilesPath == null || sUserFilesPath.Length == 0 ) 56 { 57 sUserFilesPath = Request.QueryString["ServerPath"] ; 58 } 59 } 60 } 61 62 // Check that the user path ends with slash ("/") 63 if ( ! sUserFilesPath.EndsWith("/") ) 64 sUserFilesPath += "/" ; 65 } 66 return sUserFilesPath ; 67 } 68 } 69 70 /// <summary> 71 /// The absolution path (server side) of the user files directory. It 72 /// is based on the <see cref="FileWorkerBase.UserFilesPath"/>. 73 /// </summary> 74 protected string UserFilesDirectory 75 { 76 get 77 { 78 if ( sUserFilesDirectory == null ) 79 { 80 // Get the local (server) directory path translation. 81 sUserFilesDirectory = Server.MapPath( this.UserFilesPath ) ; 82 } 83 return sUserFilesDirectory ; 84 } 85 } 86 } 87} 88
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:MyWebPages51aspx汉化最终版
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号