Usage
npm i @icreate/ics-chromely-plugin-core
feature
0.0.18 修改导出对象为默认导出
0.0.17 修改Chromely为单例模式
0.0.16 WindowHelper增加关闭和重绘闪屏README描述
0.0.15 WindowHelper增加关闭和重绘闪屏
0.0.14 ConfigHelper增加获取调试信息
0.0.13 HardwareHelper增加设置本地日期
0.0.12 修改注册表调用方法提供注册键设置
0.0.11 HardwareHelper增加获取操作系统版本、关闭操作系统和重启操作系统
0.0.10 HardwareHelper增加获取操作系统描述GetOSDesc()
Features
- LocalLogger:本地日志
- BrowserHelper:浏览器帮助类
- WindowHelper:主window帮助类
- chromely:chromely对象
- HardwareHelper:获取电脑Mac地址、Ip地址、主机名
- PrinterHelper:打印机类
- RegeditHelper:注册表类
- ConfigHelper:本地配置类
Importing library
You can import the generated bundle to use the whole library generated by this starter:
import { LocalLogger, BrowserHelper, WindowHelper, Chromely, ConfigHelper } from '@icreate/ics-chromely-plugin-core'
LocalLogger
level: LogLevels
debug(logObject: any): Promise<String>
info(logObject: any): Promise<String>
warn(logObject: any): Promise<String>
error(logObject: any): Promise<String>
fatal(logObject: any): Promise<String>
BrowserHelper
OpenChrome(url:string):void
OpenIE(url:string):void
OpenFireFox(url:string):void
OpenDefault(url:string):void
WindowHelper
Minimize(): void
Maximize(): void
Restore(): void
Close(): void
Restart(): void
State(): Promise<String>
CloseSplash(): void
RedrawSplash(message: string): void
Chromely
isChromely: boolean
$on(eventName: string, callback: Function): void
$off(eventName: string, callback: Function): void
$emit(eventName: string): void
HardwareHelper
getMacAddress(): Promise<array>
getIpAddress(): Promise<array>
getHostName(): Promise<string>
GetOSDesc(): Promise<string>
GetOsVersion(): Promise<string>
RestartOS(): void
CloseOS(): void
SetLocalTime(): Promise<string>
PrinterHelper
getPrinterList(): Promise<array>
getPrinterDefault(): Promise<string>
isPrinterExists(printerName: string): Promise<bool>
RegeditHelper
getRegeditValue(name: string): Promise<string>
setRegeditValue(name: string, value: string): Promise<string>
ConfigHelper
Get(key: string): Promise<string>
GetBaseUrl(): Promise<string>
GetDebug(): Promise<string>