Class ViewerHelper
Contains utility methods for showing documents
Inheritance
Inherited Members
Namespace: Simplic.Framework.Extension.UI
Assembly: Simplic.Framework.Extension.dll
Syntax
public static class ViewerHelper
Methods
| Improve this Doc View SourceCreateDocumentViewer(Byte[], Guid, ContentType, String, String)
Creates a new document viewer pane showing the document
Declaration
public static DefaultRadPane CreateDocumentViewer(byte[] blob, Guid blobId, ContentType type, string viewerName, string title)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | Document blob |
System.Guid | blobId | ID of the document blob |
ContentType | type | Type of the document |
System.String | viewerName | Name of the viewer pane |
System.String | title | Title of the viewer |
Returns
Type | Description |
---|---|
DefaultRadPane | The document viewer pane |
CreateDocumentViewer(Byte[], Guid, IDictionary<String, Object>, String, String)
Creates a new document viewer pane showing the document
Declaration
public static DefaultRadPane CreateDocumentViewer(byte[] blob, Guid blobId, IDictionary<string, object> parameter, string viewerName, string title)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | Document blob |
System.Guid | blobId | ID of the document blob |
System.Collections.Generic.IDictionary<System.String, System.Object> | parameter | Parameter (fileextension/mimetype/...) |
System.String | viewerName | Name of the viewer pane |
System.String | title | Title of the document viewer |
Returns
Type | Description |
---|---|
DefaultRadPane | The document viewer pane |
CreateDocumentViewer(Byte[], Guid, IDictionary<String, String>, String, String)
Creates a new document viewer pane showing the document
Declaration
public static DefaultRadPane CreateDocumentViewer(byte[] blob, Guid blobId, IDictionary<string, string> parameter, string viewerName, string title)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | Document blob |
System.Guid | blobId | ID of the document blob |
System.Collections.Generic.IDictionary<System.String, System.String> | parameter | Parameter (fileextension/mimetype/...) |
System.String | viewerName | Name of the viewer pane |
System.String | title | Title of the document viewer |
Returns
Type | Description |
---|---|
DefaultRadPane | The document viewer pane |
ParseFileExtension(String)
Parses a file extension into the corresponding ContentType
Declaration
public static ContentType ParseFileExtension(string fileExtension)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileExtension |
Returns
Type | Description |
---|---|
ContentType |
ParseMime(String)
Parses a mime type into the corresponding ContentType
Declaration
public static ContentType ParseMime(string mime)
Parameters
Type | Name | Description |
---|---|---|
System.String | mime |
Returns
Type | Description |
---|---|
ContentType |
PreviewDocument(Guid, IDictionary<String, String>, String)
Opens a new document viewer
Declaration
public static void PreviewDocument(Guid documentGuid, IDictionary<string, string> parameter, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | documentGuid | |
System.Collections.Generic.IDictionary<System.String, System.String> | parameter | |
System.String | name |
PreviewDocuments(GridFunctionParameter)
Preview documents (Grid function)
Declaration
public static void PreviewDocuments(GridFunctionParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
GridFunctionParameter | parameter |
SaveDocumentHistory(GridFunctionParameter)
Saves files from the document history
Declaration
public static void SaveDocumentHistory(GridFunctionParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
GridFunctionParameter | parameter |
ShowDocument(Byte[], IDictionary<String, Object>)
Show Document in the Viewer on the right
Declaration
public static void ShowDocument(byte[] blob, IDictionary<string, object> parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | Byte-Array |
System.Collections.Generic.IDictionary<System.String, System.Object> | parameter | Parameter (fileextension/mimetype/...) |
ShowDocument(Byte[], IDictionary<String, Object>, Guid, String)
Show Document in the Viewer
Declaration
public static void ShowDocument(byte[] blob, IDictionary<string, object> parameter, Guid blobId, string viewerName)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | Byte-Array |
System.Collections.Generic.IDictionary<System.String, System.Object> | parameter | Parameter (fileextension/mimetype/...) |
System.Guid | blobId | ID of the document blob |
System.String | viewerName | Viewer name |
ShowDocument(Byte[], IDictionary<String, String>)
Show Document in the Viewer on the right
Declaration
public static void ShowDocument(byte[] blob, IDictionary<string, string> parameter = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | Byte-Array |
System.Collections.Generic.IDictionary<System.String, System.String> | parameter | Parameter (fileextension/mimetype/...) |
ShowDocumentHistory(GridFunctionParameter)
Opens a dialog that shows all previous document versions
Declaration
public static void ShowDocumentHistory(GridFunctionParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
GridFunctionParameter | parameter |
ShowDocumentHistory(Guid, String)
Opens a dialog that shows all previous document versions
Declaration
public static void ShowDocumentHistory(Guid documentGuid, string name = "")
Parameters
Type | Name | Description |
---|---|---|
System.Guid | documentGuid | |
System.String | name | Name of the document |