コード例 #1
0
ファイル: Editor.cs プロジェクト: zuhuizou/wojilu
 public void Init(String propertyName, String propertyValue, String height, Editor.ToolbarType toolbar)
 {
     _propertyName  = propertyName;
     _propertyValue = propertyValue;
     _height        = height;
     _toolbar       = toolbar;
 }
コード例 #2
0
ファイル: Editor.cs プロジェクト: zuhuizou/wojilu
        public void Init(String propertyName, String propertyValue, String height, Editor.ToolbarType toolbar)
        {
            _controlName = propertyName;
            _content     = propertyValue;
            _height      = height;
            _Toolbar     = toolbar;

            _width      = "100%";
            _editorPath = sys.Path.Editor;

            _isUnique  = true;
            _jsVersion = MvcConfig.Instance.JsVersion;
        }
コード例 #3
0
        /// <summary>
        /// 编辑器
        /// </summary>
        /// <param name="varName">模板中的变量名称</param>
        /// <param name="propertyName">需要编辑的属性名称</param>
        /// <param name="propertyValue">需要编辑的内容</param>
        /// <param name="height">编辑器高度(必须手动指定px单位)</param>
        /// <param name="toolbar">工具栏类型:基本按钮或全部按钮</param>
        protected void editor(String varName, String propertyName, String propertyValue, String height, Editor.ToolbarType toolbar)
        {
            String currentEditorKey = "currentEditor";

            List <String> editorList = ctx.GetItem(currentEditorKey) as List <String>;

            if (editorList != null && editorList.Contains(propertyName))
            {
                throw new Exception(lang("exEditorNameUnique"));
            }

            IEditor ed = EditorFactory.NewOne(propertyName, propertyValue, height, toolbar);

            ed.AddUploadUrl(ctx);
            if (editorList != null && editorList.Count > 0)
            {
                ed.IsUnique = false;
            }
            set(varName, ed);

            if (editorList == null)
            {
                editorList = new List <string>();
            }
            editorList.Add(propertyName);
            ctx.SetItem(currentEditorKey, editorList);
        }
コード例 #4
0
ファイル: Editor.cs プロジェクト: zuhuizou/wojilu
        public static IEditor NewOne(String propertyName, String propertyValue, String height, Editor.ToolbarType toolbar)
        {
            IEditor x = new UEditor();

            x.Init(propertyName, propertyValue, height, toolbar);
            return(x);
        }
コード例 #5
0
ファイル: Editor.cs プロジェクト: 2014AmethystCat/wojilu
 public void Init( String propertyName, String propertyValue, String height, Editor.ToolbarType toolbar )
 {
     _propertyName = propertyName;
     _propertyValue = propertyValue;
     _height = height;
     _toolbar = toolbar;
 }