Ejemplo n.º 1
0
        private static object GetValue(IModelRichEdit modelRichEdit, Func <RichEditPropertyEditorAttribute, object> func)
        {
            var editorType = ((IModelMemberViewItemRichEdit)modelRichEdit.Parent).PropertyEditorType;

            if (typeof(RichEditWinPropertyEditor).IsAssignableFrom(editorType))
            {
                var editorAttribute = editorType.GetCustomAttributes(typeof(RichEditPropertyEditorAttribute), false)
                                      .Cast <RichEditPropertyEditorAttribute>().First();
                return(func(editorAttribute));
            }
            return("rtf");
        }
Ejemplo n.º 2
0
 public static string Get_HighLightExtension(IModelRichEdit modelRichEdit)
 {
     return(GetValue(modelRichEdit, attribute => attribute.HighLightExtension) as string);
 }
Ejemplo n.º 3
0
 public static bool Get_PrintXML(IModelRichEdit modelRichEdit)
 {
     return((bool)GetValue(modelRichEdit, attribute => attribute.PrintXML));
 }
Ejemplo n.º 4
0
 public static bool Get_ShowToolBars(IModelRichEdit modelRichEdit)
 {
     return((bool)GetValue(modelRichEdit, attribute => attribute.ShowToolBars));
 }
Ejemplo n.º 5
0
 public static string Get_ControlBindingProperty(IModelRichEdit modelRichEdit)
 {
     return(GetValue(modelRichEdit, attribute => attribute.ControlBindingProperty) as string);
 }
        public static bool Get_PrintXML(IModelRichEdit modelRichEdit)
        {
            var value = GetValue(modelRichEdit, attribute => attribute.PrintXML);

            return(value != null && (bool)value);
        }
        public static bool Get_ShowToolBars(IModelRichEdit modelRichEdit)
        {
            var value = GetValue(modelRichEdit, attribute => attribute.ShowToolBars);

            return(value != null && (bool)value);
        }