示例#1
0
 public DocumentFormat(string name, DocumentFamily family, string mimeType, string extension)
 {
     _name          = name;
     _family        = family;
     _mimeType      = mimeType;
     _fileExtension = extension;
 }
示例#2
0
        public static DocumentFamily GetFamily(string name)
        {
            DocumentFamily family = (DocumentFamily)Families[name];

            if (family == null)
            {
                throw new ArgumentException("invalid DocumentFamily: " + name);
            }
            return(family);
        }
示例#3
0
        public virtual IDictionary GetExportOptions(DocumentFamily family) //<String,Object>
        {
            IDictionary options = (IDictionary)_exportOptions[family];     //<String,Object>

            if (options == null)
            {
                options = new Hashtable();
                _exportOptions[family] = options;
            }
            return(options);
        }
示例#4
0
        public virtual void SetExportOption(DocumentFamily family, string name, object value)
        {
            IDictionary options = (IDictionary)_exportOptions[family]; //<String,Object>

            if (options == null)
            {
                options = new Hashtable();
                _exportOptions[family] = options;
            }
            options[name] = value;
        }
示例#5
0
 public virtual bool IsExportableFrom(DocumentFamily family)
 {
     return(GetExportFilter(family) != null);
 }
示例#6
0
 private string GetExportFilter(DocumentFamily family)
 {
     return((string)GetExportOptions(family)[FilterName]);
 }
示例#7
0
 public virtual void SetExportFilter(DocumentFamily family, string filter)
 {
     GetExportOptions(family)[FilterName] = filter;
 }