ngAfterViewInit() { try { let hmi = this.projectService.getHmi(); if (!hmi) { this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(load => { this.loadHmi(); }, error => { console.log('Error loadHMI'); }); } else { this.loadHmi(); } this.changeDetector.detectChanges(); } catch (err) { console.log(err); } }
//#region Implemented onInit / onAfterInit event /** * Init Save Project event and clear gauge memory (to manage event signal/gauge) */ ngOnInit() { try { this.subscriptionSave = this.projectService.onSaveCurrent.subscribe(saveas => { this.onSaveProject(); if (saveas) { this.projectService.saveAs(); } }); this.gaugesManager.clearMemory(); } catch (err) { console.log(err); } }
/** * after init event */ ngAfterViewInit() { this.myInit(); this.setMode('select'); let hmi = this.projectService.getHmi(); if (hmi) { this.loadHmi(); } this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(load => { this.loadHmi(); }, error => { console.log('Error loadHMI'); }); this.changeDetector.detectChanges(); }
ngOnInit() { this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(res => { this.deviceMap.loadCurrentProject(); // this.deviceList.loadCurrentProject(); }); this.subscriptionDeviceChange = this.hmiService.onDeviceChanged.subscribe(event => { this.deviceMap.setDeviceStatus(event); }); this.subscriptionVariableChange = this.hmiService.onVariableChanged.subscribe(event => { this.deviceList.updateDeviceValue(); }); this.subscriptionSave = this.projectService.onSaveCurrent.subscribe(saveas => { if (saveas) { this.projectService.saveAs(); } }); this.hmiService.askDeviceStatus(); }
ngAfterViewInit() { try { let hmi = this.projectService.getHmi(); if (hmi) { this.loadHmi(); } this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(load => { this.loadHmi(); }, error => { console.log('Error loadHMI'); }); this.subscriptionAlarmsStatus = this.hmiService.onAlarmsStatus.subscribe(event => { this.setAlarmsStatus(event); }); this.hmiService.askAlarmsStatus(); this.changeDetector.detectChanges(); } catch (err) { console.log(err); } }
ngOnInit() { this.loadTexts(); this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(res => { this.loadTexts(); }); }
ngOnInit() { if (this.withtree) { if (this.data.device.type === DeviceType.OPCUA) { this.subscriptionBrowse = this.hmiService.onDeviceBrowse.subscribe(values => { if (this.data.device.name === values.device) { if (values.error) { this.addError(values.node, values.error); } else { this.addNodes(values.node, values.result); } } }); this.subscriptionNodeAttribute = this.hmiService.onDeviceNodeAttribute.subscribe(values => { if (this.data.device.name === values.device) { if (values.error) { // this.addError(values.node, values.error); } else if (values.node) { if (values.node.attribute[14]) { // datatype values.node.type = values.node.attribute[14]; } this.treetable.setNodeProperty(values.node, this.attributeToString(values.node.attribute)); } } }); } this.queryNext(null); } }
ngOnInit ( ) : void this.height_subscription = this._layoutService.observe_content_height ( ).subscribe ( this.token_subscription = this._dataframeAccount.observe_account_token ( ).subscribe ( this._dragulaService.drag.subscribe( ( value : any ) => this._dragulaService.drop.subscribe( ( value : any ) => this._dragulaService.over.subscribe( ( value : any ) => this._dragulaService.out.subscribe( ( value : any ) =>
ngOnInit() : void { this.busService.alert.subscribe((messageBox:MessageBox)=>{ this.callbackObj = null this.type = "alert" this.message = messageBox['message'] $('#messageBox').modal() if(messageBox['callback']) this.callbackObj = messageBox['callback'] }) this.busService.confirm.subscribe((messageBox:MessageBox)=>{ this.callbackObj = null this.type = "confirm" this.message = messageBox['message'] $('#messageBox').modal() if(messageBox['callback']) this.callbackObj = messageBox['callback'] }) }
ngAfterContentChecked() { try { let hmi = this.projectService.getHmi(); if (hmi) { this.checkSettings(); } this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(load => { this.checkSettings(); }, error => { console.log('Error loadHMI'); }); } catch (err) { console.log(err); } }
ngAfterViewInit() { try { let hmi = this.projectService.getHmi(); if (hmi) { this.loadHmi(); } this.subscriptionLoad = this.projectService.onLoadHmi.subscribe(load => { this.loadHmi(); }, error => { console.log('Error loadHMI'); }); this.changeDetector.detectChanges(); } catch (err) { console.log(err); } }
ngOnInit ( ) : void this.height_subscription = this._layoutService.observe_content_height ( ).subscribe ( this.token_subscription = this._dataframeAccount.observe_account_token ( ).subscribe ( this._dragulaService.drag.subscribe( ( value : any ) => this._dragulaService.drop.subscribe( ( value : any ) => this._dragulaService.over.subscribe( ( value : any ) => this._dragulaService.out.subscribe( ( value : any ) =>