protected override void OnLoad(EventArgs e) { base.OnLoad(e); var database = BACnetSession.Current.GetProcess<NetworkDatabase>(); this._devices = new DeviceTreeStore(Application.Instance); this._devicesSubscription = database.Subscribe(new DescriptorQuery(objectType: 8), this._devices); _tree.DataStore = this._devices; _refreshTimer = new UITimer(); _refreshTimer.Interval = .5; _refreshTimer.Elapsed += _refreshTimerElapsed; _refreshTimer.Start(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); var database = BACnetSession.Current.GetProcess <NetworkDatabase>(); this._devices = new DeviceTreeStore(Application.Instance); this._devicesSubscription = database.Subscribe(new DescriptorQuery(objectType: 8), this._devices); _tree.DataStore = this._devices; _refreshTimer = new UITimer(); _refreshTimer.Interval = .5; _refreshTimer.Elapsed += _refreshTimerElapsed; _refreshTimer.Start(); }
protected override void OnUnLoad(EventArgs e) { base.OnUnLoad(e); if (this._devicesSubscription != null) { this._devicesSubscription.Dispose(); this._devicesSubscription = null; } if (_refreshTimer != null) { _refreshTimer.Dispose(); _refreshTimer = null; } this._devices = null; this.Content = null; }
protected override void OnUnLoad(EventArgs e) { base.OnUnLoad(e); if (this._devicesSubscription != null) { this._devicesSubscription.Dispose(); this._devicesSubscription = null; } if(_refreshTimer != null) { _refreshTimer.Dispose(); _refreshTimer = null; } this._devices = null; this.Content = null; }