Table of Contents

Class vdmanager

Namespace
vdWebLibrary
Assembly
JsPropertiesExtractor.dll

Contains most of the library's functionality, including the vdrawObj object, that exports many useful functions that can be used to handle the component.

public class vdmanager
Inheritance
vdmanager
Inherited Members

Examples

    var vdcanvas;// keep the vdcanvas control global for quick access inside the functions since it is the 
    one in the this page
    function vdrawInitPageLoad() {//Intiallize theweb control inside this function.It must be called inside onload event of this page
        vdmanager.AttachCanvas("canvas");//create a new web control andattch it to the canvas elemement
        vdcanvas = vdmanager.vdrawObject();//return a refence to the attached web control
        vdcanvas.vdAfterOpenDocument = _vdAfterOpenDocument;//defines the function that will be fire when a web control document loaded.
        vdcanvas.vdPrompt = _onprompt;//defines the function that will be fire when a vdcanvas.Prompt is called in order to print the message on this page
        vdcanvas.vdError = _vdError;//defines the function that will be fire when an error ocured in order to print the message on this page
    }

    function printInfo(text) {//print messages in the 'info' element of this page
        document.getElementById("info").innerHTML = ":" + text; 
    }
    function _vdError(sender, ErrCategoryId, statusId, info) {
        printInfo("Error status code = " + statusId.toString() + ". " + (info ? info : ""));
    }
    function _onprompt(sender, msg) {
        printInfo(msg);
    }

    function _vdAfterOpenDocument() {//fire when a web control document loaded.
        vdcanvas.Prompt("Document opened successfully");
    }
    function test() {
        //select a new document for the web control.
        //NOTE: Always a document must be selected to the web control.Else the web control is unusable
        vdcanvas.SelectDocument("vddocument.vds");
    }



Test
:

Remarks

Access this object directly with his name vdmanager from anywhere in your page without the need to create an instance of it, because it is a global object of the library.

Methods

AttachCanvas(string, int, int, object)

Assign a canvas object to a new web control. The web control is created automatically. The canvas will be set to the given width and height.

DettachCanvas(string)

Deassigns the given canvas and destroys the proper vdrawobject.

vdrawObject(string)

Returns the vdrawobject that corresponds to the given canvas.