您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->MyWebPages51aspx汉化最终版>>App-Code/FCKEditor/FCKeditorConfigurations.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:MyWebPages51aspx汉化最终版
普通视图
		            
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: FCKeditorConfigurations.cs 14 * Class that holds all editor configurations. 15 * 16 * File Authors: 17 * Frederico Caldeira Knabben (fredck@fckeditor.net) 18 */ 19 20using System ; 21using System.Collections ; 22using System.Runtime.Serialization ; 23 24namespace FredCK.FCKeditorV2 25{ 26 [ Serializable() ] 27 public class FCKeditorConfigurations : ISerializable 28 { 29 private Hashtable _Configs ; 30 31 internal FCKeditorConfigurations() 32 { 33 _Configs = new Hashtable() ; 34 } 35 36 protected FCKeditorConfigurations( SerializationInfo info, StreamingContext context ) 37 { 38 _Configs = (Hashtable)info.GetValue( "ConfigTable", typeof( Hashtable ) ) ; 39 } 40 41 public string this[ string configurationName ] 42 { 43 get 44 { 45 if ( _Configs.ContainsKey( configurationName ) ) 46 return (string)_Configs[ configurationName ] ; 47 else 48 return null ; 49 } 50 set 51 { 52 _Configs[ configurationName ] = value ; 53 } 54 } 55 56 internal string GetHiddenFieldString() 57 { 58 System.Text.StringBuilder osParams = new System.Text.StringBuilder() ; 59 60 foreach ( DictionaryEntry oEntry in _Configs ) 61 { 62 if ( osParams.Length > 0 ) 63 osParams.Append( "&" ) ; 64 65 osParams.AppendFormat( "{0}={1}", EncodeConfig( oEntry.Key.ToString() ), EncodeConfig( oEntry.Value.ToString() ) ) ; 66 } 67 68 return osParams.ToString() ; 69 } 70 71 private string EncodeConfig( string valueToEncode ) 72 { 73 string sEncoded = valueToEncode.Replace( "&", "%26" ) ; 74 sEncoded = sEncoded.Replace( "=", "%3D" ) ; 75 sEncoded = sEncoded.Replace( "\"", "%22" ) ; 76 77 return sEncoded ; 78 } 79 80 ISerializable Members 88 } 89} 90
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:MyWebPages51aspx汉化最终版
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号