Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
With the purpose of providing secure urls to files that are not located in the application's web tree, we included two methods:
VirtualUI.HTMLDoc.CreateSessionURL(URL, LocalPath)
This method allows you to create a virtual URL valid during the session's lifetime.
· The "URL" parameter is the virtual URL to access the Filename or Directory specified in LocalPath.
· "LocalPath" can be a file name or a directory. If it is a file name, the URL parameter resolves to that filename; if it is a directory, the URL parameter is a virtual path that can be used to access any file under this local directory.
URL = VirtualUI.HTMLDoc.GetUniqueURL(Filename, lifetime)
This method allows you to create a unique virtual URL for a specific file, valid during the time specified in minutes in the Lifetime parameter.
· The "Filename" parameter points to the local filename we want to create an unique URL for.
· "Lifetime" is the time during which the returned URL will be valid.
We took VirtualUI integration tools one step further and created the HTMLDoc Object to enhance the integration of Windows app resources to the web.
This object handles web elements from the server side, sparing the developer the need to learn javascript to include interactive web content in their application. This makes the web enabling process much more straightforward in terms of time and organization and empowers developers to easily enhance their VirtualUI web enabled application with reusable widgets and components in web documents and web applications.
This API allows your to take advantage of Web Components and can also be used to include and run Javascript files that do not follow the HTML5 Web Component specification.
Read more:
Thinfinity VirtualUI allows you to insert HTML content into the current web page. You can do this from your Windows app by calling the ImportHTML method of the HTMLDoc component:
VirtualUI.HTMLDoc.ImportHTML(URL, [Filename])
· The "URL" parameter is the Uniform Resource Locator pointing to the HTML file location in the net.
· "Filename" is an optional parameter that, when specified, points to the actual HTML file in the local file system. In this case, the "URL" parameter will be virtual, and will translate to this local "filename".
VirtualUI provides a specialized application-side object called HTMLDoc, with methods that allow you to add web content without changing the original HTML or javascript files.
· from the Windows app.
· from the Windows app.
· not located in the web tree (needed to deploy web or media files along with your application).
· defined in an imported HTML file.
To create a Web Component instance, we added a specific method that will allow you to embed the component in the web page, tied or untied to a Windows control.
When the Web Component is tied to a Windows control, it will look like it is "embedded" in the form, replacing the Windows control area, following its position and size when it changes. When untied, it will be embedded into the web page, but its position and size will not be attached to any control area.
VirtualUI.HTMLDoc.CreateComponent(Id, TagOrHTML, ReplaceWnd)
· "Id" parameter is the HTML element ID.
· "TagOrHTML" can be a tagname or a valid HTML string.
· "ReplaceWnd" is the handle to the window control to be "replaced".
Examples:
Adding a tied Web Component by the tagname:
VirtualUI.HTMLDoc.CreateComponent("video1", "vui-video", panel1.Handle)
In this example, the HTML "<vui-video></vui-video>" will be inserted, and dynamically positioned according to panel1's position and size.
Adding tied HTML content from a valid HTML string:
VirtualUI.HTMLDoc.CreateComponent("hworld", "<div><span>hello world</span></div>", panel1.Handle)
In this example, the HTML "<div><span>hello world</span></div>" will be inserted, and dynamically positioned according to panel1's position and size.
Adding an untied Web Component by the tagname:
VirtualUI.HTMLDoc.CreateComponent("qzprinter1", "qzprinter")
In this example, the Web Component will be inserted, but not positioned according to any visible control.
Web Components are defined in HTML files. In order to be able to create a Web Component, you need to import that file into the HTML DOM. With VirtualUI you can do this from your Windows app by calling the ImportHTML method of the HTMLDoc component.
Let's suppose that you are about to include some new functionality and logic which may need some Javascript library that is currently not loaded.
In order to load this new javascript library you can use the LoadScript method of the HTMLDoc component.
Thinfinity VirtualUI allows you to load and run Javascript files from the Windows app. In order to load a new javascript file, you can use the LoadScript method of the HTMLDoc component:
VirtualUI.HTMLDoc.LoadScript(URL, [Filename])
· The "URL" parameter is the Uniform Resource Locator pointing to the Javascript file location in the net.
· "Filename" is an optional parameter that, when specified, points to the actual Javascript file in the local file system. In this case the "URL" parameter will be virtual, and will resolve to this local "filename".
Let's suppose we include a web component that needs to display a signature, and the signature image file is somewhere in the file system. Complying with standard web server specifications, Thinfinity VirtualUI forbids the access to files that are not in the root web tree. This means that to access that image file, you would be forced to first place it in the application's web tree. This wouldn't be neat!
With the purpose of providing secure urls to files that are not within the web tree root, we included the CreateSessionURL and GetUniqueURL methods. These methods help you create virtual URLs for the application session's lifetime, or for a specific file and valid only during a specified lifetime, in minutes.
Web Components are a new and exciting technology that takes the well known "reusable software components" concept to the web. With this HTML5 specification you can build HTML+javascript pieces and use them as a custom HTML element.
In Thinfinity VirtualUI you can easily embed Web Components in your Windows application. Some Web Components examples are: a native video streaming component, a raw printing component, a QR component, a signature component, a Google Maps component, and so on.
With the purpose of embedding a Web Component in a Windows application, we provide a specialized object that allows you to:
· Load and run Web Component Javascript files from the Windows app.
· Import Web Component HTML files from the Windows app
· Securely access local resources that are not in the application's web tree (needed to deploy web or media files in your application)