exoskeleton.js

0.8.0

Exoskeleton.js

Exoskeleton.js is a javscript library which exposes the larger exoskeleton framework for building native windows applications using html/javascript. This exoskeleton.js javascript library is what this documentation will cover.

Exoskeleton

exoskeleton.js is a wrapper interface for accessing com object functionality exposed by the exoskeleon shell.

Exoskeleton
Author: Obeliskos
Instance Members
getApplicationSettings()
getLocations()
getVersion()
registerServiceProcessor(processor)
shutdown()

Exoskeleton

Exoskeleton main javascript facade interface to the C# API exposed via COM.

new Exoskeleton()
Instance Members
getApplicationSettings()
getLocations()
getVersion()
registerServiceProcessor(processor)
shutdown()

Com

Com API class for interacting with COM Objects registered on the system.

new Com(exoCom: object)
Parameters
exoCom (object) reference to the real 'Com' COM API class.
Instance Members
createInstance(comObjectName)
invokeMethod(methodName, methodParams)
createAndInvokeMethod(comObjectName, methodName, methodParams)

Dialog

Dialog API class for creating and interfacing with WinForms dialogs. This API exposes native .NET dialogs, several exoskeleton 'prompt' dialogs or you can compose your own using a global dialog singleton. Dialogs are modal and executed synchronously, so your javascript will wait until dialog is dismissed before continuing or receiving its returned result. Dialogs do not support javascript eventing.

new Dialog(exoDialog: any)
Parameters
exoDialog (any)
Instance Members
addCheckBox(dialogName, checkbox, parentName?)
addCheckedListBox(dialogName, checkedlistbox, parentName?, payload?, listbox)
addComboBox(dialogName, comboBox, parentName?, payload?)
addDataGridView(dialogName, gridView, parentName?, payload?, objectArray)
addDateTimePicker(dialogName, dateTimePicker, parentName?)
addDialogButton(dialogName, button, parentName?, payload?)
addLabel(dialogName, label, parentName?)
addListBox(dialogName, listbox, parentName?, payload?)
addListView(dialogName, listview, parentName?, payload?)
addMaskedTextBox(dialogName, maskedtextbox, parentName)
addMonthCalendar(dialogName, monthcalendar, parentName)
addNumericUpDown(dialogName, numericUpDown, parentName?)
addPanel(dialogName, panel, parentName?)
addPictureBox(formName, picbox, parentName?, payload)
addRadioButton(dialogName, radioButton, parentName?)
addTextBox(dialogName, textbox, parentName?)
addTreeView(dialogName, treeview, parentName?, payload, textbox)
applyControlPayload(formName, controlName, payload)
applyControlProperties(dialogName, controlValues)
applyDefinition(dialogName, definition)
applyDialogProperties(dialogName, formJson)
initialize(dialogName, formJson)
loadDefinition(dialogName, filename)
promptCheckedList(title, prompt, values, checkedIndices?)
promptDataGridView(title, prompt, objectArray, autoSizeColumns)
promptDatePicker(title, prompt, defaultValue?)
promptInput(title, prompt, defaultText?)
promptList(title, prompt, values, selectedItem?, multiselect)
promptPropertyGrid(title, caption, objectJson, assemblyName, typeName)
showDialog(dialogName)
showColorDialog(dialogOptions)
showFontDialog(dialogOptions)
showOpenFileDialog(dialogOptions?)
showMessageBox(text, caption, buttons?, icon?)
showSaveFileDialog(dialogOptions?)

Enc

Enc API class for performing various encryption and hashing tasks.

new Enc(exoEnc: object)
Parameters
exoEnc (object) reference to the real COM 'Enc' API class.
Instance Members
encrypt(data, password)
decrypt(data, password)
encryptFiles(directory?, filemask, password)
decryptFiles(directory?, filemask, password)
createMD5Hash(filename)
createSHA1Hash(filename)
createSHA256Hash(filename)
hashFiles(path, searchPattern)

File

File API class for interfacing with .NET File and Directory classes.

new File(exoFile: object)
Parameters
exoFile (object) reference to the real 'File' COM API class.
Instance Members
combinePaths(paths)
combinePathsArray(source, paths)
copyFile(source, dest)
createDirectory(path)
deleteDirectory(path, recursive)
deleteFile(filename)
getDirectories(parentDir)
getDirectoryInfo(path)
getDirectoryName(path)
getDriveInfo()
getExtension(path)
getFileInfo(filename)
getFiles(parentDir, searchPattern)
getFilesEndingWith(parentDir, extensions)
getFileName(path)
getFullPath(path)
getLogicalDrives()
loadFile(filename)
loadFileBase64(filename)
saveFile(filename, contents)
saveFileBase64(filename, contents)
startWatcher(path, eventBaseName)
stopWatcher()

Form

Form API class for creating and interfacing with WinForms. This API exposes native .NET Form objects. Forms are more dynamic and interactive than dialogs. They support events which javascript can listen for and make exoskeleton calls, including updating the form programmatically. Forms are not modal and can be resized. When your javascript shows a form your javascript will not wait for it to close before continuing.

new Form(exoForm: any)
Parameters
exoForm (any)
Instance Members
addCheckBox(formName, checkbox, parentName?, emitEvents?)
addCheckedListBox(formName, checkedlistbox, parentName?, emitEvents?, payload?)
addComboBox(formName, comboBox, parentName?, emitEvents?, payload?)
addDataGridView(formName, gridView, parentName?, emitEvents?, payload?)
addDateTimePicker(formName, dateTimePicker, parentName?, emitEvents?)
addEventButton(formName, button, parentName?)
addLabel(formName, label, parentName?, emitEvents?)
addListBox(formName, listbox, parentName?, emitEvents?, payload?)
addListView(formName, listview, parentName?, emitEvents?, payload?)
addMaskedTextBox(formName, maskedtextbox, parentName?, emitEvents?)
addMonthCalendar(formName, monthcalendar, parentName?, emitEvents?)
addNumericUpDown(formName, numericUpDown, parentName?, emitEvents?)
addPanel(formName, panel, parentName?, emitEvents?)
addPictureBox(formName, picbox, parentName?, emitEvents?, payload)
addRadioButton(formName, radioButton, parentName?, emitEvents?)
addTextBox(formName, textbox, parentName?, emitEvents?)
addTreeView(formName, treeview, parentName?, emitEvents?, payload, textbox)
applyControlPayload(formName, controlName, payload)
applyControlProperties(formName, controlValues)
applyDefinition(formName, definition)
applyFormProperties(formName, formJson)
close(formName)
initialize(formName, formJson)
generateDynamicResponse(formName)
getControlProperties(formName, controlName)
loadDefinition(formName, filename)
show(formName)

Logger

Logger API class for dealing with exoskeleton logger.

new Logger(exoLogger: object)
Parameters
exoLogger (object) reference to the real COM API Logger class.
Instance Members
logInfo(source, message)
logWarning(source, message)
logError(msg, url?, line?, col?, error?)
logText(message)
logObject(obj)

Main

Main API class used for general MessageBox, FileDialog, Notifications, and Container utilitites.

new Main(exoMain: object)
Parameters
exoMain (object) reference to the real 'Main' COM API class.
Instance Members
applyFormProperties(formProperties)
doEvents()
exitFullscreen()
fullscreen()
openNewWindow(caption, url, width?, height?, mode?)
switchToNativeUi()
switchToMixedUi(browserParentPanel?)
switchToWebUi()
setWindowTitle(title)
showNotification(title, message)
toggleFullscreen()

Media

Media API class for speech and audio/video/image.

new Media(exoMedia: object)
Parameters
exoMedia (object) reference to the real 'Media' COM API class.
Instance Members
createImageList(name, properties?)
imageListExists(name)
loadImageList(name, filenameList)
clearImageList(name)
removeImageList(name)
removeAllImageLists()
speak(message)
speakSync(message)

Menu API class used for populating the host container's menu bar.

new Menu(exoMenu: object)
Parameters
exoMenu (object) reference to the real 'Menu' COM API class.
Instance Members

Net

Net API class for various network and http tasks.

new Net(exoNet: object)
Parameters
exoNet (object) reference to the real COM 'Net' API class.
Instance Members
downloadFile(url, dest, async)
readUrl(url)

Proc

Proc API class for performing windows process related tasks.

new Proc(exoProc: object)
Parameters
exoProc (object) reference to the real 'Proc' COM API class.
Instance Members
startPath(procPath)
start(processStartInfo)
getProcesses()
getProcessesSimplified()
getProcessInfoById(id)
getProcessesByName(name)
killProcessById(id)

Session

Session API class for interfacing with the exoskeleton 'session' key/value storage.

new Session(exoSession: object)
Parameters
exoSession (object) reference to the real 'Session' COM API class.
Instance Members
get(key)
getObject(key)
list()
set(key, value)
setObject(key, value)

Statusbar

Statusbar API class used for manipulating the host container's status strip.

new Statusbar(exoStatusbar: any)
Parameters
exoStatusbar (any)
Instance Members
show()
hide()
initialize()
setLeftLabel(text)
setRightLabel(text)

System

System API class for getting system information, environment variables, registry, etc.

new System(exoSystem: object)
Parameters
exoSystem (object) reference to the real 'System' COM API class.
Instance Members
getSystemInfo()
getEnvironmentVariable(varName)
getEnvironmentVariables()
setEnvironmentVariable(varName, varValue)
focusWindow(className?, windowName?)
focusAndSendKeys(className?, windowName?, keys)

Toolbar

Toolbar API class used for populating the host container's tool strip.

new Toolbar(exoToolbar: any)
Parameters
exoToolbar (any)
Instance Members
show()
hide()
initialize()
addButton(text, eventName, imagePath)
addSeparator()

Util

Util API class containing misc utility methods.

new Util(exoUtil: any)
Parameters
exoUtil (any)
Instance Members
convertDateToUnix(dateString)
formatUnixDate(date, format)

KeyStoreAdapter

Persistent Key/Value store which can also be used as a loki database persistence adapter.

new KeyStoreAdapter(exoFile: any)
Parameters
exoFile (any) pass in reference to exoskeleton singleton
Instance Members
loadDatabase(dbname, callback)
loadKey
saveDatabase(dbname, dbstring, callback)
saveKey

ExoEventEmitter

Event emitter for listening to or emitting events within your page(s)

This is exposed via exoskeleton.events. May be used internally to your container or used to emit or listen to 'multicast' events which are propagated to all host windows.

Event names starting with 'local.' are not to be multicast, otherwise the event will be multicast with an eventname prefixed with 'multicast.'.

new ExoEventEmitter(exo: object, options: object)
Parameters
exo (object) Instance to the exoskeleton com interface
options (object) options to configure event emitter with.
Name Description
options.asyncListeners boolean (default false) whether events will be emitted asynchronously.
Instance Members
events
asyncListeners
clear(eventName?)
on(eventName, listener)
emit(eventName, eventData, args)